Changeset 3586


Ignore:
Timestamp:
Jul 15, 2009, 5:01:21 PM (15 years ago)
Author:
flop25
Message:

version acceptable : with junk code

Location:
extensions/floPure
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/floPure/header.tpl

    r3585 r3586  
    7474<div id="the_page">
    7575{php}
    76 if (is_admin() and !(pwg_get_session_var('flopure_checked_version')) )
    77 //if (is_admin())
     76if (is_admin() and !(pwg_get_session_var('flopure_array_version')) and !(pwg_get_session_var('flopure_checked_version')) )
    7877{
    7978        global $template, $page;
     
    8786        {
    8887                $template->append('header_msgs', l10n('floPure_update_needed'));
    89                 $name_is_nutd[]='floPure';
     88                $name_is_nutd['floPure']=$floPure_conf['version'];
     89                //$name_is_nutd['version'][]=$floPure_conf['version'];
    9090        }
    9191        $floPure->theme_version_search(PHPWG_ROOT_PATH.'template/floPure/theme');
    92         $name_is_nutd=array_merge($name_is_nutd,$floPure->is_nutd);
    93         pwg_set_session_var('flopure_checked_version',$name_is_nutd);
    94         foreach($name_is_nutd as $i)
     92        $name_is_nutd= $name_is_nutd + $floPure->is_nutd;
     93        pwg_set_session_var('flopure_array_version',$name_is_nutd);
     94        pwg_set_session_var('flopure_checked_version', true);
     95        /*foreach($name_is_nutd as $cle => $val )
    9596        {
    96         $template->append('test_a', array( 'A'=> $i) );
    97         }
    98        
    99        
    100         //pwg_set_session_var('flopure_checked_version');
     97        $template->append('test_a', array( 'A'=>$cle,'B'=>$val, ) );
     98        }*/
    10199
    102100       
    103101}
    104 else if ( pwg_get_session_var('flopure_checked_version') )
     102else if (is_admin() and  pwg_get_session_var('flopure_array_version') )
    105103{
    106104
     
    110108        load_language('template.lang', PHPWG_ROOT_PATH.'template/floPure/tools/');
    111109        $floPure = new floPure();
    112         $floPure->display(pwg_get_session_var('flopure_checked_version'));
    113         foreach(pwg_get_session_var('flopure_checked_version') as $i)
     110        $floPure->display(pwg_get_session_var('flopure_array_version'));
     111        /*foreach(pwg_get_session_var('flopure_checked_version') as $cle => $val )
    114112        {
    115         $template->append('test_a', array( 'A'=> $i) );
    116         }
     113        $template->append('test_a', array( 'A'=>$cle,'B'=>$val, ) );
     114        }*/
     115        $template->append('test_a', array( 'A'=>'a','B'=>'a', ) );
    117116}
    118117        //pwg_unset_session_var('flopure_checked_version');
  • extensions/floPure/theme/autumn/themeconf.inc.php

    r3580 r3586  
    99  'local_head' => '<!-- no theme specific head content -->',
    1010  'eid' => '233',
    11   'version' => '1.0.0',
     11  'version' => '5.0.1',
    1212);
    1313?>
  • extensions/floPure/theme/clear_blue/themeconf.inc.php

    r3580 r3586  
    99  'local_head' => '<!-- no theme specific head content -->',
    1010  'eid' => '143',
    11   'version' => '2.0.0',
     11  'version' => '5.0.0',
    1212);
    1313?>
  • extensions/floPure/tools/floPure.class.php

    r3585 r3586  
    4747                                                  $msg=l10n('theme_update_needed_1').$themeconf['theme'].l10n('theme_update_needed_2').$themeconf['eid'].l10n('theme_update_needed_3').$themeconf['theme'].l10n('theme_update_needed_4');
    4848                                                  $template->append('header_msgs', $msg);
    49                                                   $this->is_nutd[]=$themeconf['theme'];
     49                                                  $this->is_nutd[$themeconf['theme']]=$themeconf['version'];
    5050                                          }
    5151                                  }
     
    115115                if (!is_array($names))
    116116                {
     117                        global $template;
    117118                        $template->assign(
    118119                                array(
     
    125126                        global $template, $user;
    126127                        load_language('template.lang', PHPWG_ROOT_PATH.'template/floPure/tools/');
    127                         foreach($names as $name)
     128                        $r_names=$names;
     129                        foreach($names as $name => $version)
    128130                        {
    129131                                if ($name=='floPure')
    130132                                {
    131                                         $template->append('header_msgs', l10n('floPure_update_needed'));
     133                                        include(PHPWG_ROOT_PATH.'template/floPure/tools/version.conf.php');
     134                                        if ($this->floPure_version_compare($version, $floPure_conf['version']))
     135                                        {
     136                                                $template->append('header_msgs', l10n('floPure_update_needed'));
     137                                        }
     138                                        else
     139                                        {
     140                                                $p=array_search($name,array_keys($r_names));
     141                                                array_splice ($r_names,$p,1);
     142                                        }
     143                                       
    132144                                }
    133145                                else
     
    136148                                        {
    137149                                                include(PHPWG_ROOT_PATH.'template/floPure/theme/'.$name.'/themeconf.inc.php');
    138                                                 $msg=l10n('theme_update_needed_1').$themeconf['theme'].l10n('theme_update_needed_2').$themeconf['eid'].l10n('theme_update_needed_3').$themeconf['theme'].l10n('theme_update_needed_4');
    139                                                 $template->append('header_msgs', $msg);
     150                                                if ($this->floPure_version_compare($version, $themeconf['version']))
     151                                                {
     152                                                        $msg=l10n('theme_update_needed_1').$themeconf['theme'].l10n('theme_update_needed_2').$themeconf['eid'].l10n('theme_update_needed_3').$themeconf['theme'].l10n('theme_update_needed_4');
     153                                                        $template->append('header_msgs', $msg);
     154                                                }
     155                                                else
     156                                                {
     157                                                        $p=array_search($name,array_keys($r_names));
     158                                                        array_splice ($r_names,$p,1);
     159                                                }
    140160                                        }
    141161                                }
    142162                        }
    143163                }//else
    144                 return true;
    145                                                
     164               
     165        pwg_set_session_var('flopure_array_version',$r_names);
    146166        }
    147167}
Note: See TracChangeset for help on using the changeset viewer.