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

version acceptable : with junk code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.