fixes #1277 ability to activate plugin link only for webmasters

This commit is contained in:
plegall
2021-01-06 15:03:09 +01:00
parent 4e1ab21028
commit d71d69dbe7

View File

@@ -317,9 +317,21 @@ DELETE FROM '. PLUGINS_TABLE .'
{
$plugin['author uri'] = trim($val[1]);
}
if (preg_match("/Has Settings:\\s*(true|True)/", $plg_data, $val))
if (preg_match("/Has Settings:\\s*([Tt]rue|[Ww]ebmaster)/", $plg_data, $val))
{
$plugin['hasSettings'] = true;
if (strtolower($val[1]) == 'webmaster')
{
global $user;
if ('webmaster' == $user['status'])
{
$plugin['hasSettings'] = true;
}
}
else
{
$plugin['hasSettings'] = true;
}
}
if (!empty($plugin['uri']) and strpos($plugin['uri'] , 'extension_view.php?eid='))
{