mirror of
https://github.com/e107inc/e107.git
synced 2025-08-13 10:04:35 +02:00
Separated admin/menu.php into a separate class. Added instant menuPreset activation in theme-manager plus other small gui enhances. Added iconpool - work in progress.
Iconpool: installed plugins containing png files in their image folder with a *_16, *_32, *_48 etc name ending will automatically be added to the iconpool. This central pool will be available in all areas of admin where we choose icons. eg. download category, links, event-calendar, links-page etc etc.
This commit is contained in:
35
class2.php
35
class2.php
@@ -9,8 +9,8 @@
|
||||
* General purpose file
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/class2.php,v $
|
||||
* $Revision: 1.107 $
|
||||
* $Date: 2009-07-12 14:44:56 $
|
||||
* $Revision: 1.108 $
|
||||
* $Date: 2009-07-16 02:55:18 $
|
||||
* $Author: e107coders $
|
||||
*
|
||||
*/
|
||||
@@ -423,6 +423,20 @@ $e107->set_base_path();
|
||||
// extract menu prefs
|
||||
$menu_pref = unserialize(stripslashes($sysprefs->get('menu_pref')));
|
||||
|
||||
// extract iconpool
|
||||
if($tmp = ecache::retrieve_sys('IconPool', 24 * 60, true))
|
||||
{
|
||||
$iconpool = $tmp;
|
||||
}
|
||||
else
|
||||
{
|
||||
if($iconData= $sysprefs->get('IconPool'))
|
||||
{
|
||||
ecache::set_sys('IconPool', $iconData);
|
||||
$iconpool = $eArrayStorage->ReadArray($iconData);
|
||||
}
|
||||
}
|
||||
|
||||
$sql->db_Mark_Time('(Extracting Core Prefs Done)');
|
||||
|
||||
//
|
||||
@@ -1349,7 +1363,7 @@ function get_user_data($uid, $extra = '')
|
||||
|
||||
function save_prefs($table = 'core', $uid = USERID, $row_val = '')
|
||||
{
|
||||
global $pref, $user_pref, $tp, $PrefCache, $sql, $eArrayStorage, $theme_pref;
|
||||
global $pref, $user_pref, $tp, $PrefCache, $sql, $eArrayStorage, $theme_pref, $iconpool;
|
||||
if ($table == 'core')
|
||||
{
|
||||
if ($row_val == '')
|
||||
@@ -1371,6 +1385,21 @@ function save_prefs($table = 'core', $uid = USERID, $row_val = '')
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif($table == "iconpool")
|
||||
{
|
||||
// $sql->db_Select_gen("REPLACE INTO `#core` (e107_name,e107_value) values ('IconPool_Backup', '".addslashes($PrefCache)."') ");
|
||||
$_iconpool = $tp->toDB($iconpool, true, true);
|
||||
|
||||
if($sql->db_Select_gen("REPLACE INTO `#core` (e107_name,e107_value) values ('IconPool', '".$eArrayStorage->WriteArray($_iconpool)."') "))
|
||||
{
|
||||
ecache::clear_sys('IconPool');
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
elseif($table == "theme")
|
||||
{
|
||||
$pref['sitetheme_pref'] = $theme_pref;
|
||||
|
Reference in New Issue
Block a user