1
0
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:
Cameron
2017-12-02 11:57:27 -08:00
parent 5e4c172c2f
commit ecf22cb1ba
3 changed files with 34 additions and 15 deletions

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);