]> git.wh0rd.org - tt-rss.git/commitdiff
Allow update.php to be run from outside of the main directory
authorJohn Kristensen <jkristen@theintraweb.net>
Wed, 9 Feb 2011 01:50:47 +0000 (12:50 +1100)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 9 Feb 2011 11:52:14 +0000 (14:52 +0300)
 * Change the update.php working directory to be the main tt-rss application
   directory so that the script can be run from anywhere without problems.
   Useful for adding the update.php script to cron.

update.php

index e0c46027383a7a1d28466bdd4c1a0d3fd397944e..6be19473fb9ea48a8033326aacae3bd5c3e5d164 100755 (executable)
@@ -2,6 +2,7 @@
 <?php
        define('DISABLE_SESSIONS', true);
 
+       chdir(dirname($_SERVER['SCRIPT_NAME']));
        require_once "functions.php";
        require_once "sanity_check.php";
        require_once "config.php";