Commit d589e5d4 authored by Manfred Kutas's avatar Manfred Kutas

ZP-1156 Calling z-push-admin/z-push-top from the kopano backend dir

results in php traceback.

Released under the Affero GNU General Public License (AGPL) version 3.
parent 8f2565d4
...@@ -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