fixed/simplified util2 file paths

This commit is contained in:
following
2013-06-12 14:38:41 +02:00
parent 8ebcfc7fc3
commit 05910557c1
3 changed files with 3 additions and 7 deletions

View File

@ -11,11 +11,7 @@
*
***************************************************************************/
$opt['rootpath'] = '../../';
// chdir to proper directory (needed for cronjobs)
chdir(substr(realpath($_SERVER['PHP_SELF']), 0, strrpos(realpath($_SERVER['PHP_SELF']), '/')));
$opt['rootpath'] = dirname(__FILE__) . '/../../';
require($opt['rootpath'] . 'lib2/cli.inc.php');
// test for user who runs the cronjob

View File

@ -10,7 +10,7 @@
* Data import functions are in util2/cron/modules/geokrety.class.php.
***************************************************************************/
$opt['rootpath'] = '../../';
$opt['rootpath'] = dirname(__FILE__) . '/../../';
require_once($opt['rootpath'] . 'lib2/cli.inc.php');
$itemwps = array();

View File

@ -10,7 +10,7 @@
* Data import functions are in util2/cron/modules/geokrety.class.php.
***************************************************************************/
$opt['rootpath'] = '../../';
$opt['rootpath'] = dirname(__FILE__) . '/../../';
require_once($opt['rootpath'] . 'lib2/cli.inc.php');
if (count($argv) != 2 || $argv[1] != 'run')