Commit 2a5a286f authored by Sebastian Kummer's avatar Sebastian Kummer

Merge pull request #467 in ZP/z-push from...

Merge pull request #467 in ZP/z-push from bugfix/ZP-1156-calling-z-push-admin-z-push-top-from to develop

* commit 'd589e5d4':
  ZP-1156 Calling z-push-admin/z-push-top from the kopano backend dir results in php traceback.
parents 03f0eb6b d589e5d4
......@@ -28,9 +28,6 @@
require_once 'vendor/autoload.php';
if (!defined('ZPUSH_CONFIG')) define('ZPUSH_CONFIG', 'config.php');
include_once(ZPUSH_CONFIG);
/**
* //TODO resync of single folders of a users device
*/
......@@ -40,6 +37,10 @@ include_once(ZPUSH_CONFIG);
*/
define('BASE_PATH_CLI', dirname(__FILE__) ."/");
set_include_path(get_include_path() . PATH_SEPARATOR . BASE_PATH_CLI);
if (!defined('ZPUSH_CONFIG')) define('ZPUSH_CONFIG', BASE_PATH_CLI . 'config.php');
include_once(ZPUSH_CONFIG);
try {
ZPush::CheckConfig();
ZPushAdminCLI::CheckEnv();
......
......@@ -28,15 +28,16 @@
require_once 'vendor/autoload.php';
if (!defined('ZPUSH_CONFIG')) define('ZPUSH_CONFIG', 'config.php');
include_once(ZPUSH_CONFIG);
/************************************************
* MAIN
*/
declare(ticks = 1);
define('BASE_PATH_CLI', dirname(__FILE__) ."/");
set_include_path(get_include_path() . PATH_SEPARATOR . BASE_PATH_CLI);
if (!defined('ZPUSH_CONFIG')) define('ZPUSH_CONFIG', BASE_PATH_CLI . 'config.php');
include_once(ZPUSH_CONFIG);
try {
ZPush::CheckConfig();
if (!function_exists("pcntl_signal"))
......
......@@ -59,7 +59,7 @@ try {
require_once 'vendor/autoload.php';
if (!defined('ZPUSH_CONFIG')) define('ZPUSH_CONFIG', 'config.php');
if (!defined('ZPUSH_CONFIG')) define('ZPUSH_CONFIG', BASE_PATH_CLI . 'config.php');
include_once(ZPUSH_CONFIG);
ZPush::CheckConfig();
......
......@@ -46,7 +46,7 @@ try {
require_once 'vendor/autoload.php';
if (!defined('ZPUSH_CONFIG')) define('ZPUSH_CONFIG', 'config.php');
if (!defined('ZPUSH_CONFIG')) define('ZPUSH_CONFIG', BASE_PATH_CLI . 'config.php');
include_once(ZPUSH_CONFIG);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment