This commit is contained in:
Abdulrahman
2019-05-16 02:45:51 +03:00
parent 93e60fdda2
commit d7aebe2e55
2 changed files with 3 additions and 5 deletions

View File

@@ -113,7 +113,7 @@ switch ($case):
$available_plugins = [];
while (false !== ($folder_name = readdir($dh)))
{
if (file_exists(PATH . KLEEJA_PLUGINS_FOLDER . '/' . $folder_name) && preg_match('/[a-z0-9_.]{3,}/', $folder_name))
if (is_dir(PATH . KLEEJA_PLUGINS_FOLDER . '/' . $folder_name) && preg_match('/[a-z0-9_.]{3,}/', $folder_name))
{
if (empty($installed_plugins[$folder_name]))
{

View File

@@ -61,9 +61,8 @@ case 'store':
{
while (false !== ($folder_name = readdir($dh)))
{
if (file_exists(PATH . 'styles/' . $folder_name) && preg_match('/[a-z0-9_.]{3,}/', $folder_name))
if (is_dir(PATH . 'styles/' . $folder_name) && preg_match('/[a-z0-9_.]{3,}/', $folder_name))
{
//info
$style_info_arr = [
'name' => $folder_name,
@@ -72,7 +71,6 @@ case 'store':
'version' => ''
];
if (($style_info = kleeja_style_info($folder_name)) != false)
{
foreach (['name', 'desc', 'copyright', 'version'] as $InfoKey)
@@ -194,7 +192,7 @@ case 'select':
//
if (($style_info = kleeja_style_info($style_name)) != false)
{
if (isset($style_info['depend_on']) && ! file_exists(PATH . 'styles/' . $style_info['depend_on']))
if (isset($style_info['depend_on']) && ! is_dir(PATH . 'styles/' . $style_info['depend_on']))
{
kleeja_admin_err(sprintf($lang['DEPEND_ON_NO_STYLE_ERR'], $style_info['depend_on']));
}