diff --git a/ChangeLog b/ChangeLog index 7cda441b2..2acdf45b0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -83,9 +83,47 @@ $Id$ + [core] Include Content Security Policy HTTP headers. - bug #3004216 [CSS] Field attributes use inline CSS - patch #2999595, rfe #2998130 [interface] Cleanup navigation frame. -- [core] Update library PHPExcel to version 1.7.3c +- patch #3025161 [core] Prevent sending of unnecessary cookies, + thanks to Piotr Przybylski - crackpl +- bug [password] Generate password only available if JS is enabled + (fixed for Privileges and Change password) +- [core] RecodingEngine now accepts none as valid option. ++ [core] Dropped AllowAnywhereRecoding configuration variable. +- rfe #3016457 [interface] Define tab order in SQL form to allow easier tab + navigation. ++ [core] Centralized format string expansion, @VARIABLES@ are recommended way + now, used by file name templates, default queries, export and title + generating. ++ [validator] SQL validator works also with SOAP PHP extension. +- [interface] Better formatting for SQL validator results. +- [doc] The linked-tables infrastructure is now called phpMyAdmin + configuration storage. +- [interface] Move drop/empty links from being tabs to Operations tab. +- [interface] Fixed rendering of error/notice/info titles background. -3.3.4.0 (not yet released) +3.3.6.0 (not yet released) +- bug #3033063 [core] Navi gets wrong db name +- bug #3031705 [core] Fix generating condition for real numbers by comparing + them to string. + +3.3.5.0 (2010-07-26) +- patch #2932113 [information_schema] Slow export when having lots of + databases, thanks to Stéphane Pontier - shadow_walker +- bug #3022705 [import] Import button does not work in Catalan when there + is no progress bar possible +- bug [replication] Do not offer information_schema in the list of databases +- bug [js] Avoid loading twice a js file +- bug #3024344 [setup] Setup forces numeric MemoryLimit +- bug #3025975 [auth] Odd LoginCookieValidity default value +- bug #3026400 [PHP] ereg functions are deprecated +- bug #3027557 [PHP] split() deprecated in PHP 5.3 (backport fixes from master) +- bug #3023507 [core] No result set display from stored procedure SELECT +- bug [export] CSV for MS Excel (Windows) should have semi-colon as separator +- [core] Update library PHPExcel to version 1.7.3c +- bug #2994885, bug #3029168 [import] Convert Excel column name correctly +- bug [scripts] MySQL 5.5.5 does not accept TIMESTAMP(14) in create_tables.sql + +3.3.4.0 (2010-06-28) - bug #2996161 [import] properly escape import value - bug #2998889 [import] Import button does not work in Catalan - [browse] Fix handling of sort order if only column is specified. @@ -96,6 +134,11 @@ $Id$ - bug [synchronize] Rows were deleted in target table regardless of the "Would you like to delete..." option - bug [privileges] List of tables not shown when the db name has a wildcard +- bug #3011126 [display] Edit link missing after long query +- patch #3013264 [doc] FAQ 1.40 uses a comma instead of a period, + thanks to Isaac Bennetch - ibennetch +- [engines] Fix getting InnoDB status. +- bug #2986422 [import] Results for query are not displayed 3.3.3.0 (2010-05-10) - patch #2982480 [navi] Do not group if there would be one table in group, diff --git a/Documentation.html b/Documentation.html index 659cd68c7..bf9a05a81 100644 --- a/Documentation.html +++ b/Documentation.html @@ -69,7 +69,7 @@ vim: expandtab ts=4 sw=4 sts=4 tw=78
For a whole set of new features (bookmarks, comments, SQL-history, @@ -340,7 +343,8 @@ rm -rf config # remove not needed directory FAQ 1.23).
If you already had this infrastructure and upgraded to MySQL 4.1.2 - or newer, please use ./scripts/upgrade_tables_mysql_4_1_2+.sql.
+ or newer, please use ./scripts/upgrade_tables_mysql_4_1_2+.sql + and then create new tables by importing ./scripts/create_tables.sql.You can use your phpMyAdmin to create the tables for you. Please be aware that you may need special (administrator) privileges to create the database @@ -369,7 +373,7 @@ rm -rf config # remove not needed directory is version-specific.
If you have upgraded your MySQL server from a version previous to 4.1.2 to - version 4.1.2 or newer and if you use the pmadb/linked table infrastructure, + version 4.1.2 or newer and if you use the phpMyAdmin configuration storage, you should run the SQL script found in scripts/upgrade_tables_mysql_4_1_2+.sql.
@@ -396,7 +400,7 @@ rm -rf config # remove not needed directory In cookie mode, the password is stored, encrypted with the blowfish algorithm, in a temporary cookie. -@@ -1042,9 +1047,9 @@ ALTER TABLE `pma_column_comments` To allow the usage of this functionality: -
session.gc_maxlifetime
- at least as high is $cfg['LoginCookieValidity'] is set.session.gc_maxlifetime
+ not lower than the value of $cfg['LoginCookieValidity'].'^(cs|en)'
.@HTTP_HOST@
@SERVER@
@VERBOSE@
@VSERVER@
@DATABASE@
@TABLE@
@PHPMYADMIN@
To be able to use cookie auth Apache must know that it has to rewrite the set-cookie headers.
Example from the Apache 2.2 documentation:
This is related to the authentication mechanism (protocol) used by @@ -4134,25 +4108,34 @@ INSERT INTO REL_towns VALUES ('M', 'Montréal'); 6.14 How do I set up the SQL Validator? -
To use it, you need a very recent version of PHP, 4.3.0 recommended, with +
+ To use SQL Validator, you need PHP with
XML,
PCRE and
PEAR support.
- On your system command line, run "pear install Net_Socket Net_URL
- HTTP_Request Mail_Mime Net_DIME SOAP" to get the necessary
- PEAR modules
- for usage.
- On a more recent pear version, I had problems with the state of Net_DIME
- being beta, so this single command
- "pear -d preferred_state=beta install -a SOAP" installed all the
- needed modules.
+ In addition you need a SOAP support, either as a PHP extension or as a PEAR SOAP
+ module.
+
+ To install PEAR SOAP module, run "pear install Net_Socket Net_URL + HTTP_Request Mail_Mime Net_DIME SOAP" to get the necessary PEAR modules for + usage. +
+ +If you use the Validator, you should be aware that any SQL statement you submit will be stored anonymously (database/table/column names, strings, numbers replaced with generic values). The Mimer SQL Validator itself, is © 2001 Upright Database Technology. - We utilize it as free SOAP service.
+ We utilize it as free SOAP service. +First, for general information about BLOB streaming on MySQL, visit blobstreaming.org. We currently support streaming if you are running MySQL 5.1 with the PBXT and PBMS storage engines.
+For general information about BLOB streaming on MySQL, visit blobstreaming.org. You need the following components:
+Here are details about configuration and operation:
Click the first row of the range, hold the shift key and click the last row of the range. This works everywhere you see rows, for example in Browse mode or on the Structure page.
+ + +
+ In all places where phpMyAdmin accepts format strings, you can use
+ @VARIABLE@
expansion and
+ strftime format strings. The
+ expanded variables depend on a context (eg. if you don't have chosen
+ table, you can not get table name), but following variables can be used:
+
@HTTP_HOST@
@SERVER@
@VERBOSE@
@VSERVER@
@DATABASE@
@TABLE@
@FIELDS@
@PHPMYADMIN@
Always use latest Git version of po file to translate. You can optionally +
Always use latest Git version of the po file to translate. You can optionally translate online at our translation - server where you can also get latest po files and merge them - with your translations. For creating new translation simply use + server
where you can also get the latest po files and merge them + with your translations. For creating a new translation simply usepo/phpmyadmin.pot
and generate
po/LANG_CODE.po
for your language (you can use
msginit -i po/phpmyadmin.pot -l LANG_CODE --no-translator -o po/LANG_CODE.po
- to do this) or ask on mailing list to add the translation to the web
+ to do this) or ask on the mailing list to add the translation to the web
interface. More details are available on our wiki.
@@ -4366,18 +4392,30 @@ chmod o+rwx tmp the translations, since we define the right character set in the file. With HTML entities, the text on JavaScript messages would not display correctly. - However there are some entities that need to be there, for quotes - ,non-breakable spaces, ampersands, less than, greater than. + However there are some entities that need to be there: quotes, + non-breakable spaces, ampersands, less than, greater than.
You can then put your translations, as a zip file to avoid losing special - characters, on the sourceforge.net translation tracker. + characters, on the sourceforge.net translation tracker.
- It would be a good idea to subscribe to the phpmyadmin-translators mailing + It would be a good idea to subscribe to the phpmyadmin-translators mailing list, because this is where we ask for translations of new messages.
+
+ Documentation is being translated using po4a and gettext (see
+ documentation
+ for existing translations). To start, checkout
+ localized_docs/po
+ from Git, or just go to the translation server
+ and translate it online. If your language is missing, just contact
+ Michal Čihař; he will add it. If
+ you prefer to directly translate the po files, please put updated ones into our
+ translation tracker.
+
If you use Apache web server, phpMyAdmin exports information about - authentication to Apache environment and it can be used in Apache logs. + authentication to the Apache environment and it can be used in Apache logs. Currently there are two variables available:
You can now synchronize databases/tables in phpMyAdmin using the Synchronize feature. -It allows you to connect to local as well as remote servers.This requires you to enter +It allows you to connect to local as well as remote servers. This requires you to enter server host name, username, password, port and the name of the database. Therefore you can now synchronize your databases placed on the same server or some remote server.
This feature is helpful for developers who need to replicate their -databases’ structure as well as data. Moreover, this feature not only +database’s structure as well as data. Moreover, this feature not only helps replication but also facilitates the user to keep his/her database in sync with another database. Other than the full database, certain tables of the databases can also be synchronized. @@ -4476,29 +4514,29 @@ representation.
-On the left, are listed the source database table names. Some of the
-names have a ‘+’ plus sign preceding them. This shows that these tables
+On the left, are listed the source database table names. Some of the
+names have a +
plus sign preceding them. This shows that these tables
are only present in source database and they need to be added to the
target database in order to synchronize the target database. The tables
-whose names are not preceded by a ‘+’ sign are already present in the
+whose names are not preceded by a +
sign are already present in the
target database.
On the right, are listed the target database table names. There are few
-table names that have “(not present)” appended after their names. This
+table names that have (not present)
appended after their names. This
means that these tables are to be created in target database in order to
-synchronize target database with source database. Some tables’ names
-have a ‘-’ minus sign preceding them. This shows that these tables are
+synchronize target database with source database. Some table names
+have a -
minus sign preceding them. This shows that these tables are
only present in target database and they will remain unchanged in the
target database. The column in the middle shows the difference between
the source and target corresponding tables.
-The difference is depicted by the red and green buttons with S and D +The difference is depicted by the red and green buttons with S and D letters, indicating that either Structure or Data are not up to date. By -clicking on them, they will turn grey, what means that they will be synchronised. +clicking on them, they will turn grey, what means that they will be synchronized.
@@ -4816,6 +4854,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USAdiff --git a/browse_foreigners.php b/browse_foreigners.php index 714d8676d..4cfa543e8 100644 --- a/browse_foreigners.php +++ b/browse_foreigners.php @@ -3,7 +3,6 @@ /** * display selection for relational field values * - * @version $Id$ * @package phpMyAdmin */ @@ -23,7 +22,6 @@ require_once './libraries/header_http.inc.php'; * Displays the frame */ $per_page = 200; -require_once './libraries/relation.lib.php'; // foreign keys require_once './libraries/transformations.lib.php'; // Transformations $cfgRelation = PMA_getRelationsParam(); $foreigners = ($cfgRelation['relwork'] ? PMA_getForeigners($db, $table) : FALSE); diff --git a/bs_change_mime_type.php b/bs_change_mime_type.php index b8fea6b55..edefae144 100644 --- a/bs_change_mime_type.php +++ b/bs_change_mime_type.php @@ -1,7 +1,6 @@ get('BLOBSTREAMING_PLUGINS_EXIST')) - { - $pbms_ref_tbl = $PMA_Config->get('PBMS_NAME') . '_reference'; - $pbms_cust_content_type_tbl = $PMA_Config->get('PBMS_NAME') . '_custom_content_type'; - - // if specified DB is selected - if (PMA_DBI_select_db($bsDB)) - { - $query = "SELECT * FROM " . PMA_backquote($pbms_ref_tbl); - $query .= " WHERE Blob_url='" . PMA_sqlAddslashes($bsReference) . "'"; - - $result = PMA_DBI_query($query); - - // if record exists - if ($data = PMA_DBI_fetch_assoc($result)) - { - $query = "SELECT count(*) FROM " . PMA_backquote($pbms_cust_content_type_tbl); - $query .= " WHERE Blob_url='" . PMA_sqlAddslashes($bsReference) . "'"; - - $result = PMA_DBI_query($query); - - // if record exists - if ($data = PMA_DBI_fetch_assoc($result)) - { - if (1 == $data['count(*)']) - { - $query = "UPDATE " . PMA_backquote($pbms_cust_content_type_tbl) . " SET Content_type='"; - $query .= PMA_sqlAddslashes($bsNewMIMEType) . "' WHERE Blob_url='" . PMA_sqlAddslashes($bsReference) . "'"; - } - else - { - $query = "INSERT INTO " . PMA_backquote($pbms_cust_content_type_tbl) . " (Blob_url, Content_type)"; - $query .= " VALUES('" . PMA_sqlAddslashes($bsReference) . "', '" . PMA_sqlAddslashes($bsNewMIMEType) . "')"; - } - - $result = PMA_DBI_query($query); - - // if query execution succeeded - if ($result) - { - // determine redirector page - $newLoc = $cfg['PmaAbsoluteUri'] . 'sql.php?' . PMA_generate_common_url ('','', '&') . (isset($bsDB) ? '&db=' . urlencode($bsDB) : '') . (isset($bsTable) ? '&table=' . urlencode($bsTable) : '') . (isset($token) ? '&token=' . urlencode($token) : '') . (isset($goto) ? '&goto=' . urlencode($goto) : '') . '&reload=1&purge=1'; - - // redirect to specified page - ?> - - get('BLOBSTREAMING_PLUGINS_EXIST')) - } // end if (!empty($PMA_Config)) + // redirect to specified page + ?> + + diff --git a/bs_disp_as_mime_type.php b/bs_disp_as_mime_type.php index a83dfa66e..085d88823 100644 --- a/bs_disp_as_mime_type.php +++ b/bs_disp_as_mime_type.php @@ -1,7 +1,6 @@ get('BLOBSTREAMING_SERVER'); -if (empty($bs_server)) die('No blob streaming server configured!'); - // Check URL parameters PMA_checkParameters(array('reference', 'c_type')); @@ -31,15 +23,23 @@ $reference = $_REQUEST['reference']; */ $c_type = preg_replace('/[^A-Za-z0-9/_-]/', '_', $_REQUEST['c_type']); -$filename = 'http://' . $bs_server . '/' . $reference; +// Get the blob streaming URL +$filename = PMA_BS_getURL($reference); +if (empty($filename)) { + die(__('No blob streaming server configured!')); +} $hdrs = get_headers($filename, 1); -if ($hdrs === FALSE) die('Failed to fetch headers'); +if ($hdrs === FALSE) { + die(__('Failed to fetch headers')); +} $fHnd = fopen($filename, "rb"); -if ($fHnd === FALSE) die('Failed to open remote URL'); +if ($fHnd === FALSE) { + die(__('Failed to open remote URL')); +} $f_size = $hdrs['Content-Length']; @@ -59,8 +59,9 @@ while (!feof($fHnd)) { $content .= fread($fHnd, $f_size); $pos = strlen($content); - if ($pos >= $f_size) + if ($pos >= $f_size) { break; + } } echo $content; diff --git a/bs_play_media.php b/bs_play_media.php index 94ed25a2b..fe6f57425 100644 --- a/bs_play_media.php +++ b/bs_play_media.php @@ -1,7 +1,6 @@ get('BLOBSTREAMING_SERVER'); - if (empty($bs_server)) die('No blob streaming server configured!'); - - $bs_file_path = "http://" . $bs_server . '/' . $bsReference; - - if (isset($customType) && $customType) - - $bs_file_path = 'bs_disp_as_mime_type.php' . PMA_generate_common_url(array('reference' => $bsReference, 'c_type' => $mediaType)); - + if (isset($mediaType) && isset($bsReference)) { + if (isset($customType) && $customType) { + $bs_file_path = 'bs_disp_as_mime_type.php' . PMA_generate_common_url(array('reference' => $bsReference, 'c_type' => $mediaType)); + } else { + // Get the BLOB streaming URL + $bs_file_path = PMA_BS_getURL($bsReference); + if (empty($bs_file_path)) { + die(__('No blob streaming server configured!')); + } + } ?>
@@ -70,7 +61,6 @@ diff --git a/changelog.php b/changelog.php index dcdbecf5d..9ab2e399a 100644 --- a/changelog.php +++ b/changelog.php @@ -3,7 +3,6 @@ /** * Simple script to set correct charset for changelog * - * @version $Id$ * @package phpMyAdmin */ diff --git a/chk_rel.php b/chk_rel.php index f95d45bda..8955350b0 100644 --- a/chk_rel.php +++ b/chk_rel.php @@ -2,7 +2,6 @@ /* vim: set expandtab sw=4 ts=4 sts=4: */ /** * - * @version $Id$ * @package phpMyAdmin */ @@ -10,9 +9,7 @@ * Gets some core libraries */ require_once './libraries/common.inc.php'; -$GLOBALS['js_include'][] = 'functions.js'; require_once './libraries/header.inc.php'; -require_once './libraries/relation.lib.php'; /** @@ -24,5 +21,5 @@ $cfgRelation = PMA_getRelationsParam(TRUE); /** * Displays the footer */ -require_once './libraries/footer.inc.php'; +require './libraries/footer.inc.php'; ?> diff --git a/config.sample.inc.php b/config.sample.inc.php index 575e96562..da403fd2b 100644 --- a/config.sample.inc.php +++ b/config.sample.inc.php @@ -35,12 +35,6 @@ $cfg['Servers'][$i]['compress'] = false; $cfg['Servers'][$i]['extension'] = 'mysql'; $cfg['Servers'][$i]['AllowNoPassword'] = false; -/* for blobstreaming */ -$cfg['Servers'][$i]['bs_garbage_threshold'] = 50; -$cfg['Servers'][$i]['bs_repository_threshold'] = '32M'; -$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600; -$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M'; - /* User for advanced features */ // $cfg['Servers'][$i]['controluser'] = 'pma'; // $cfg['Servers'][$i]['controlpass'] = 'pmapass'; @@ -100,7 +94,7 @@ $cfg['SaveDir'] = ''; /** * Default language to use, if not browser-defined or user-defined - * (you find all languages in the file libraries/select_lang.lib.php) + * (you find all languages in the locale folder) * uncomment the desired line: * default = 'en' */ diff --git a/db_create.php b/db_create.php index b55e04fad..50e4cf67d 100644 --- a/db_create.php +++ b/db_create.php @@ -2,7 +2,6 @@ /* vim: set expandtab sw=4 ts=4 sts=4: */ /** * - * @version $Id$ * @package phpMyAdmin */ @@ -10,7 +9,6 @@ * Gets some core libraries */ require_once './libraries/common.inc.php'; -$GLOBALS['js_include'][] = 'functions.js'; require_once './libraries/mysql_charsets.lib.php'; PMA_checkParameters(array('new_db')); diff --git a/db_datadict.php b/db_datadict.php index 7af533c94..7666b567a 100644 --- a/db_datadict.php +++ b/db_datadict.php @@ -2,7 +2,6 @@ /* vim: set expandtab sw=4 ts=4 sts=4: */ /** * - * @version $Id$ * @package phpMyAdmin */ @@ -19,10 +18,10 @@ if (!isset($selected_tbl)) { /** * Gets the relations settings */ -require_once './libraries/relation.lib.php'; +$cfgRelation = PMA_getRelationsParam(); + require_once './libraries/transformations.lib.php'; -$cfgRelation = PMA_getRelationsParam(); /** * Check parameters @@ -321,5 +320,5 @@ function printPage()' . sprintf(__('Total: %s match(es)'), + echo '
' . sprintf(_ngettext('Total: %s match', 'Total: %s matches', $num_search_result_total), $num_search_result_total) . '
' . "\n"; } } // end 1. @@ -368,5 +350,5 @@ $alter_select = /** * Displays the footer */ -require_once './libraries/footer.inc.php'; +require './libraries/footer.inc.php'; ?> diff --git a/db_sql.php b/db_sql.php index 2ac198bda..986fb3417 100644 --- a/db_sql.php +++ b/db_sql.php @@ -2,7 +2,6 @@ /* vim: set expandtab sw=4 ts=4 sts=4: */ /** * - * @version $Id$ * @package phpMyAdmin */ @@ -42,5 +41,5 @@ PMA_sqlQueryForm(true, false, isset($_REQUEST['delimiter']) ? $_REQUEST['delimit /** * Displays the footer */ -require_once './libraries/footer.inc.php'; +require './libraries/footer.inc.php'; ?> diff --git a/db_structure.php b/db_structure.php index 65b78b708..9e118210b 100644 --- a/db_structure.php +++ b/db_structure.php @@ -2,7 +2,6 @@ /* vim: set expandtab sw=4 ts=4 sts=4: */ /** * - * @version $Id$ * @package phpMyAdmin */ @@ -10,7 +9,6 @@ * */ require_once './libraries/common.inc.php'; -require_once './libraries/Table.class.php'; $GLOBALS['js_include'][] = 'jquery/jquery-ui-1.8.custom.js'; @@ -57,7 +55,7 @@ if ($num_tables == 0) { /** * Displays the footer */ - require_once './libraries/footer.inc.php'; + require './libraries/footer.inc.php'; exit; } @@ -151,25 +149,12 @@ $hidden_fields = array(); $odd_row = true; $sum_row_count_pre = ''; -// for blobstreaming -$PMA_Config = $GLOBALS['PMA_Config']; - -if (!empty($PMA_Config)) - $session_bs_tables = $PMA_Config->get('BLOBSTREAMING_TABLES'); // list of blobstreaming tables - $tableReductionCount = 0; // the amount to reduce the table count by foreach ($tables as $keyname => $each_table) { - if (isset($session_bs_tables)) - { - // compare table name against blobstreaming tables - foreach ($session_bs_tables as $table_key=>$table_val) - // if the table is a blobstreaming table, reduce table count and skip outer foreach loop - if ($table_key == $keyname) - { - $tableReductionCount++; - continue 2; - } + if (PMA_BS_IsHiddenTable($keyname)) { + $tableReductionCount++; + continue; } // Get valid statistics whatever is the table type @@ -360,24 +345,24 @@ foreach ($tables as $keyname => $each_table) { ) { $do = true; } - foreach ($server_slave_Wild_Do_Table as $table) { - if (($db == PMA_replication_strout($table)) && (ereg("^".substr(PMA_replication_strout($table, true), 0, strlen(PMA_replication_strout($table, true))-1), $truename))) + foreach ($server_slave_Wild_Do_Table as $db_table) { + $table_part = PMA_extract_db_or_table($db_table, 'table'); + if (($db == PMA_extract_db_or_table($db_table, 'db')) && (preg_match("@^" . substr($table_part, 0, strlen($table_part) - 1) . "@", $truename))) { $do = true; + } } //////////////////////////////////////////////////////////////////// if ((strlen(array_search($truename, $server_slave_Ignore_Table)) > 0) || (strlen(array_search($db, $server_slave_Ignore_DB)) > 0)) { $ignored = true; } - foreach ($server_slave_Wild_Ignore_Table as $table) { - if (($db == PMA_replication_strout($table)) && (ereg("^".substr(PMA_replication_strout($table, true), 0, strlen(PMA_replication_strout($table, true))-1), $truename))) + foreach ($server_slave_Wild_Ignore_Table as $db_table) { + $table_part = PMA_extract_db_or_table($db_table, 'table'); + if (($db == PMA_extract_db_or_table($db_table)) && (preg_match("@^" . substr($table_part, 0, strlen($table_part) - 1) . "@", $truename))) { $ignored = true; + } } - }/* elseif ($server_master_status) { - if ((strlen(array_search($db, $server_master_Do_DB))>0) || count($server_master_Do_DB)==1) - $do = true; - elseif ((strlen(array_search($db, $server_master_Ignore_DB))>0) || count($server_master_Ignore_DB)==1) - $ignored = true; - }*/ + unset($table_part); + } ?>\n" . PMA_SQP_formatNone(array('raw' => $unparsed_sql)) . "\n"; + $formatted_sql = '
' . "\n" . PMA_SQP_formatNone(array('raw' => $unparsed_sql)) . "\n" . ''; } else { $formatted_sql = PMA_SQP_formatNone($parsed_sql); } @@ -346,7 +344,6 @@ function PMA_formatSql($parsed_sql, $unparsed_sql = '') * @uses $cfg['MySQLManualType'] * @uses $cfg['MySQLManualBase'] * @uses $cfg['ReplaceHelpImg'] - * @uses __('Documentation') * @uses $GLOBALS['pmaThemeImage'] * @uses PMA_MYSQL_INT_VERSION * @uses strtolower() @@ -501,11 +498,7 @@ function PMA_showHint($message, $bbcode = false, $type = 'notice') * @uses footer.inc.php * @uses header.inc.php * @uses $GLOBALS['sql_query'] - * @uses __('Error') - * @uses __('SQL query') * @uses $GLOBALS['pmaThemeImage'] - * @uses __('Edit') - * @uses __('MySQL said: ') * @uses $GLOBALS['cfg']['PropertiesIconic'] * @uses $GLOBALS['cfg']['MaxCharactersInDisplayedSQL'] * @uses PMA_backquote() @@ -661,19 +654,19 @@ function PMA_mysqlDie($error_message = '', $the_query = '', $back_url .= '?no_history=true'; } - $_SESSION['Import_message']['go_back_url'] = $back_url; + $_SESSION['Import_message']['go_back_url'] = $back_url; $error_msg_output .= '' . "\n\n"; - } + } - echo $error_msg_output; - /** - * display footer and exit - */ + echo $error_msg_output; + /** + * display footer and exit + */ - require_once './libraries/footer.inc.php'; + require './libraries/footer.inc.php'; } else { echo $error_msg_output; } @@ -798,18 +791,11 @@ function PMA_getTableList($db, $tables = null, $limit_offset = 0, $limit_count = // load PMA configuration $PMA_Config = $GLOBALS['PMA_Config']; - // if PMA configuration exists - if (!empty($PMA_Config)) - $session_bs_tables = $GLOBALS['PMA_Config']->get('BLOBSTREAMING_TABLES'); - foreach ($tables as $table_name => $table) { // if BS tables exist - if (isset($session_bs_tables)) - // compare table name to tables in list of blobstreaming tables - foreach ($session_bs_tables as $table_key=>$table_val) - // if table is in list, skip outer foreach loop - if ($table_name == $table_key) - continue 2; + if (PMA_BS_IsHiddenTable($table_name)) { + continue; + } // check for correct row count if (null === $table['Rows']) { @@ -1137,7 +1123,11 @@ function PMA_showMessage($message, $sql_query = null, $type = 'notice', $is_view if (! empty($GLOBALS['show_as_php'])) { $query_base = '$sql = "' . $query_base; } elseif (! empty($GLOBALS['validatequery'])) { - $query_base = PMA_validateSQL($query_base); + try { + $query_base = PMA_validateSQL($query_base); + } catch (Exception $e) { + PMA_Message::error(__('Failed to connect to SQL validator!'))->display(); + } } elseif (isset($parsed_sql)) { $query_base = PMA_formatSql($parsed_sql, $query_base); } @@ -1188,7 +1178,9 @@ function PMA_showMessage($message, $sql_query = null, $type = 'notice', $is_view $url_params['sql_query'] = $sql_query; $url_params['show_query'] = 1; - if (! empty($cfg['SQLQuery']['Edit']) && ! $query_too_big) { + // even if the query is big and was truncated, offer the chance + // to edit it (unless it's enormous, see PMA_linkOrButton() ) + if (! empty($cfg['SQLQuery']['Edit'])) { if ($cfg['EditInWindow'] == true) { $onclick = 'window.parent.focus_querywindow(\'' . PMA_jsFormat($sql_query, false) . '\'); return false;'; } else { @@ -1251,7 +1243,11 @@ function PMA_showMessage($message, $sql_query = null, $type = 'notice', $is_view $validate_link = ''; } //validator - echo '
';
+ if (!empty($GLOBALS['validatequery'])) {
+ echo '';
+ } else {
+ echo '';
+ }
if ($query_too_big) {
echo $shortened_query_base;
} else {
@@ -1262,7 +1258,11 @@ function PMA_showMessage($message, $sql_query = null, $type = 'notice', $is_view
if (! empty($GLOBALS['show_as_php'])) {
echo '";';
}
- echo '
';
+ if (!empty($GLOBALS['validatequery'])) {
+ echo '';
+ } else {
+ echo '
';
+ }
echo '