From f9a88ad930e966dcd6a26a5611dd096ae5be0828 Mon Sep 17 00:00:00 2001 From: Dan Ungureanu Date: Mon, 13 Apr 2015 18:33:36 +0300 Subject: [PATCH 01/10] Old MySQL extension is not available in newer PHP versions. Signed-off-by: Dan Ungureanu Signed-off-by: Marc Delisle --- libraries/dbi/DBIMysql.class.php | 7 +++++++ test/classes/dbi/DBIMysql_test.php | 3 +++ 2 files changed, 10 insertions(+) diff --git a/libraries/dbi/DBIMysql.class.php b/libraries/dbi/DBIMysql.class.php index 36e81e6404..43973b28af 100644 --- a/libraries/dbi/DBIMysql.class.php +++ b/libraries/dbi/DBIMysql.class.php @@ -10,6 +10,13 @@ if (! defined('PHPMYADMIN')) { exit; } +if (! extension_loaded('mysql')) { + // The old MySQL extension is deprecated as of PHP 5.5.0, and will be + // removed in the future. Instead, the `MySQLi` or `PDO_MySQL` extension + // should be used. + return; +} + require_once './libraries/dbi/DBIExtension.int.php'; /** diff --git a/test/classes/dbi/DBIMysql_test.php b/test/classes/dbi/DBIMysql_test.php index 7469a01b6a..3bb9969d41 100644 --- a/test/classes/dbi/DBIMysql_test.php +++ b/test/classes/dbi/DBIMysql_test.php @@ -38,6 +38,9 @@ class PMA_DBI_Mysql_Test extends PHPUnit_Framework_TestCase */ protected function setUp() { + if (! extension_loaded('mysql')) { + $this->markTestSkipped('The MySQL extension is not available.'); + } $GLOBALS['cfg']['Server']['ssl'] = true; $GLOBALS['cfg']['PersistentConnections'] = false; $GLOBALS['cfg']['Server']['compress'] = true; From 90336ba418fff0a1a2b1cf195aa3a4e56ac9fb4a Mon Sep 17 00:00:00 2001 From: Smita Kumari Date: Fri, 17 Apr 2015 15:57:23 +0530 Subject: [PATCH 02/10] fix bug #4857 Signed-off-by: Smita Kumari --- js/tbl_structure.js | 3 --- libraries/structure.lib.php | 17 ++++++++++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/js/tbl_structure.js b/js/tbl_structure.js index 4cd0dc314e..9cd7cd58a7 100644 --- a/js/tbl_structure.js +++ b/js/tbl_structure.js @@ -92,9 +92,6 @@ AJAX.registerOnload('tbl_structure.js', function () { indexes = []; fulltext_indexes = []; - //by default select the last option to add new column (adds at end of the table) - $("select[name=after_field] option:last").attr("selected","selected"); - /** *Ajax action for submitting the "Column Change" and "Add Column" form */ diff --git a/libraries/structure.lib.php b/libraries/structure.lib.php index 51dd2a5304..ab23b27d60 100644 --- a/libraries/structure.lib.php +++ b/libraries/structure.lib.php @@ -1704,10 +1704,21 @@ function PMA_getHtmlForAddColumn($columns_list) . 'value="first" data-pos = "first">' . __('at beginning of table') . ''; + $cols_count = count($columns_list); foreach ($columns_list as $one_column_name) { - $column_selector .= ''; } $column_selector .= ''; From 71f07d1e87246ca0457bb0c34849913559416023 Mon Sep 17 00:00:00 2001 From: Smita Kumari Date: Fri, 17 Apr 2015 17:33:21 +0530 Subject: [PATCH 03/10] edit changeLog Signed-off-by: Smita Kumari --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 3539d9892d..dc0c85b44c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,7 @@ phpMyAdmin - ChangeLog - bug PHP 7 compatibility in php-gettext - bug PHP 7 compatibility in bfShapeFiles - bug PHP 7 session_regenerate_id() warning +- bug #4857 Alter table after changing column name error 4.4.2.0 (2015-04-13) - bug #4835 PMA_hideShowConnection not called after submit_num_fields From 078ff60935031273747b376a6d2a9a55a7a3a27d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ondra=20=C5=A0ime=C4=8Dek?= Date: Fri, 17 Apr 2015 14:32:33 +0200 Subject: [PATCH 04/10] Translated using Weblate (Czech) Currently translated at 95.7% (2943 of 3075 strings) [CI skip] --- po/cs.po | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/po/cs.po b/po/cs.po index e1b5079f86..8964a94601 100644 --- a/po/cs.po +++ b/po/cs.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: phpMyAdmin 4.5.0-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2015-04-10 10:21-0400\n" -"PO-Revision-Date: 2015-04-11 18:43+0200\n" +"PO-Revision-Date: 2015-04-17 14:32+0200\n" "Last-Translator: Ondra Šimeček \n" "Language-Team: Czech " "\n" @@ -9177,6 +9177,8 @@ msgid "" "There are large item groups in navigation panel which may affect the " "performance. Consider disabling item grouping in the navigation panel." msgstr "" +"Byly nalezeny obsáhlé skupiny položek v navigačním panelu, které mohou " +"ovlivnit výkon. Zvažte deaktivování seskupování položek v navigačním panelu." #: libraries/navigation/NavigationTree.class.php:871 #, fuzzy, php-format @@ -9433,6 +9435,11 @@ msgid "" "on which form a repeating group. In this case a new table (book_id, author) " "should be created." msgstr "" +"Nemáte skupinu dvou nebo více sloupců, které jsou si významově blízké a " +"opakují stejný atribut? Například, tabulka, která obsahuje data o knihách, " +"může obsahovat sloupce jako id_knihy, autor1, autor2, autor3 a další, které " +"vytvářejí opakující se skupinu atributů (autoři). Pokud ano, měli byste " +"vytvořit novou tabulku (id_knihy, autor)." #: libraries/normalization.lib.php:259 msgid "" @@ -9471,6 +9478,8 @@ msgid "" "The primary key ( %1$s ) consists of more than one column so we need to find " "the partial dependencies." msgstr "" +"Primární klíč ( %1$s ) obsahuje více než jeden sloupec, takže potřebujeme " +"nalézt dílčí závislosti." #: libraries/normalization.lib.php:327 libraries/normalization.lib.php:692 msgid "" From e7180f6facc73a99e63a3ea91f9e152d383e1ff4 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Fri, 17 Apr 2015 09:51:06 -0400 Subject: [PATCH 05/10] Remove reference to old display direction (see 6d128829463cff5e3a293ace173fdaa014a60f0f). Signed-off-by: Marc Delisle --- doc/config.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/config.rst b/doc/config.rst index aae9743e8d..4bcf5a4911 100644 --- a/doc/config.rst +++ b/doc/config.rst @@ -2312,8 +2312,7 @@ Design customization Defines the place where table row links (Edit, Copy, Delete) would be put when tables contents are displayed (you may have them displayed at - the left side, right side, both sides or nowhere). "left" and "right" - are parsed as "top" and "bottom" with vertical display mode. + the left side, right side, both sides or nowhere). .. config:option:: $cfg['RememberSorting'] From ac917275056b9b3d58d1ca79dc062930db5ac0f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Fri, 17 Apr 2015 14:32:35 +0200 Subject: [PATCH 06/10] Translated using Weblate (Czech) Currently translated at 96.8% (2939 of 3035 strings) [CI skip] --- po/cs.po | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/po/cs.po b/po/cs.po index 4bdd20f9a2..9687e70855 100644 --- a/po/cs.po +++ b/po/cs.po @@ -6,8 +6,8 @@ msgstr "" "Project-Id-Version: phpMyAdmin 4.4.1-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2015-03-30 08:55-0400\n" -"PO-Revision-Date: 2015-04-11 18:43+0200\n" -"Last-Translator: Ondra Šimeček \n" +"PO-Revision-Date: 2015-04-17 14:32+0200\n" +"Last-Translator: Michal Čihař \n" "Language-Team: Czech " "\n" "Language: cs\n" @@ -9029,6 +9029,8 @@ msgid "" "There are large item groups in navigation panel which may affect the " "performance. Consider disabling item grouping in the navigation panel." msgstr "" +"Byly nalezeny obsáhlé skupiny položek v navigačním panelu, které mohou " +"ovlivnit výkon. Zvažte deaktivování seskupování položek v navigačním panelu." #: libraries/navigation/NavigationTree.class.php:871 #, fuzzy, php-format @@ -9298,6 +9300,11 @@ msgid "" "on which form a repeating group. In this case a new table (book_id, author) " "should be created." msgstr "" +"Nemáte skupinu dvou nebo více sloupců, které jsou si významově blízké a " +"opakují stejný atribut? Například, tabulka, která obsahuje data o knihách, " +"může obsahovat sloupce jako id_knihy, autor1, autor2, autor3 a další, které " +"vytvářejí opakující se skupinu atributů (autoři). Pokud ano, měli byste " +"vytvořit novou tabulku (id_knihy, autor)." #: libraries/normalization.lib.php:259 msgid "" @@ -9336,6 +9343,8 @@ msgid "" "The primary key ( %1$s ) consists of more than one column so we need to find " "the partial dependencies." msgstr "" +"Primární klíč ( %1$s ) obsahuje více než jeden sloupec, takže potřebujeme " +"nalézt dílčí závislosti." #: libraries/normalization.lib.php:327 libraries/normalization.lib.php:692 msgid "" From 8f2429c053ccbcb24348c0c78c9467ad0871a899 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Fri, 17 Apr 2015 13:16:09 -0400 Subject: [PATCH 07/10] Remove extraneous argument Signed-off-by: Marc Delisle --- view_operations.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view_operations.php b/view_operations.php index 153249a3df..82c7db760e 100644 --- a/view_operations.php +++ b/view_operations.php @@ -71,7 +71,7 @@ if (isset($result)) { unset($warning_messages); } echo PMA_Util::getMessage( - $_message, $sql_query, $_type, $is_view = true + $_message, $sql_query, $_type ); unset($_message, $_type); } From ed27666193bb3cc587d6a90f564551f7f48f9365 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sat, 18 Apr 2015 06:28:21 -0400 Subject: [PATCH 08/10] Fix coding style Signed-off-by: Marc Delisle --- libraries/bookmark.lib.php | 2 +- libraries/sql_query_form.lib.php | 2 +- test/libraries/PMA_PMD_common_test.php | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libraries/bookmark.lib.php b/libraries/bookmark.lib.php index 20659e5d1b..bc5beff82f 100644 --- a/libraries/bookmark.lib.php +++ b/libraries/bookmark.lib.php @@ -93,7 +93,7 @@ function PMA_Bookmark_getList($db = false) } else { $query = "SELECT `label`, `id`, `query`, `dbase` AS `db`," . " IF (`user` = '', true, false) AS `shared`" - . " FROM ". PMA_Util::backquote($cfgBookmark['db']) + . " FROM " . PMA_Util::backquote($cfgBookmark['db']) . "." . PMA_Util::backquote($cfgBookmark['table']) . " WHERE `user` = '' OR" . " `user` = '" . PMA_Util::sqlAddSlashes($cfgBookmark['user']) . "'"; diff --git a/libraries/sql_query_form.lib.php b/libraries/sql_query_form.lib.php index f744846daf..3742e9ba07 100644 --- a/libraries/sql_query_form.lib.php +++ b/libraries/sql_query_form.lib.php @@ -366,7 +366,7 @@ function PMA_getHtmlForSqlQueryFormBookmark() foreach ($bookmark_list as $key => $value) { $html .= '' . "\n"; } //   is required for correct display with styles/line height diff --git a/test/libraries/PMA_PMD_common_test.php b/test/libraries/PMA_PMD_common_test.php index 30994bf990..2d826c33b1 100644 --- a/test/libraries/PMA_PMD_common_test.php +++ b/test/libraries/PMA_PMD_common_test.php @@ -167,7 +167,7 @@ class PMA_PMD_CommonTest extends PHPUnit_Framework_TestCase ->with( "SELECT `page_nr` FROM `pmadb`.`pdf_pages`" . " WHERE `db_name` = '" . $db . "'" - . " AND `page_descr` = '" . $db. "'", + . " AND `page_descr` = '" . $db . "'", null, null, 2, @@ -199,7 +199,7 @@ class PMA_PMD_CommonTest extends PHPUnit_Framework_TestCase ->with( "SELECT `page_nr` FROM `pmadb`.`pdf_pages`" . " WHERE `db_name` = '" . $db . "'" - . " AND `page_descr` = '" . $db. "'", + . " AND `page_descr` = '" . $db . "'", null, null, 2, @@ -224,4 +224,4 @@ class PMA_PMD_CommonTest extends PHPUnit_Framework_TestCase $this->assertEquals($first_pg, $result); } } -?> \ No newline at end of file +?> From 1f67478ac7928a8610a5f6f613ebd4a87c86597d Mon Sep 17 00:00:00 2001 From: Burak Yavuz Date: Sun, 19 Apr 2015 08:39:40 +0200 Subject: [PATCH 09/10] Translated using Weblate (Turkish) Currently translated at 100.0% (3075 of 3075 strings) [CI skip] --- po/tr.po | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/po/tr.po b/po/tr.po index d28a6fbe9c..dffda3f7b4 100644 --- a/po/tr.po +++ b/po/tr.po @@ -4,7 +4,7 @@ msgstr "" "Project-Id-Version: phpMyAdmin 4.5.0-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2015-04-10 10:21-0400\n" -"PO-Revision-Date: 2015-04-11 22:10+0200\n" +"PO-Revision-Date: 2015-04-19 08:39+0200\n" "Last-Translator: Burak Yavuz \n" "Language-Team: Turkish " "\n" @@ -10165,10 +10165,9 @@ msgid "View structure" msgstr "Yapıyı göster" #: libraries/plugins/export/ExportPdf.class.php:287 -#, fuzzy #| msgid "and then" msgid "Stand in" -msgstr "ve ondan sonra" +msgstr "Bulunduğu" #: libraries/plugins/export/ExportSql.class.php:91 msgid "" From ec72500d52acbd4b27d3dddf7b15f0edb30ec008 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sun, 19 Apr 2015 05:57:47 -0400 Subject: [PATCH 10/10] bug #4830 Maximum execution time exceeded in Util.class.php Signed-off-by: Marc Delisle --- ChangeLog | 1 + libraries/DisplayResults.class.php | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index dc0c85b44c..6ba93f5950 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,7 @@ phpMyAdmin - ChangeLog - bug PHP 7 compatibility in bfShapeFiles - bug PHP 7 session_regenerate_id() warning - bug #4857 Alter table after changing column name error +- bug #4830 Maximum execution time exceeded in Util.class.php 4.4.2.0 (2015-04-13) - bug #4835 PMA_hideShowConnection not called after submit_num_fields diff --git a/libraries/DisplayResults.class.php b/libraries/DisplayResults.class.php index 278d277060..f336ac782d 100644 --- a/libraries/DisplayResults.class.php +++ b/libraries/DisplayResults.class.php @@ -2698,7 +2698,9 @@ class PMA_DisplayResults } // end if (1) // 2. Displays the rows' values - $this->_setMimeMap(); + if (is_null($this->__get('mime_map'))) { + $this->_setMimeMap(); + } $table_body_html .= $this->_getRowValues( $dt_result, $row, $row_no, $col_order, $map, $grid_edit_class, $col_visib, $where_clause,