gl-website-deployer/admin/phpMyAdmin/libraries/classes/Controllers/Database/Structure/AddPrefixController.php

35 lines
802 B
PHP
Raw Normal View History

2024-11-19 08:02:04 +01:00
<?php
declare(strict_types=1);
namespace PhpMyAdmin\Controllers\Database\Structure;
use PhpMyAdmin\Controllers\Database\AbstractController;
use function __;
final class AddPrefixController extends AbstractController
{
public function __invoke(): void
{
global $db;
$selected = $_POST['selected_tbl'] ?? [];
if (empty($selected)) {
$this->response->setRequestStatus(false);
$this->response->addJSON('message', __('No table selected.'));
return;
}
$params = ['db' => $db];
foreach ($selected as $selectedValue) {
$params['selected'][] = $selectedValue;
}
$this->response->disable();
$this->render('database/structure/add_prefix', ['url_params' => $params]);
}
}