diff options
Diffstat (limited to 'lib/private/legacy/helper.php')
-rw-r--r-- | lib/private/legacy/helper.php | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/lib/private/legacy/helper.php b/lib/private/legacy/helper.php index b19e58a9e6c..0b9477dacd4 100644 --- a/lib/private/legacy/helper.php +++ b/lib/private/legacy/helper.php @@ -378,32 +378,6 @@ class OC_Helper { } /** - * Checks if $sub is a subdirectory of $parent - * - * @param string $sub - * @param string $parent - * @return bool - */ - public static function isSubDirectory($sub, $parent) { - $realpathSub = realpath($sub); - $realpathParent = realpath($parent); - - // realpath() may return false in case the directory does not exist - // since we can not be sure how different PHP versions may behave here - // we do an additional check whether realpath returned false - if($realpathSub === false || $realpathParent === false) { - return false; - } - - // Check whether $sub is a subdirectory of $parent - if (strpos($realpathSub, $realpathParent) === 0) { - return true; - } - - return false; - } - - /** * Returns an array with all keys from input lowercased or uppercased. Numbered indices are left as is. * * @param array $input The array to work on |