From 5bf66662a9bdd62c5bccab15e607cd95cfb8fcab Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Mon, 27 Jul 2020 10:05:23 +0200 Subject: Removed wordpress and phpmyadmin, my server doesn't handle it well and it brings shame on my familly --- srcs/phpmyadmin/libraries/db_table_exists.inc.php | 114 ---------------------- 1 file changed, 114 deletions(-) delete mode 100644 srcs/phpmyadmin/libraries/db_table_exists.inc.php (limited to 'srcs/phpmyadmin/libraries/db_table_exists.inc.php') diff --git a/srcs/phpmyadmin/libraries/db_table_exists.inc.php b/srcs/phpmyadmin/libraries/db_table_exists.inc.php deleted file mode 100644 index 4e6e369..0000000 --- a/srcs/phpmyadmin/libraries/db_table_exists.inc.php +++ /dev/null @@ -1,114 +0,0 @@ - 0) { - $is_db = @$GLOBALS['dbi']->selectDb($db); - } else { - $is_db = false; - } - - if (! $is_db) { - // not a valid db name -> back to the welcome page - if (! defined('IS_TRANSFORMATION_WRAPPER')) { - $response = Response::getInstance(); - if ($response->isAjax()) { - $response->setRequestStatus(false); - $response->addJSON( - 'message', - Message::error(__('No databases selected.')) - ); - } else { - $url_params = ['reload' => 1]; - if (isset($message)) { - $url_params['message'] = $message; - } - if (! empty($sql_query)) { - $url_params['sql_query'] = $sql_query; - } - if (isset($show_as_php)) { - $url_params['show_as_php'] = $show_as_php; - } - Core::sendHeaderLocation( - './index.php' - . Url::getCommonRaw($url_params) - ); - } - exit; - } - } -} // end if (ensures db exists) - -if (empty($is_table) - && ! defined('PMA_SUBMIT_MULT') - && ! defined('TABLE_MAY_BE_ABSENT') -) { - // Not a valid table name -> back to the db_sql.php - - if (strlen($table) > 0) { - $is_table = $GLOBALS['dbi']->getCachedTableContent([$db, $table], false); - - if (! $is_table) { - $_result = $GLOBALS['dbi']->tryQuery( - 'SHOW TABLES LIKE \'' - . $GLOBALS['dbi']->escapeString($table) . '\';', - PhpMyAdmin\DatabaseInterface::CONNECT_USER, - PhpMyAdmin\DatabaseInterface::QUERY_STORE - ); - $is_table = @$GLOBALS['dbi']->numRows($_result); - $GLOBALS['dbi']->freeResult($_result); - } - } else { - $is_table = false; - } - - if (! $is_table) { - if (! defined('IS_TRANSFORMATION_WRAPPER')) { - if (strlen($table) > 0) { - // SHOW TABLES doesn't show temporary tables, so try select - // (as it can happen just in case temporary table, it should be - // fast): - - /** - * @todo should this check really - * only happen if IS_TRANSFORMATION_WRAPPER? - */ - $_result = $GLOBALS['dbi']->tryQuery( - 'SELECT COUNT(*) FROM ' . PhpMyAdmin\Util::backquote($table) - . ';', - PhpMyAdmin\DatabaseInterface::CONNECT_USER, - PhpMyAdmin\DatabaseInterface::QUERY_STORE - ); - $is_table = ($_result && @$GLOBALS['dbi']->numRows($_result)); - $GLOBALS['dbi']->freeResult($_result); - } - - if (! $is_table) { - include ROOT_PATH . 'db_sql.php'; - exit; - } - } - - if (! $is_table) { - exit; - } - } -} // end if (ensures table exists) -- cgit