Allow update.php to be run from outside of the main directory

* 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.
This commit is contained in:
John Kristensen 2011-02-09 12:50:47 +11:00 committed by Andrew Dolgov
parent 8e57cfbeb3
commit d195055341
1 changed files with 1 additions and 0 deletions

View File

@ -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";