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-05 23:25:57 +0300
committerMaurício Meneghini Fauth <mauriciofauth@gmail.com>2018-02-06 23:47:56 +0300
commite0b9ff1c00db2cfc7e6590000eabc8a94e2fcb42 (patch)
tree6298dd993ba8e17e3e4db7ce2a59a867c28a123c /tbl_change.php
parentde93175fcaa92cd3845e3c27f60fbe6993a027c0 (diff)
Replace static methods with instance methods
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
Diffstat (limited to 'tbl_change.php')
-rw-r--r--tbl_change.php32
1 files changed, 17 insertions, 15 deletions
diff --git a/tbl_change.php b/tbl_change.php
index 1d5428f983..6ffdaeffad 100644
--- a/tbl_change.php
+++ b/tbl_change.php
@@ -24,13 +24,15 @@ PageSettings::showGroup('Edit');
*/
require_once 'libraries/db_table_exists.inc.php';
+$insertEdit = new InsertEdit();
+
/**
* Determine whether Insert or Edit and set global variables
*/
list(
$insert_mode, $where_clause, $where_clause_array, $where_clauses,
$result, $rows, $found_unique_key, $after_insert
-) = InsertEdit::determineInsertOrEdit(
+) = $insertEdit->determineInsertOrEdit(
isset($where_clause) ? $where_clause : null, $db, $table
);
// Increase number of rows if unsaved rows are more
@@ -52,11 +54,11 @@ if (empty($GLOBALS['goto'])) {
}
-$_url_params = InsertEdit::getUrlParameters($db, $table);
+$_url_params = $insertEdit->getUrlParameters($db, $table);
$err_url = $GLOBALS['goto'] . Url::getCommon($_url_params);
unset($_url_params);
-$comments_map = InsertEdit::getCommentsMap($db, $table);
+$comments_map = $insertEdit->getCommentsMap($db, $table);
/**
* START REGULAR OUTPUT
@@ -82,13 +84,13 @@ if (! empty($disp_message)) {
$response->addHTML(Util::getMessage($disp_message, null));
}
-$table_columns = InsertEdit::getTableColumns($db, $table);
+$table_columns = $insertEdit->getTableColumns($db, $table);
// retrieve keys into foreign fields, if any
$foreigners = Relation::getForeigners($db, $table);
// Retrieve form parameters for insert/edit form
-$_form_params = InsertEdit::getFormParametersForInsertForm(
+$_form_params = $insertEdit->getFormParametersForInsertForm(
$db, $table, $where_clauses, $where_clause_array, $err_url
);
@@ -115,13 +117,13 @@ $biggest_max_file_size = 0;
$url_params['db'] = $db;
$url_params['table'] = $table;
-$url_params = InsertEdit::urlParamsInEditMode(
+$url_params = $insertEdit->urlParamsInEditMode(
$url_params, $where_clause_array, $where_clause
);
$has_blob_field = false;
foreach ($table_columns as $column) {
- if (InsertEdit::isColumn(
+ if ($insertEdit->isColumn(
$column,
array('blob', 'tinyblob', 'mediumblob', 'longblob')
)) {
@@ -132,7 +134,7 @@ foreach ($table_columns as $column) {
//Insert/Edit form
//If table has blob fields we have to disable ajax.
-$html_output .= InsertEdit::getHtmlForInsertEditFormHeader($has_blob_field, $is_upload);
+$html_output .= $insertEdit->getHtmlForInsertEditFormHeader($has_blob_field, $is_upload);
$html_output .= Url::getHiddenInputs($_form_params);
@@ -145,11 +147,11 @@ if (! $cfg['ShowFunctionFields'] || ! $cfg['ShowFieldTypesInDataEditView']) {
}
if (! $cfg['ShowFunctionFields']) {
- $html_output .= InsertEdit::showTypeOrFunction('function', $url_params, false);
+ $html_output .= $insertEdit->showTypeOrFunction('function', $url_params, false);
}
if (! $cfg['ShowFieldTypesInDataEditView']) {
- $html_output .= InsertEdit::showTypeOrFunction('type', $url_params, false);
+ $html_output .= $insertEdit->showTypeOrFunction('type', $url_params, false);
}
$GLOBALS['plugin_scripts'] = array();
@@ -171,10 +173,10 @@ foreach ($rows as $row_id => $current_row) {
$checked = false;
}
if ($insert_mode && $row_id > 0) {
- $html_output .= InsertEdit::getHtmlForIgnoreOption($row_id, $checked);
+ $html_output .= $insertEdit->getHtmlForIgnoreOption($row_id, $checked);
}
- $html_output .= InsertEdit::getHtmlForInsertEditRow(
+ $html_output .= $insertEdit->getHtmlForInsertEditRow(
$url_params, $table_columns, $comments_map, $timestamp_seen,
$current_result, $chg_evt_handler, $jsvkey, $vkey, $insert_mode,
$current_row, $o_rows, $tabindex, $columns_cnt,
@@ -191,7 +193,7 @@ if (! isset($after_insert)) {
}
//action panel
-$html_output .= InsertEdit::getActionsPanel(
+$html_output .= $insertEdit->getActionsPanel(
$where_clause, $after_insert, $tabindex,
$tabindex_for_value, $found_unique_key
);
@@ -204,12 +206,12 @@ if ($biggest_max_file_size > 0) {
}
$html_output .= '</form>';
-$html_output .= InsertEdit::getHtmlForGisEditor();
+$html_output .= $insertEdit->getHtmlForGisEditor();
// end Insert/Edit form
if ($insert_mode) {
//Continue insertion form
- $html_output .= InsertEdit::getContinueInsertionForm(
+ $html_output .= $insertEdit->getContinueInsertionForm(
$table, $db, $where_clause_array, $err_url
);
}