Index: /extensions/floPure/header.tpl
===================================================================
--- /extensions/floPure/header.tpl (revision 3585)
+++ /extensions/floPure/header.tpl (revision 3586)
@@ -74,6 +74,5 @@
{php}
-if (is_admin() and !(pwg_get_session_var('flopure_checked_version')) )
-//if (is_admin())
+if (is_admin() and !(pwg_get_session_var('flopure_array_version')) and !(pwg_get_session_var('flopure_checked_version')) )
{
global $template, $page;
@@ -87,20 +86,19 @@
{
$template->append('header_msgs', l10n('floPure_update_needed'));
- $name_is_nutd[]='floPure';
+ $name_is_nutd['floPure']=$floPure_conf['version'];
+ //$name_is_nutd['version'][]=$floPure_conf['version'];
}
$floPure->theme_version_search(PHPWG_ROOT_PATH.'template/floPure/theme');
- $name_is_nutd=array_merge($name_is_nutd,$floPure->is_nutd);
- pwg_set_session_var('flopure_checked_version',$name_is_nutd);
- foreach($name_is_nutd as $i)
+ $name_is_nutd= $name_is_nutd + $floPure->is_nutd;
+ pwg_set_session_var('flopure_array_version',$name_is_nutd);
+ pwg_set_session_var('flopure_checked_version', true);
+ /*foreach($name_is_nutd as $cle => $val )
{
- $template->append('test_a', array( 'A'=> $i) );
- }
-
-
- //pwg_set_session_var('flopure_checked_version');
+ $template->append('test_a', array( 'A'=>$cle,'B'=>$val, ) );
+ }*/
}
-else if ( pwg_get_session_var('flopure_checked_version') )
+else if (is_admin() and pwg_get_session_var('flopure_array_version') )
{
@@ -110,9 +108,10 @@
load_language('template.lang', PHPWG_ROOT_PATH.'template/floPure/tools/');
$floPure = new floPure();
- $floPure->display(pwg_get_session_var('flopure_checked_version'));
- foreach(pwg_get_session_var('flopure_checked_version') as $i)
+ $floPure->display(pwg_get_session_var('flopure_array_version'));
+ /*foreach(pwg_get_session_var('flopure_checked_version') as $cle => $val )
{
- $template->append('test_a', array( 'A'=> $i) );
- }
+ $template->append('test_a', array( 'A'=>$cle,'B'=>$val, ) );
+ }*/
+ $template->append('test_a', array( 'A'=>'a','B'=>'a', ) );
}
//pwg_unset_session_var('flopure_checked_version');
Index: /extensions/floPure/theme/autumn/themeconf.inc.php
===================================================================
--- /extensions/floPure/theme/autumn/themeconf.inc.php (revision 3585)
+++ /extensions/floPure/theme/autumn/themeconf.inc.php (revision 3586)
@@ -9,5 +9,5 @@
'local_head' => '',
'eid' => '233',
- 'version' => '1.0.0',
+ 'version' => '5.0.1',
);
?>
Index: /extensions/floPure/theme/clear_blue/themeconf.inc.php
===================================================================
--- /extensions/floPure/theme/clear_blue/themeconf.inc.php (revision 3585)
+++ /extensions/floPure/theme/clear_blue/themeconf.inc.php (revision 3586)
@@ -9,5 +9,5 @@
'local_head' => '',
'eid' => '143',
- 'version' => '2.0.0',
+ 'version' => '5.0.0',
);
?>
Index: /extensions/floPure/tools/floPure.class.php
===================================================================
--- /extensions/floPure/tools/floPure.class.php (revision 3585)
+++ /extensions/floPure/tools/floPure.class.php (revision 3586)
@@ -47,5 +47,5 @@
$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');
$template->append('header_msgs', $msg);
- $this->is_nutd[]=$themeconf['theme'];
+ $this->is_nutd[$themeconf['theme']]=$themeconf['version'];
}
}
@@ -115,4 +115,5 @@
if (!is_array($names))
{
+ global $template;
$template->assign(
array(
@@ -125,9 +126,20 @@
global $template, $user;
load_language('template.lang', PHPWG_ROOT_PATH.'template/floPure/tools/');
- foreach($names as $name)
+ $r_names=$names;
+ foreach($names as $name => $version)
{
if ($name=='floPure')
{
- $template->append('header_msgs', l10n('floPure_update_needed'));
+ include(PHPWG_ROOT_PATH.'template/floPure/tools/version.conf.php');
+ if ($this->floPure_version_compare($version, $floPure_conf['version']))
+ {
+ $template->append('header_msgs', l10n('floPure_update_needed'));
+ }
+ else
+ {
+ $p=array_search($name,array_keys($r_names));
+ array_splice ($r_names,$p,1);
+ }
+
}
else
@@ -136,12 +148,20 @@
{
include(PHPWG_ROOT_PATH.'template/floPure/theme/'.$name.'/themeconf.inc.php');
- $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');
- $template->append('header_msgs', $msg);
+ if ($this->floPure_version_compare($version, $themeconf['version']))
+ {
+ $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');
+ $template->append('header_msgs', $msg);
+ }
+ else
+ {
+ $p=array_search($name,array_keys($r_names));
+ array_splice ($r_names,$p,1);
+ }
}
}
}
}//else
- return true;
-
+
+ pwg_set_session_var('flopure_array_version',$r_names);
}
}