__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?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)
)
);
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| AddIndexController.php | File | 1.86 KB | 0644 |
|
| AddKeyController.php | File | 1.05 KB | 0644 |
|
| BrowseController.php | File | 2.32 KB | 0644 |
|
| CentralColumnsAddController.php | File | 1.55 KB | 0644 |
|
| CentralColumnsRemoveController.php | File | 1.57 KB | 0644 |
|
| ChangeController.php | File | 3.34 KB | 0644 |
|
| FulltextController.php | File | 1.86 KB | 0644 |
|
| MoveColumnsController.php | File | 6.37 KB | 0644 |
|
| PartitioningController.php | File | 10.38 KB | 0644 |
|
| PrimaryController.php | File | 3.65 KB | 0644 |
|
| ReservedWordCheckController.php | File | 1.47 KB | 0644 |
|
| SaveController.php | File | 14.42 KB | 0644 |
|
| SpatialController.php | File | 1.86 KB | 0644 |
|
| UniqueController.php | File | 1.86 KB | 0644 |
|