mirror of
https://github.com/e107inc/e107.git
synced 2025-08-10 16:46:50 +02:00
Plugin perms render fix.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user