mirror of
https://github.com/Karaka-Management/oms-Exchange.git
synced 2026-01-11 16:48:42 +00:00
crash backup
This commit is contained in:
parent
f7b477eb52
commit
d4e3afb099
|
|
@ -20,13 +20,13 @@ use phpOMS\DataStorage\Database\DatabaseType;
|
|||
use phpOMS\DataStorage\Database\SchemaMapper;
|
||||
use phpOMS\Uri\UriFactory;
|
||||
|
||||
$lang = $this->getData('lang') ?? [];
|
||||
$lang = $this->data['lang'] ?? [];
|
||||
|
||||
// @todo define offset fields
|
||||
// @todo define create job button
|
||||
// @todo show job reference
|
||||
|
||||
$interface = $this->getData('interface');
|
||||
$interface = $this->data['interface'];
|
||||
$settings = $interface->getSettings();
|
||||
|
||||
$currentSetting = $settings[(int) ($this->request->getData('setting') ?? 0)] ?? new NullExchangeSetting();
|
||||
|
|
@ -42,7 +42,7 @@ $currentExportTableFields = [];
|
|||
|
||||
if (!empty($settingData)) {
|
||||
$importConnection = ($settingData['import']['db']['self'] ?? true)
|
||||
? $this->getData('db') ?? new NullConnection()
|
||||
? $this->data['db'] ?? new NullConnection()
|
||||
: ConnectionFactory::create([
|
||||
'db' => $settingData['import']['db']['db'],
|
||||
'host' => $settingData['import']['db']['host'],
|
||||
|
|
@ -52,7 +52,7 @@ if (!empty($settingData)) {
|
|||
'password' => $settingData['import']['db']['password'],
|
||||
]);
|
||||
$exportConnection = ($settingData['export']['db']['self'] ?? true)
|
||||
? $this->getData('db') ?? new NullConnection()
|
||||
? $this->data['db'] ?? new NullConnection()
|
||||
: ConnectionFactory::create([
|
||||
'db' => $settingData['export']['db']['db'],
|
||||
'host' => $settingData['export']['db']['host'],
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ final class ApiController extends Controller
|
|||
];
|
||||
}
|
||||
|
||||
$importer = $this->getImporter((int) $request->getData('id'), $dbData);
|
||||
$importer = $this->getImporter($request->getDataInt('id') ?? 0, $dbData);
|
||||
$import = $importer === null ? [] : $importer->importFromRequest($request, $response);
|
||||
|
||||
if (isset($import['logs'])) {
|
||||
|
|
@ -270,7 +270,7 @@ final class ApiController extends Controller
|
|||
*/
|
||||
public function apiExchangeExport(RequestAbstract $request, HttpResponse $response, mixed $data = null) : void
|
||||
{
|
||||
$exporter = $this->getExporter((int) $request->getData('id'));
|
||||
$exporter = $this->getExporter($request->getDataInt('id') ?? 0);
|
||||
$export = $exporter === null ? [] : $exporter->exportFromRequest($request, $response);
|
||||
|
||||
if (!isset($export['type'], $export['logs'])) {
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ final class BackendController extends Controller
|
|||
$view->setTemplate('/Modules/Exchange/Theme/Backend/exchange-log');
|
||||
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1007001001, $request, $response);
|
||||
|
||||
$log = ExchangeLogMapper::get()->where('id', (int) $request->getData('id'))->execute();
|
||||
$log = ExchangeLogMapper::get()->where('id', $request->getDataInt('id') ?? 0)->execute();
|
||||
$view->data['log'] = $log;
|
||||
|
||||
return $view;
|
||||
|
|
@ -175,7 +175,7 @@ final class BackendController extends Controller
|
|||
->with('source')
|
||||
->with('source/sources')
|
||||
->with('settings')
|
||||
->where('id', (int) $request->getData('id'))
|
||||
->where('id', $request->getDataInt('id') ?? 0)
|
||||
->execute();
|
||||
|
||||
if ($interface->id === 0) {
|
||||
|
|
@ -221,7 +221,7 @@ final class BackendController extends Controller
|
|||
->with('source')
|
||||
->with('source/sources')
|
||||
->with('settings')
|
||||
->where('id', (int) $request->getData('id'))
|
||||
->where('id', $request->getDataInt('id') ?? 0)
|
||||
->execute();
|
||||
|
||||
if ($interface->id === 0) {
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ final class Exporter extends ExporterAbstract
|
|||
$log->type = ExchangeType::EXPORT;
|
||||
$log->message = $this->l11n->getText($request->header->l11n->language, 'Exchange', '', 'LangFileExported');
|
||||
$log->subtype = 'language';
|
||||
$log->exchange = new NullInterfaceManager((int) $request->getData('id'));
|
||||
$log->exchange = new NullInterfaceManager($request->getDataInt('id') ?? 0);
|
||||
|
||||
$result['logs'][] = $log;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ final class Importer extends ImporterAbstract
|
|||
$log->type = ExchangeType::IMPORT;
|
||||
$log->message = $this->l11n->getText($request->header->l11n->language, 'Exchange', '', 'LangFileImported');
|
||||
$log->subtype = 'language';
|
||||
$log->exchange = new NullInterfaceManager((int) $request->getData('id'));
|
||||
$log->exchange = new NullInterfaceManager($request->getDataInt('id') ?? 0);
|
||||
|
||||
$result['logs'][] = $log;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
$lang = $this->getData('lang');
|
||||
$lang = $this->data['lang'];
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6">
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
$lang = $this->getData('lang');
|
||||
$lang = $this->data['lang'];
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6">
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user