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 @@ ...@@ -28,9 +28,6 @@
require_once 'vendor/autoload.php'; 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 * //TODO resync of single folders of a users device
*/ */
...@@ -40,6 +37,10 @@ include_once(ZPUSH_CONFIG); ...@@ -40,6 +37,10 @@ include_once(ZPUSH_CONFIG);
*/ */
define('BASE_PATH_CLI', dirname(__FILE__) ."/"); define('BASE_PATH_CLI', dirname(__FILE__) ."/");
set_include_path(get_include_path() . PATH_SEPARATOR . BASE_PATH_CLI); 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 { try {
ZPush::CheckConfig(); ZPush::CheckConfig();
ZPushAdminCLI::CheckEnv(); ZPushAdminCLI::CheckEnv();
......
...@@ -28,15 +28,16 @@ ...@@ -28,15 +28,16 @@
require_once 'vendor/autoload.php'; require_once 'vendor/autoload.php';
if (!defined('ZPUSH_CONFIG')) define('ZPUSH_CONFIG', 'config.php');
include_once(ZPUSH_CONFIG);
/************************************************ /************************************************
* MAIN * MAIN
*/ */
declare(ticks = 1); declare(ticks = 1);
define('BASE_PATH_CLI', dirname(__FILE__) ."/"); define('BASE_PATH_CLI', dirname(__FILE__) ."/");
set_include_path(get_include_path() . PATH_SEPARATOR . BASE_PATH_CLI); 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 { try {
ZPush::CheckConfig(); ZPush::CheckConfig();
if (!function_exists("pcntl_signal")) if (!function_exists("pcntl_signal"))
......
...@@ -59,7 +59,7 @@ try { ...@@ -59,7 +59,7 @@ try {
require_once 'vendor/autoload.php'; 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); include_once(ZPUSH_CONFIG);
ZPush::CheckConfig(); ZPush::CheckConfig();
......
...@@ -46,7 +46,7 @@ try { ...@@ -46,7 +46,7 @@ try {
require_once 'vendor/autoload.php'; 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); 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