Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Čihař <michal@cihar.com>2017-11-02 17:03:06 +0300
committerMichal Čihař <michal@cihar.com>2017-11-13 16:12:12 +0300
commitcedad5f9314b9ac5bf2f5017bd57ca321b2cfb6e (patch)
tree1c7539f24d09d079e199d832d5b496f2af9d14c8 /libraries/classes/Theme.php
parentf1f011b72629e1e62fe34d629c992a896562b0f0 (diff)
Remove sprites from the themes
Signed-off-by: Michal Čihař <michal@cihar.com>
Diffstat (limited to 'libraries/classes/Theme.php')
-rw-r--r--libraries/classes/Theme.php74
1 files changed, 0 insertions, 74 deletions
diff --git a/libraries/classes/Theme.php b/libraries/classes/Theme.php
index 86d44bc299..965d507114 100644
--- a/libraries/classes/Theme.php
+++ b/libraries/classes/Theme.php
@@ -82,11 +82,6 @@ class Theme
);
/**
- * Sprite data
- */
- private $sprites;
-
- /**
* Loads theme information
*
* @return boolean whether loading them info was successful or not
@@ -391,79 +386,10 @@ class Theme
$success = false;
}
}
-
- $sprites = $this->getSpriteData();
- /* Check if there is a valid data file for sprites */
- if (count($sprites) > 0) {
-
- $bg = $this->getImgPath() . 'sprites.png?v=' . urlencode(PMA_VERSION);
- ?>
- /* Icon sprites */
- .icon {
- margin: 0;
- margin-<?php echo $left; ?>: .3em;
- padding: 0 !important;
- width: 16px;
- height: 16px;
- background-image: url('<?php echo $bg; ?>') !important;
- background-repeat: no-repeat !important;
- background-position: top left !important;
- }
- <?php
-
- $template = ".ic_%s { background-position: 0 -%upx !important;%s%s }\n";
- foreach ($sprites as $name => $data) {
- // generate the CSS code for each icon
- $width = '';
- $height = '';
- // if either the height or width of an icon is 16px,
- // then it's pointless to set this as a parameter,
- //since it will be inherited from the "icon" class
- if ($data['width'] != 16) {
- $width = " width: " . $data['width'] . "px;";
- }
- if ($data['height'] != 16) {
- $height = " height: " . $data['height'] . "px;";
- }
- printf(
- $template,
- $name,
- ($data['position'] * 16),
- $width,
- $height
- );
- }
- }
-
return $success;
}
/**
- * Loads sprites data
- *
- * @return array with sprites
- */
- public function getSpriteData()
- {
- if (is_null($this->sprites)) {
- $sprites = array();
- $filename = $this->getPath() . '/sprites.lib.php';
- if (is_readable($filename)) {
-
- // This defines sprites array
- include $filename;
-
- // Backwards compatibility for themes from 4.6 and older
- if (function_exists('PMA_sprites')) {
- $sprites = PMA_sprites();
- }
- }
- $this->sprites = $sprites;
- }
- return $this->sprites;
- }
-
- /**
* Renders the preview for this theme
*
* @return string