Commit d958cbd8 authored by Sebastian Kummer's avatar Sebastian Kummer

ZP-929 Added php shebang, don't check if worker exists, just try to

include it.

Released under the Affero GNU General Public License (AGPL) version 3.
parent c217f909
#!/usr/bin/php
<?php <?php
/*********************************************** /***********************************************
* File : gab-sync.php * File : gab-sync.php
...@@ -119,16 +120,10 @@ class GabSyncCLI { ...@@ -119,16 +120,10 @@ class GabSyncCLI {
static public function SetupSyncWorker() { static public function SetupSyncWorker() {
$file = "lib/" .strtolower(SYNCWORKER).".php"; $file = "lib/" .strtolower(SYNCWORKER).".php";
if (!file_exists($file)) { @include_once($file);
self::$errormessage = "SyncWorker file '".$file."' can not be found. Check your configuration.";
return false;
}
else {
include_once($file);
}
if (!class_exists(SYNCWORKER)) { if (!class_exists(SYNCWORKER)) {
self::$errormessage = "SyncWorker file loaded, but class '".SYNCWORKER."' can not be found. Check your implementation."; self::$errormessage = "SyncWorker file loaded, but class '".SYNCWORKER."' can not be found. Check your configuration or implementation.";
} }
else { else {
$s = @constant('SYNCWORKER'); $s = @constant('SYNCWORKER');
......
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