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:
authorJason <jason.daurus@gmail.com>2015-07-20 19:15:08 +0300
committerJason <jason.daurus@gmail.com>2015-07-23 06:29:53 +0300
commit66361530713fcf99b9e090b82ccd016dc3c287b2 (patch)
tree28979a0d42010532affb6740b4b6388ab7cd49cf /tbl_select.php
parent465a9ed5f2dd649e96c8d45bfa109e959a39fcd8 (diff)
Resolve conflicts from upstream
Signed-off-by: Jason <jason.daurus@gmail.com>
Diffstat (limited to 'tbl_select.php')
-rw-r--r--tbl_select.php94
1 files changed, 15 insertions, 79 deletions
diff --git a/tbl_select.php b/tbl_select.php
index 84d82784b1..c10b737212 100644
--- a/tbl_select.php
+++ b/tbl_select.php
@@ -13,86 +13,22 @@
* Gets some core libraries
*/
require_once 'libraries/common.inc.php';
-require_once 'libraries/mysql_charsets.inc.php';
-require_once 'libraries/TableSearch.class.php';
-require_once 'libraries/sql.lib.php';
-require_once 'libraries/bookmark.lib.php';
+include_once 'libraries/tbl_common.inc.php';
+require_once 'libraries/di/Container.class.php';
+require_once 'libraries/controllers/TableSearchController.class.php';
-$response = PMA_Response::getInstance();
-$header = $response->getHeader();
-$scripts = $header->getScripts();
-$scripts->addFile('makegrid.js');
-$scripts->addFile('sql.js');
-$scripts->addFile('tbl_select.js');
-$scripts->addFile('tbl_change.js');
-$scripts->addFile('jquery/jquery-ui-timepicker-addon.js');
-$scripts->addFile('jquery/jquery.uitablefilter.js');
-$scripts->addFile('gis_data_editor.js');
+use PMA\DI;
-$table_search = new PMA_TableSearch($db, $table, "normal");
+$container = DI\Container::getDefaultContainer();
+$container->factory('PMA\Controllers\Table\TableSearchController');
+$container->alias('TableSearchController', 'PMA\Controllers\Table\TableSearchController');
-// Request to column min-max value.
-if (isset($_REQUEST['range_search'])) {
- $response = PMA_Response::getInstance();
- $min_max = $table_search->getColumnMinMax($_REQUEST['column']);
- $response->addJSON('column_data', $min_max);
- exit;
-}
+/* Define dependencies for the concerned controller */
+$dependency_definitions = array(
+ 'searchType' => 'normal',
+ 'url_query' => &$url_query
+);
-/**
- * No selection criteria received -> display the selection form
- */
-if (! isset($_POST['columnsToDisplay']) && ! isset($_POST['displayAllColumns'])) {
- // Gets some core libraries
- include_once 'libraries/tbl_common.inc.php';
- //$err_url = 'tbl_select.php' . $err_url;
- $url_query .= '&amp;goto=tbl_select.php&amp;back=tbl_select.php';
- /**
- * Gets table's information
- */
- include_once 'libraries/tbl_info.inc.php';
-
- if (! isset($goto)) {
- $goto = PMA_Util::getScriptNameForOption(
- $GLOBALS['cfg']['DefaultTabTable'], 'table'
- );
- }
- // Defines the url to return to in case of error in the next sql statement
- $err_url = $goto . PMA_URL_getCommon(array('db' => $db, 'table' => $table));
- // Displays the table search form
- $response->addHTML($table_search->getSecondaryTabs());
- $response->addHTML($table_search->getSelectionForm($goto));
-
-} else {
-
- /**
- * Selection criteria have been submitted -> do the work
- */
- $sql_query = $table_search->buildSqlQuery();
-
- /**
- * Parse and analyze the query
- */
- include_once 'libraries/parse_analyze.inc.php';
-
- PMA_executeQueryAndSendQueryResponse(
- $analyzed_sql_results, // analyzed_sql_results
- false, // is_gotofile
- $db, // db
- $table, // table
- null, // find_real_end
- null, // sql_query_for_bookmark
- null, // extra_data
- null, // message_to_show
- null, // message
- null, // sql_data
- $GLOBALS['goto'], // goto
- $pmaThemeImage, // pmaThemeImage
- null, // disp_query
- null, // disp_message
- null, // query_type
- $sql_query, // sql_query
- null, // selectedTables
- null // complete_query
- );
-}
+/** @var PMA\Controllers\TableSearchController $controller */
+$controller = $container->get('TableSearchController', $dependency_definitions);
+$controller->indexAction();