1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 20:00:37 +02:00

Plugin perms render fix.

This commit is contained in:
Cameron
2017-12-02 11:57:27 -08:00
parent 5e4c172c2f
commit ecf22cb1ba
3 changed files with 34 additions and 15 deletions

View File

@@ -15,6 +15,11 @@ if (!defined('e107_INIT'))
require_once("../class2.php");
}
if (!getperms('4|U0|U1|U2|U3'))
{
e107::redirect('admin');
exit;
}
e107::coreLan('user');
e107::coreLan('users', true);
@@ -52,7 +57,7 @@ class users_admin extends e_admin_dispatcher
protected $adminMenu = array(
'main/list' => array('caption'=> LAN_MANAGE, 'perm' => '0'),
'main/list' => array('caption'=> LAN_MANAGE, 'perm' => '0|4'),
'main/add' => array('caption'=> LAN_USER_QUICKADD, 'perm' => '4|U0|U1'),
'main/prefs' => array('caption'=> LAN_OPTIONS, 'perm' => '4|U2'),
'main/ranks' => array('caption'=> LAN_USER_RANKS, 'perm' => '4|U3'),

View File

@@ -4562,7 +4562,11 @@ class e107plugin
$xml = e107::getXml();
$mes = e107::getMessage();
e107::getDebug()->log("Legacy Plugin Parse (xml): ".$plugName);
if(E107_DEBUG_LEVEL > 0)
{
$dbgArr = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS,2);
e107::getDebug()->log("Legacy Plugin Parse (xml): ".$plugName. print_a($dbgArr[1],true));
}
// $xml->setOptArrayTags('extendedField,userclass,menuLink,commentID'); // always arrays for these tags.
// $xml->setOptStringTags('install,uninstall,upgrade');

View File

@@ -1573,12 +1573,29 @@ class e_userperms
);
$sql = e107::getDb('sql2');
$tp = e107::getParser();
// $sql = e107::getDb('sql2');
// $tp = e107::getParser();
$pg = e107::getPlug();
$installed = $pg->getInstalled();
foreach($installed as $plug=>$version)
{
$pg->load($plug);
$arr = array(
0 => $pg->getName(),
1 => $pg->getIcon(16),
2 => $pg->getIcon(32)
);
$key = "P".$pg->getId();
$this->plugin_perms[$key] = $arr;
}
/*
$plg = e107::getPlugin();
$allPlugins = $plg->getall(1); // Needs all for 'reading' and 'installed' for writing.
$allPlugins = $plg->getall(1); // Needs all for 'reading' and 'installed' for writing.
foreach($allPlugins as $k=>$row2)
{
if($plg->parse_plugin($row2['plugin_path']))
@@ -1589,15 +1606,8 @@ class e_userperms
$this->plugin_perms[("P".$row2['plugin_id'])][2] = $plg->getIcon($row2['plugin_path'],32);
}
}
// echo $plg->getIcon('forum');
// $sql->db_Select("plugin", "*", "plugin_installflag='1'");
// while ($row2 = $sql->db_Fetch())
// {
// $this->plugin_perms[("P".$row2['plugin_id'])] = array($tp->toHTML($row2['plugin_name'], false, 'RAWTEXT,defs'));
// $this->plugin_perms[("P".$row2['plugin_id'])][1] = $plg->getIcon('forum')
// }
*/
asort($this->plugin_perms);