summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2015-06-05 17:54:52 +0300
committerAndrew Dolgov <[email protected]>2015-06-05 17:54:52 +0300
commit7c0a2ab2029b98086f02da80adf6a7ebc303fd6f (patch)
tree58edc899451836261149313a5fa2dc133561d954 /include
parentc3dfc1bdb5d227b01f925459c14b63777c34f54d (diff)
pluginhost: allow loading user plugins from plugins.local
Diffstat (limited to 'include')
-rw-r--r--include/functions2.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/functions2.php b/include/functions2.php
index 27b1933d0..4f8a0523b 100644
--- a/include/functions2.php
+++ b/include/functions2.php
@@ -2471,4 +2471,12 @@
array("code" => $code, "message" => $message)));
}
+
+ function abs_to_rel_path($dir) {
+ $tmp = str_replace(dirname(__DIR__), "", $dir);
+
+ if (strlen($tmp) > 0 && substr($tmp, 0, 1) == "/") $tmp = substr($tmp, 1);
+
+ return $tmp;
+ }
?>