From: Georg Ehrke Date: Wed, 18 Apr 2012 10:20:09 +0000 (+0200) Subject: Merge branch 'master' into movable_apps X-Git-Tag: v4.0.0beta~168^2~55 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=eb29c577c2b2378c1983e55ddaf4955ad9ae7fe2;p=nextcloud-server.git Merge branch 'master' into movable_apps --- eb29c577c2b2378c1983e55ddaf4955ad9ae7fe2 diff --cc lib/helper.php index 52278f5c3a2,eed94917767..61a57ec27e3 --- a/lib/helper.php +++ b/lib/helper.php @@@ -518,17 -521,6 +521,17 @@@ class OC_Helper $counter++; } - return $newname; + return $newpath; } + + /* + * checks if $sub is a subdirectory of $parent + * + * @param $sub + * @param $parent + * @return bool + */ + public static function issubdirectory($sub, $parent){ + return (substr(realpath($sub), 0, strlen(realpath($parent))) == realpath($parent))?true:false; + } }