diff --git a/libraries/classes/Theme.php b/libraries/classes/Theme.php index 7eb5dbf7279f..ec9073772059 100644 --- a/libraries/classes/Theme.php +++ b/libraries/classes/Theme.php @@ -217,17 +217,6 @@ public function getPath() return $this->path; } - /** - * returns layout file - * - * @access public - * @return string layout file - */ - public function getLayoutFile() - { - return $this->getPath() . '/layout.inc.php'; - } - /** * set path to theme * @@ -416,38 +405,4 @@ public function getPrintPreview() 'screen' => $screen, ]); } - - /** - * Generates code for CSS gradient using various browser extensions. - * - * @param string $start_color Color of gradient start, hex value without # - * @param string $end_color Color of gradient end, hex value without # - * - * @return string CSS code. - */ - public function getCssGradient($start_color, $end_color) - { - $result = []; - // Opera 9.5+, IE 9 - $result[] = 'background-image: url(./themes/svg_gradient.php?from=' - . $start_color . '&to=' . $end_color . ');'; - $result[] = 'background-size: 100% 100%;'; - // Safari 4-5, Chrome 1-9 - $result[] = 'background: ' - . '-webkit-gradient(linear, left top, left bottom, from(#' - . $start_color . '), to(#' . $end_color . '));'; - // Safari 5.1, Chrome 10+ - $result[] = 'background: -webkit-linear-gradient(top, #' - . $start_color . ', #' . $end_color . ');'; - // Firefox 3.6+ - $result[] = 'background: -moz-linear-gradient(top, #' - . $start_color . ', #' . $end_color . ');'; - // IE 10 - $result[] = 'background: -ms-linear-gradient(top, #' - . $start_color . ', #' . $end_color . ');'; - // Opera 11.10 - $result[] = 'background: -o-linear-gradient(top, #' - . $start_color . ', #' . $end_color . ');'; - return implode("\n", $result); - } } diff --git a/libraries/classes/ThemeManager.php b/libraries/classes/ThemeManager.php index 89ee24d2b00c..c3da79a774e7 100644 --- a/libraries/classes/ThemeManager.php +++ b/libraries/classes/ThemeManager.php @@ -446,12 +446,5 @@ public static function initializeTheme() * @global string $GLOBALS['pmaThemeImage'] */ $GLOBALS['pmaThemeImage'] = $GLOBALS['PMA_Theme']->getImgPath(); - - /** - * load layout file if exists - */ - if (@file_exists($GLOBALS['PMA_Theme']->getLayoutFile())) { - include $GLOBALS['PMA_Theme']->getLayoutFile(); - } } } diff --git a/test/classes/ThemeTest.php b/test/classes/ThemeTest.php index 6c47e0094dcd..9a91ef8e767d 100644 --- a/test/classes/ThemeTest.php +++ b/test/classes/ThemeTest.php @@ -44,7 +44,6 @@ protected function setUp() $GLOBALS['PMA_Config'] = new Config(); $GLOBALS['PMA_Config']->enableBc(); $GLOBALS['text_dir'] = 'ltr'; - include 'themes/pmahomme/layout.inc.php'; $GLOBALS['server'] = '99'; } @@ -209,16 +208,6 @@ public function testGetSetPath() $this->assertEquals('./themes/original', $this->object->getPath()); } - /** - * Test for Theme::loadInfo - * - * @return void - */ - public function testGetLayoutFile() - { - $this->assertContains('layout.inc.php', $this->object->getLayoutFile()); - } - /** * Test for Theme::checkVersion * @@ -304,26 +293,6 @@ public function testGetPrintPreview() ); } - /** - * Test for getCssGradient - * - * @return void - */ - public function testgetCssGradient() - { - $this->assertEquals( - $this->object->getCssGradient('12345', '54321'), - 'background-image: url(./themes/svg_gradient.php?from=12345&to=54321);' - . "\n" . 'background-size: 100% 100%;' - . "\n" . 'background: -webkit-gradient(linear, left top, left bottom, ' - . 'from(#12345), to(#54321));' - . "\n" . 'background: -webkit-linear-gradient(top, #12345, #54321);' - . "\n" . 'background: -moz-linear-gradient(top, #12345, #54321);' - . "\n" . 'background: -ms-linear-gradient(top, #12345, #54321);' - . "\n" . 'background: -o-linear-gradient(top, #12345, #54321);' - ); - } - /** * Test for getImgPath * diff --git a/themes/.gitignore b/themes/.gitignore index 4f6acac5acfd..694eb9f21d1c 100644 --- a/themes/.gitignore +++ b/themes/.gitignore @@ -1,7 +1,6 @@ /* !/.gitignore !/dot.gif -!/svg_gradient.php !/original/ !/pmahomme/ !/metro/ diff --git a/themes/metro/layout.inc.php b/themes/metro/layout.inc.php deleted file mode 100644 index 9da4cc164f84..000000000000 --- a/themes/metro/layout.inc.php +++ /dev/null @@ -1,169 +0,0 @@ - ['regexp' => '/^[a-z0-9]+$/i']]; - $color = filter_input(INPUT_GET, $get_name, FILTER_VALIDATE_REGEXP, $opts); - if (preg_match('/^[a-f0-9]{6}$/', $color)) { - return '#' . $color; - } - return $color ? $color : $default; -} - -$from = PMA_gradientGetColor('from', 'white'); -$to = PMA_gradientGetColor('to', 'blank'); - -echo ''; -?> - - - - - - - - -