]> git.mxchange.org Git - friendica.git/commitdiff
The poller can now be called even inside the "include" directory.
authorMichael Vogel <icarus@dabo.de>
Thu, 19 Feb 2015 09:26:49 +0000 (10:26 +0100)
committerMichael Vogel <icarus@dabo.de>
Thu, 19 Feb 2015 09:26:49 +0000 (10:26 +0100)
include/poller.php

index 68f65999e327432f7466be40a4cb643f56e48de7..f95d3b180787209720373ef8d102f9b41ba4f3cf 100644 (file)
@@ -1,4 +1,15 @@
 <?php
+if (sizeof($_SERVER["argv"]) == 0)
+       die();
+
+$directory = dirname($_SERVER["argv"][0]);
+
+if (substr($directory, 0, 1) != "/")
+       $directory = $_SERVER["PWD"]."/".$directory;
+
+$directory = realpath($directory."/..");
+
+chdir($directory);
 
 require_once("boot.php");