From d7aebe2e55d0c6719ea0877b7e016488b6974320 Mon Sep 17 00:00:00 2001 From: Abdulrahman Date: Thu, 16 May 2019 02:45:51 +0300 Subject: [PATCH] fixes --- includes/adm/j_plugins.php | 2 +- includes/adm/m_styles.php | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/includes/adm/j_plugins.php b/includes/adm/j_plugins.php index 8c009b9..6936868 100755 --- a/includes/adm/j_plugins.php +++ b/includes/adm/j_plugins.php @@ -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])) { diff --git a/includes/adm/m_styles.php b/includes/adm/m_styles.php index 25cf2e9..fba81b5 100755 --- a/includes/adm/m_styles.php +++ b/includes/adm/m_styles.php @@ -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'])); }