Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaurício Meneghini Fauth <mauriciofauth@gmail.com>2018-02-15 17:31:04 +0300
committerMaurício Meneghini Fauth <mauriciofauth@gmail.com>2018-02-15 17:31:04 +0300
commitdc04987a68a9656b82c5c664ae5e72b2e5ce6b41 (patch)
tree2d04f657524188783d5550aac5190f788a1f213f /tbl_addfield.php
parentff06650269501c5ed88dcd08135589852926cdde (diff)
Replace static methods with instance methods
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
Diffstat (limited to 'tbl_addfield.php')
-rw-r--r--tbl_addfield.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/tbl_addfield.php b/tbl_addfield.php
index 159090a0e9..c364595667 100644
--- a/tbl_addfield.php
+++ b/tbl_addfield.php
@@ -7,9 +7,11 @@
*/
use PhpMyAdmin\CreateAddField;
+use PhpMyAdmin\Message;
use PhpMyAdmin\Response;
use PhpMyAdmin\Transformations;
use PhpMyAdmin\Url;
+use PhpMyAdmin\Util;
/**
* Get some core libraries
@@ -22,8 +24,7 @@ $scripts = $header->getScripts();
$scripts->addFile('tbl_structure.js');
// Check parameters
-PhpMyAdmin\Util::checkParameters(array('db', 'table'));
-
+Util::checkParameters(array('db', 'table'));
/**
* Defines the url to return to in case of error in a sql statement
@@ -63,7 +64,9 @@ if (isset($_REQUEST['do_save_data'])) {
//tbl_structure.php below
unset($_REQUEST['do_save_data']);
- list($result, $sql_query) = CreateAddField::tryColumnCreationQuery($db, $table, $err_url);
+ $createAddField = new CreateAddField();
+
+ list($result, $sql_query) = $createAddField->tryColumnCreationQuery($db, $table, $err_url);
if ($result === true) {
// Update comment table for mime types [MIME]
@@ -89,17 +92,17 @@ if (isset($_REQUEST['do_save_data'])) {
}
// Go back to the structure sub-page
- $message = PhpMyAdmin\Message::success(
+ $message = Message::success(
__('Table %1$s has been altered successfully.')
);
$message->addParam($table);
$response->addJSON(
'message',
- PhpMyAdmin\Util::getMessage($message, $sql_query, 'success')
+ Util::getMessage($message, $sql_query, 'success')
);
exit;
} else {
- $error_message_html = PhpMyAdmin\Util::mysqlDie(
+ $error_message_html = Util::mysqlDie(
'',
'',
false,