summaryrefslogtreecommitdiffstats
path: root/lib/helper.php
diff options
context:
space:
mode:
authorGeorg Ehrke <dev@georgswebsite.de>2012-04-18 08:20:51 +0200
committerGeorg Ehrke <dev@georgswebsite.de>2012-04-18 08:20:51 +0200
commit3e0e6e35f4fa638dd42bd5adc3b26e078bf3d081 (patch)
treed1c6b4ba110d4bdcd4036e58ba10ed287024ce9a /lib/helper.php
parent69ee0efc0b355c33ec566cffb36c4b0dc429c338 (diff)
downloadnextcloud-server-3e0e6e35f4fa638dd42bd5adc3b26e078bf3d081.tar.gz
nextcloud-server-3e0e6e35f4fa638dd42bd5adc3b26e078bf3d081.zip
open app thru index.php
Diffstat (limited to 'lib/helper.php')
-rwxr-xr-xlib/helper.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/helper.php b/lib/helper.php
index 412f0e6b764..52278f5c3a2 100755
--- a/lib/helper.php
+++ b/lib/helper.php
@@ -520,4 +520,15 @@ class OC_Helper {
return $newname;
}
+
+ /*
+ * 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;
+ }
}