mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
fixes #1277 ability to activate plugin link only for webmasters
This commit is contained in:
@@ -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='))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user