mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 20:00:37 +02:00
Optimized Admin Control Panel code.
This commit is contained in:
@@ -229,28 +229,10 @@ class adminstyle_infopanel
|
||||
$myE107 = varset($user_pref['core-infopanel-mye107'], array());
|
||||
if(empty($myE107)) // Set default icons.
|
||||
{
|
||||
$defArray = array(
|
||||
0 => 'e-administrator',
|
||||
1 => 'e-cpage',
|
||||
2 => 'e-frontpage',
|
||||
3 => 'e-mailout',
|
||||
4 => 'e-image',
|
||||
5 => 'e-menus',
|
||||
6 => 'e-meta',
|
||||
7 => 'e-newspost',
|
||||
8 => 'e-plugin',
|
||||
9 => 'e-prefs',
|
||||
10 => 'e-links',
|
||||
11 => 'e-theme',
|
||||
12 => 'e-userclass2',
|
||||
13 => 'e-users',
|
||||
14 => 'e-wmessage'
|
||||
);
|
||||
$user_pref['core-infopanel-mye107'] = $defArray;
|
||||
$user_pref['core-infopanel-mye107'] = e107::getNav()->getDefaultAdminPanelArray();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// "<form method='post' action='".e_SELF."?".e_QUERY."'>";
|
||||
|
||||
$tp->parseTemplate("{SETSTYLE=core-infopanel}");
|
||||
@@ -266,7 +248,7 @@ class adminstyle_infopanel
|
||||
|
||||
foreach ($this->iconlist as $key=>$val)
|
||||
{
|
||||
if (empty($myE107) || in_array($key, $user_pref['core-infopanel-mye107']))
|
||||
if (in_array($key, $user_pref['core-infopanel-mye107']))
|
||||
{
|
||||
$mainPanel .= e107::getNav()->renderAdminButton($val['link'], $val['title'], $val['caption'], $val['perms'], $val['icon_32'], "div");
|
||||
}
|
||||
|
Reference in New Issue
Block a user