From 77122a32b244ebf7d8ad14d001bd05a4a6a83f91 Mon Sep 17 00:00:00 2001 From: conory Date: Wed, 9 Oct 2019 23:28:23 +0900 Subject: [PATCH] =?UTF-8?q?is=5Fcommand()=20=EB=8C=80=EC=B2=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/framework/storage.php | 12 ++++++++++++ common/functions.php | 19 ------------------- modules/file/file.admin.view.php | 2 +- modules/file/file.controller.php | 4 ++-- modules/file/file.model.php | 4 ++-- modules/file/file.view.php | 2 +- 6 files changed, 18 insertions(+), 25 deletions(-) diff --git a/common/framework/storage.php b/common/framework/storage.php index 2d4a97fbd..5ececc063 100644 --- a/common/framework/storage.php +++ b/common/framework/storage.php @@ -143,6 +143,18 @@ class Storage return @self::exists($path) && @is_writable($path); } + /** + * Check if the given path is executable. + * + * @param string $path + * @return bool + */ + public static function isExecutable($path) + { + $path = rtrim($path, '/\\'); + return @self::exists($path) && @is_executable($path); + } + /** * Get the size of a file. * diff --git a/common/functions.php b/common/functions.php index 36e4754c3..0e14e729d 100644 --- a/common/functions.php +++ b/common/functions.php @@ -691,23 +691,4 @@ function is_empty_html_content($str) $str = strip_tags($str, '