Index: /extensions/Icons_Set/admin.php
===================================================================
--- /extensions/Icons_Set/admin.php (revision 10333)
+++ /extensions/Icons_Set/admin.php (revision 10334)
@@ -3,8 +3,9 @@
if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
-global $template, $conf, $user;
+global $template, $conf, $user, $page;
load_language('plugin.lang', ICONSET_PATH);
-$page['infos'] = array();
+//$page['infos'] = array();
+//$page['errors'] = array();
// +-------------------------------------------------------+
@@ -47,5 +48,5 @@
LIMIT 1';
pwg_query($query);
- if (!empty($error_update)) { array_push($page['infos'], l10n('iconset_error_update').$error_update ); }
+ if (!empty($error_update)) { array_push($page['errors'], l10n('iconset_error_update').$error_update ); }
if (!empty($update_ok)) { array_push($page['infos'], l10n('iconset_update_ok').$update_ok ); }
load_conf_from_db();
@@ -123,9 +124,14 @@
continue;
}
- if (!array_key_exists($fs_theme['id'], $conf_themes)) // theme ajouté
+ if (!is_array($conf_themes)) // theme ajouté
{
$info_new_theme.=$theme_id.'
';
$conf_themes[$theme_id]=''; // RAZ
}
+ elseif (!array_key_exists($fs_theme['id'], $conf_themes)) // theme ajouté
+ {
+ $info_new_theme.=$theme_id.'
';
+ $conf_themes[$theme_id]=''; // RAZ
+ }
if (!empty($conf_themes[$theme_id]) and !in_array($conf_themes[$theme_id], $all_icons)) // association thème/icon supprimée
{
@@ -145,5 +151,12 @@
foreach ($all_icons as $iconset) // icones ajoutées
{
- if (!in_array($iconset, $conf_icons))
+ if (is_array($conf_icons))
+ {
+ if (!in_array($iconset, $conf_icons))
+ {
+ $info_new_icon.=$iconset.'
';
+ }
+ }
+ else
{
$info_new_icon.=$iconset.'
';
Index: /extensions/Icons_Set/main.inc.php
===================================================================
--- /extensions/Icons_Set/main.inc.php (revision 10333)
+++ /extensions/Icons_Set/main.inc.php (revision 10334)
@@ -33,5 +33,5 @@
$conf_themes=$conf_iconset['themes'];
$conf_icons=$conf_iconset['icons'];
- if (isset($user['theme']) and array_key_exists($user['theme'], $conf_themes) and !empty($conf_themes[$user['theme']]) and file_exists(ICONS_PATH.$conf_themes[$user['theme']]) )
+ if (isset($user['theme']) and is_array($conf_themes) and array_key_exists($user['theme'], $conf_themes) and !empty($conf_themes[$user['theme']]) and file_exists(ICONS_PATH.$conf_themes[$user['theme']]) )
{
include ICONS_PATH.$conf_themes[$user['theme']];