Prepared BMD export for cronjob use
This commit is contained in:
41
scripts/run-bmd-export.php
Executable file
41
scripts/run-bmd-export.php
Executable file
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
//require 'vendor/autoload.php';
|
||||
require("../config/config.php");
|
||||
|
||||
define('FRONKDB_SQLDEBUG',false);
|
||||
error_reporting(E_ALL & ~(E_NOTICE | E_STRICT | E_DEPRECATED));
|
||||
|
||||
require_once(LIBDIR."/mvcfronk/mfRouter/mfRouter.php");
|
||||
require_once(LIBDIR."/mvcfronk/mfBase/mfBaseModel.php");
|
||||
require_once(LIBDIR."/mvcfronk/mfBase/mfBaseController.php");
|
||||
|
||||
$me = new User(1);
|
||||
define("INTERNAL_USER_ID", $me->id);
|
||||
define("INTERNAL_USER_USERNAME", $me->username);
|
||||
|
||||
|
||||
$return = Address::runBmdExport("inc");
|
||||
|
||||
/*
|
||||
if($return === 10) {
|
||||
$this->layout()->setFlash("Export Pfad (".TT_ADDRESS_BMD_EXPORT_PATH.") nicht gefunden!", "error");
|
||||
$this->redirect("Address");
|
||||
}
|
||||
|
||||
if($return === 11) {
|
||||
$this->layout()->setFlash("Keine geänderten Adressdatensätze gefunden. Export abgebrochen.", "warn");
|
||||
$this->redirect("Address");
|
||||
}
|
||||
|
||||
if($return === 19) {
|
||||
$this->layout()->setFlash("Datei ".TT_ADDRESS_BMD_EXPORT_PATH."/".TT_ADDRESS_BMD_EXPORT_FILENAME." konnte nicht gespeichert werden!", "error");
|
||||
$this->redirect("Address");
|
||||
}
|
||||
|
||||
if($return === true) {
|
||||
$this->layout()->setFlash("Adressen erfolgreich exportiert", "success");
|
||||
$this->redirect("Address");
|
||||
}
|
||||
*/
|
||||
Reference in New Issue
Block a user