From a6df16e8dda554b15777441f259704d46497f997 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maur=C3=ADcio=20Meneghini=20Fauth?= Date: Sat, 19 Sep 2020 11:53:04 -0300 Subject: [PATCH 1/5] Remove unsed method in the CentralColumns class MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maurício Meneghini Fauth --- libraries/classes/CentralColumns.php | 30 -------------------- templates/database/central_columns/main.twig | 2 +- test/classes/CentralColumnsTest.php | 19 ------------- 3 files changed, 1 insertion(+), 50 deletions(-) diff --git a/libraries/classes/CentralColumns.php b/libraries/classes/CentralColumns.php index db7cf5265b..348c904b72 100644 --- a/libraries/classes/CentralColumns.php +++ b/libraries/classes/CentralColumns.php @@ -9,7 +9,6 @@ namespace PhpMyAdmin; use PhpMyAdmin\Charsets\Charset; use PhpMyAdmin\Charsets\Collation; -use PhpMyAdmin\Html\Generator; use function array_unique; use function bin2hex; use function ceil; @@ -857,35 +856,6 @@ class CentralColumns return $columns_list; } - /** - * Get HTML for "check all" check box with "with selected" dropdown - * - * @param string $themeImagePath pma theme image url - * @param string $text_dir url for text directory - */ - public function getTableFooter(string $themeImagePath, string $text_dir): string - { - $html_output = $this->template->render('select_all', [ - 'theme_image_path' => $themeImagePath, - 'text_dir' => $text_dir, - 'form_name' => 'tableslistcontainer', - ]); - - $html_output .= '' . "\n"; - - $html_output .= '' . "\n"; - - return $html_output; - } - /** * function generate and return the table footer for * multiple edit central columns page diff --git a/templates/database/central_columns/main.twig b/templates/database/central_columns/main.twig index 9d988c5b49..94610e83cd 100644 --- a/templates/database/central_columns/main.twig +++ b/templates/database/central_columns/main.twig @@ -371,7 +371,7 @@ {% endfor %} - {# getTableFooter #} + {% include 'select_all.twig' with { 'theme_image_path': theme_image_path, 'text_dir' : text_dir, diff --git a/test/classes/CentralColumnsTest.php b/test/classes/CentralColumnsTest.php index 9b4a74a9e6..ec02bd3954 100644 --- a/test/classes/CentralColumnsTest.php +++ b/test/classes/CentralColumnsTest.php @@ -721,25 +721,6 @@ class CentralColumnsTest extends AbstractTestCase ); } - /** - * Test for getTableFooter - */ - public function testGetTableFooter(): void - { - $themeImagePath = 'themeImagePath'; - $text_dir = 'text_dir'; - $result = $this->centralColumns->getTableFooter($themeImagePath, $text_dir); - $this->assertStringContainsString( - 'assertStringContainsString('With selected:', $result); - $this->assertStringContainsString( - '