Merge pull request #1 from lycofron/cron-wrapper

Switched to dynamic paths
This commit is contained in:
Yannis Theodosis 2018-02-20 22:08:45 +02:00 committed by GitHub
commit cbdde2c49b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

27
import-cron-wrapper.php Normal file → Executable file
View File

@ -3,20 +3,21 @@ namespace Lychee\Modules;
if (php_sapi_name() == "cli") { //Only for CLI if (php_sapi_name() == "cli") { //Only for CLI
require("/var/www/lychee/php/define.php"); require ( __DIR__ . "/php/define.php");
require("/var/www/lychee/php/Modules/Import.php"); require ( LYCHEE . "php/Modules/Album.php");
require("/var/www/lychee/php/Modules/Plugins.php"); require ( LYCHEE . "php/Modules/Import.php");
require("/var/www/lychee/php/Modules/Settings.php"); require ( LYCHEE . "php/Modules/Plugins.php");
require("/var/www/lychee/php/Modules/Database.php"); require ( LYCHEE . "php/Modules/Settings.php");
require("/var/www/lychee/php/Modules/Config.php"); require ( LYCHEE . "php/Modules/Database.php");
require("/var/www/lychee/php/Modules/Validator.php"); require ( LYCHEE . "php/Modules/Config.php");
require("/var/www/lychee/php/Modules/Photo.php"); require ( LYCHEE . "php/Modules/Validator.php");
require("/var/www/lychee/php/Modules/Log.php"); require ( LYCHEE . "php/Modules/Photo.php");
require("/var/www/lychee/php/helpers/hasPermissions.php"); require ( LYCHEE . "php/Modules/Log.php");
require("/var/www/lychee/php/helpers/getExtension.php"); require ( LYCHEE . "php/helpers/hasPermissions.php");
require("/var/www/lychee/php/helpers/generateID.php"); require ( LYCHEE . "php/helpers/getExtension.php");
require ( LYCHEE . "php/helpers/generateID.php");
$import_location='/var/www/lychee/uploads/import/'; $import_location=LYCHEE_UPLOADS_IMPORT;
if (isset($argv[1])) { if (isset($argv[1])) {
$import_location=$argv[1]; $import_location=$argv[1];