From 0d2cb6e29b9677c456d39256218d54d296fdf1ef Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Fri, 27 Mar 2015 10:47:09 +0530 Subject: [PATCH 1/3] Remove icon used for query window Signed-off-by: Madhura Jayaratne --- themes/original/img/b_selboard.png | Bin 175 -> 0 bytes themes/pmahomme/img/b_selboard.png | Bin 676 -> 0 bytes 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 themes/original/img/b_selboard.png delete mode 100644 themes/pmahomme/img/b_selboard.png diff --git a/themes/original/img/b_selboard.png b/themes/original/img/b_selboard.png deleted file mode 100644 index c54a20fee94b7ffae66e5acbc39aa7ce02443048..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 175 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFg82k*9A^bODwO1U- N9#2<4mvv4FO#o*>GRgn| diff --git a/themes/pmahomme/img/b_selboard.png b/themes/pmahomme/img/b_selboard.png deleted file mode 100644 index 3caa94971b649daf7111f06fa1a07cb2a8932e3a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 676 zcmV;V0$crwP)7EMpQx(a-`{T|Pb^B{x^5TAXQ@=GC!J2C zwzd|@WD+D%DwR+!mr*Dbu)e;YC3$mTV4w&9APJI~o}Qk`=krum9wlQ8=jZ1+IXO8V z`QlL&lHHAsjsNW2)YJr3y>@5@stS@=TU$dSkw8sN4XUfFK@z*WyYM^@#bOa19UV|r z90_n72b-Il@O>X7AtKn?+CmTna2y9D{|<;cRaI3Xkx0OC95{{xV+=$DQ~6<3%npXz zUclPDPxw89D1nH;7z1MrthKP#LPQWqh~|b2hF@NX(I9qYg~;&m%^;`-p$b9~oUHFe zCVc^Ae+N@P?l(Lgy<7Ks$lE>yh+Y>Bakcw4EEQHQ6vT3A31^!xVLPngePOoL^B`V- z0HCT65r_zU31O+oZ+wMOfvAD823tWH=T7xv+w8{QE@n6O0M=S~o`+N_h1Jzn_~JvX zpz(MML@g{8E2RSJ>(cnJG>5tG+4WG+w?DyPE|+_r$z*COedmKaor(AtLZR50AY&Jm1nAn_YOd z5-6`MkMPTZW%^TNV`IlenF7U From b249614d065edf90147904fc27587580e0db880c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Fri, 27 Mar 2015 08:42:10 +0100 Subject: [PATCH 2/3] Merge native and multibyte tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Having in all cases dozen of skipped test just makes the results readability worse. So it makes little sense unless we can figure out way to test both implementations. Signed-off-by: Michal Čihař --- test/libraries/stringMb_test.php | 103 --------------------------- test/libraries/stringNative_test.php | 34 --------- test/libraries/string_test.php | 99 +++++++++++++++++++++++++ 3 files changed, 99 insertions(+), 137 deletions(-) delete mode 100644 test/libraries/stringMb_test.php delete mode 100644 test/libraries/stringNative_test.php create mode 100644 test/libraries/string_test.php diff --git a/test/libraries/stringMb_test.php b/test/libraries/stringMb_test.php deleted file mode 100644 index 256994ba89..0000000000 --- a/test/libraries/stringMb_test.php +++ /dev/null @@ -1,103 +0,0 @@ -markTestSkipped( - "Multibyte functions don't exist, skipping test." - ); - } - } - - /** - * Data provider for testStrlen - * - * @return array Test data - */ - public function providerStrlen() - { - return array_merge( - parent::providerStrlen(), - array(array(13, "chaîne testée")) - ); - } - - /** - * Data provider for testSubStr - * - * @return array Test data - */ - public function providerSubstr() - { - return array_merge( - parent::providerSubstr(), - array( - array("rçon", "garçon", 2, 4), - array("de ", "garçon de café", 7, 3) - ) - ); - } - - /** - * Data provider for testSubstrCount - * - * @return array Test data - */ - public function providerSubstrCount() - { - return array_merge( - parent::providerSubstrCount(), - array( - array(2, "garçon de café", "a"), - array(1, "garçon de café attristé", "ç"), - array(2, "garçon de café attristé", "é"), - array(1, "garçon de café attristé", "fé"), - ) - ); - } - - //providerSubstrCountException - - /** - * Data provider for testStrpos - * - * @return array Test data - */ - public function providerStrpos() - { - return array_merge( - parent::providerStrpos(), - array( - array(16, "garçon de café attristé", "t"), - array(13, "garçon de café attristé", "é"), - array(22, "garçon de café attristé", "é", 15), - ) - ); - } - - //providerStrpos - //providerStrrchr - //providerStrtolower -} diff --git a/test/libraries/stringNative_test.php b/test/libraries/stringNative_test.php deleted file mode 100644 index 5ac9de539d..0000000000 --- a/test/libraries/stringNative_test.php +++ /dev/null @@ -1,34 +0,0 @@ -markTestSkipped( - "Multibyte functions exist, can't test standard functions, skipping " - . "test." - ); - } - } -} diff --git a/test/libraries/string_test.php b/test/libraries/string_test.php new file mode 100644 index 0000000000..ce1e47a40d --- /dev/null +++ b/test/libraries/string_test.php @@ -0,0 +1,99 @@ + Date: Fri, 27 Mar 2015 19:16:49 +0530 Subject: [PATCH 3/3] rfe #354 PDF schema sort options Signed-off-by: Madhura Jayaratne --- ChangeLog | 1 + libraries/config.default.php | 7 +++++ libraries/plugins/schema/SchemaPdf.class.php | 12 +++++++ .../schema/pdf/Pdf_Relation_Schema.class.php | 31 +++++++++++++++++++ 4 files changed, 51 insertions(+) diff --git a/ChangeLog b/ChangeLog index d781ae6efc..cd2d2b6bf3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,7 @@ phpMyAdmin - ChangeLog + rfe #947 Show edit/delete also when there is calculated column + rfe #1619 Show databases as list instead of as dropdown when no database is selected + rfe Optional dark theme for the console ++ rfe #354 PDF schema sort options 4.4.1.0 (not yet released) - bug #4813 MySQL 5.7.6 and the Users menu tab diff --git a/libraries/config.default.php b/libraries/config.default.php index f01bb00019..87b463b4c3 100644 --- a/libraries/config.default.php +++ b/libraries/config.default.php @@ -2373,6 +2373,13 @@ $cfg['Schema']['pdf_show_grid'] = false; */ $cfg['Schema']['pdf_with_doc'] = true; +/** + * + * + * @global string $cfg['Schema']['pdf_table_order'] + */ +$cfg['Schema']['pdf_table_order'] = ''; + /** * * diff --git a/libraries/plugins/schema/SchemaPdf.class.php b/libraries/plugins/schema/SchemaPdf.class.php index 92a9846b61..6877a3a5bb 100644 --- a/libraries/plugins/schema/SchemaPdf.class.php +++ b/libraries/plugins/schema/SchemaPdf.class.php @@ -94,6 +94,18 @@ class SchemaPdf extends SchemaPlugin $leaf->setText(__('Data Dictionary')); $specificOptions->addProperty($leaf); + $leaf = new SelectPropertyItem(); + $leaf->setName("table_order"); + $leaf->setText(__('Order of the tables')); + $leaf->setValues( + array( + '' => __('None'), + 'name_asc' => __('Name (Ascending)'), + 'name_desc' => __('Name (Descending)'), + ) + ); + $specificOptions->addProperty($leaf); + // add the main group to the root group $exportSpecificOptions->addProperty($specificOptions); diff --git a/libraries/plugins/schema/pdf/Pdf_Relation_Schema.class.php b/libraries/plugins/schema/pdf/Pdf_Relation_Schema.class.php index 994ee43d11..eb96fa76ae 100644 --- a/libraries/plugins/schema/pdf/Pdf_Relation_Schema.class.php +++ b/libraries/plugins/schema/pdf/Pdf_Relation_Schema.class.php @@ -428,6 +428,7 @@ class PMA_Pdf_Relation_Schema extends PMA_Export_Relation_Schema */ private $_showGrid; private $_withDoc; + private $_tableOrder; private $_tables = array(); private $_ff = PMA_PDF_FONT; private $_xMax = 0; @@ -461,6 +462,7 @@ class PMA_Pdf_Relation_Schema extends PMA_Export_Relation_Schema $this->setTableDimension(isset($_REQUEST['pdf_show_table_dimension'])); $this->setAllTablesSameWidth(isset($_REQUEST['pdf_all_tables_same_width'])); $this->setWithDataDictionary(isset($_REQUEST['pdf_with_doc'])); + $this->setTableOrder($_REQUEST['pdf_table_order']); $this->setOrientation($_REQUEST['pdf_orientation']); $this->setPaper($_REQUEST['pdf_paper']); @@ -481,6 +483,11 @@ class PMA_Pdf_Relation_Schema extends PMA_Export_Relation_Schema $pdf->setOffline($this->offline); $alltables = $this->getTablesFromRequest(); + if ($this->getTableOrder() == 'name_asc') { + sort($alltables); + } else if ($this->getTableOrder() == 'name_desc') { + rsort($alltables); + } if ($this->_withDoc) { $pdf->SetAutoPageBreak('auto', 15); @@ -645,6 +652,30 @@ class PMA_Pdf_Relation_Schema extends PMA_Export_Relation_Schema return $this->_withDoc; } + /** + * Sets the order of the table in data dictionary + * + * @param string $value table order + * + * @return void + * + * @access public + */ + public function setTableOrder($value) + { + $this->_tableOrder = $value; + } + + /** + * Returns the order of the table in data dictionary + * + * @return string table order + */ + public function getTableOrder() + { + return $this->_tableOrder; + } + /** * Output Pdf Document for download *