Update m_styles.php

the change is in line 75 and 86 .
line 75 : we need to check if the plugin is disable or not ;
line 86 : if the plugin enable then we will make the template default , or dont do it
This commit is contained in:
Mitan Omar
2018-10-17 21:42:44 +02:00
committed by GitHub
parent e73261b5b0
commit b357f55bbb

View File

@@ -72,7 +72,7 @@ if (ip('style_choose') || ig('style_choose'))
$plugins_required = array_map('trim', $plugins_required);
$query = array(
'SELECT' => 'plg_name',
'SELECT' => 'plg_name, plg_disabled',
'FROM' => "{$dbprefix}plugins",
);
@@ -83,7 +83,7 @@ if (ip('style_choose') || ig('style_choose'))
$plugins_required = array_flip($plugins_required);
while ($row = $SQL->fetch_array($result))
{
if (in_array($row['plg_name'], $plugins_required))
if (in_array($row['plg_name'], $plugins_required) and $row['plg_disabled'] != 1)
{
unset($plugins_required[$row['plg_name']]);
}
@@ -232,4 +232,4 @@ if ($dh = @opendir(PATH . 'styles'))
}
@closedir($dh);
}
}