/usr/share/phpmyadmin/libraries/classes/Controllers
NameSizeModeActions
Database/-0755rm
Preferences/-0755rm
Server/-0755rm
Setup/-0755rm
Table/-0755rm
AbstractController.php23990644editdlrm
BrowseForeignersController.php23250644editdlrm
ChangeLogController.php36030644editdlrm
CheckRelationsController.php15120644editdlrm
ColumnController.php9080644editdlrm
ConfigController.php13700644editdlrm
DatabaseController.php2700644editdlrm
ErrorReportController.php60290644editdlrm
ExportController.php240660644editdlrm
ExportTemplateController.php42120644editdlrm
GisDataEditorController.php49060644editdlrm
HomeController.php182490644editdlrm
ImportController.php325370644editdlrm
ImportStatusController.php23130644editdlrm
JavaScriptMessagesController.php374070644editdlrm
LicenseController.php9680644editdlrm
LintController.php17740644editdlrm
LogoutController.php4070644editdlrm
NavigationController.php33350644editdlrm
NormalizationController.php56690644editdlrm
PhpInfoController.php6810644editdlrm
SchemaExportController.php11280644editdlrm
SqlController.php115640644editdlrm
TableController.php8670644editdlrm
ThemesController.php7760644editdlrm
TransformationOverviewController.php17920644editdlrm
TransformationWrapperController.php74800644editdlrm
UserPasswordController.php33510644editdlrm
VersionCheckController.php12410644editdlrm
ViewCreateController.php96220644editdlrm
ViewOperationsController.php33390644editdlrm
Edit: /usr/share/phpmyadmin/libraries/classes/Controllers/ExportTemplateController.php (4212B)
model = $model; $this->relation = $relation; } public function create(): void { global $cfg; $cfgRelation = $this->relation->getRelationsParam(); if (! $cfgRelation['exporttemplateswork']) { return; } $template = ExportTemplate::fromArray([ 'username' => $cfg['Server']['user'], 'exportType' => $_POST['exportType'] ?? '', 'name' => $_POST['templateName'] ?? '', 'data' => $_POST['templateData'] ?? '', ]); $result = $this->model->create($cfgRelation['db'], $cfgRelation['export_templates'], $template); if (is_string($result)) { $this->response->setRequestStatus(false); $this->response->addJSON('message', $result); return; } $templates = $this->model->getAll( $cfgRelation['db'], $cfgRelation['export_templates'], $template->getUsername(), $template->getExportType() ); $this->response->setRequestStatus(true); $this->response->addJSON( 'data', $this->template->render('export/template_options', [ 'templates' => is_array($templates) ? $templates : [], 'selected_template' => $_POST['template_id'] ?? null, ]) ); } public function delete(): void { global $cfg; $cfgRelation = $this->relation->getRelationsParam(); if (! $cfgRelation['exporttemplateswork']) { return; } $result = $this->model->delete( $cfgRelation['db'], $cfgRelation['export_templates'], $cfg['Server']['user'], (int) $_POST['templateId'] ); if (is_string($result)) { $this->response->setRequestStatus(false); $this->response->addJSON('message', $result); return; } $this->response->setRequestStatus(true); } public function load(): void { global $cfg; $cfgRelation = $this->relation->getRelationsParam(); if (! $cfgRelation['exporttemplateswork']) { return; } $template = $this->model->load( $cfgRelation['db'], $cfgRelation['export_templates'], $cfg['Server']['user'], (int) $_POST['templateId'] ); if (! $template instanceof ExportTemplate) { $this->response->setRequestStatus(false); $this->response->addJSON('message', $template); return; } $this->response->setRequestStatus(true); $this->response->addJSON('data', $template->getData()); } public function update(): void { global $cfg; $cfgRelation = $this->relation->getRelationsParam(); if (! $cfgRelation['exporttemplateswork']) { return; } $template = ExportTemplate::fromArray([ 'id' => (int) $_POST['templateId'], 'username' => $cfg['Server']['user'], 'data' => $_POST['templateData'], ]); $result = $this->model->update($cfgRelation['db'], $cfgRelation['export_templates'], $template); if (is_string($result)) { $this->response->setRequestStatus(false); $this->response->addJSON('message', $result); return; } $this->response->setRequestStatus(true); } }