diff --git a/Documentation.html b/Documentation.html
index 307a24a41c..42b906ef49 100644
--- a/Documentation.html
+++ b/Documentation.html
@@ -3298,9 +3298,9 @@ RewriteRule .* - [F]
$cfg['ThemeDefault'].
Under $cfg['ThemePath'], you
- should not delete the directory "original" or its underlying
+ should not delete the directory "pmahomme" or its underlying
structure, because this is the system theme used by phpMyAdmin.
- "original" contains all images and styles, for backwards
+ "pmahomme" contains all images and styles, for backwards
compatibility and for all themes that would not include images or css-files.
@@ -3313,7 +3313,7 @@ RewriteRule .* - [F]
- make a new subdirectory (for example "your_theme_name") under
$cfg['ThemePath']
(by default
themes)
- - copy the files and directories from "original" to
+
- copy the files and directories from "pmahomme" to
"your_theme_name"
- edit the css-files in "your_theme_name/css"
- put your new images in "your_theme_name/img"
@@ -3333,7 +3333,7 @@ RewriteRule .* - [F]
If you do not want to use your own symbols and buttons, remove the
directory "img" in "your_theme_name". phpMyAdmin will
- use the default icons and buttons (from the system-theme "original").
+ use the default icons and buttons (from the system-theme "pmahomme").
To select relation, click:
- ![[relation icon]](themes/original/img/pmd/help_relation.png)
+ ![[relation icon]](themes/pmahomme/img/pmd/help_relation.png)
The display column is shown in pink. To set/unset a column as the display column, click the "Choose column to display" icon, then click on the appropriate column name.
diff --git a/libraries/Theme.class.php b/libraries/Theme.class.php
index d0eccf7828..cdb91b5334 100644
--- a/libraries/Theme.class.php
+++ b/libraries/Theme.class.php
@@ -148,22 +148,30 @@ class PMA_Theme
*/
public function checkImgPath()
{
+ // try current theme first
if (is_dir($this->getPath() . '/img/')) {
$this->setImgPath($this->getPath() . '/img/');
return true;
- } elseif (is_dir($GLOBALS['cfg']['ThemePath'] . '/' . PMA_Theme_Manager::FALLBACK_THEME . '/img/')) {
- $this->setImgPath($GLOBALS['cfg']['ThemePath'] . '/' . PMA_Theme_Manager::FALLBACK_THEME . '/img/');
- return true;
- } else {
- trigger_error(
- sprintf(
- __('No valid image path for theme %s found!'),
- $this->getName()
- ),
- E_USER_ERROR
- );
- return false;
}
+
+ // try fallback theme
+ $fallback = $GLOBALS['cfg']['ThemePath'] . '/'
+ . PMA_Theme_Manager::FALLBACK_THEME
+ . '/img/';
+ if (is_dir($fallback)) {
+ $this->setImgPath($fallback);
+ return true;
+ }
+
+ // we failed
+ trigger_error(
+ sprintf(
+ __('No valid image path for theme %s found!'),
+ $this->getName()
+ ),
+ E_USER_ERROR
+ );
+ return false;
}
/**
@@ -301,14 +309,27 @@ class PMA_Theme
}
/**
- * Returns the path to images for the theme
+ * Returns the path to image for the theme.
+ * If filename is given, it possibly fallbacks to fallback
+ * theme for it if image does not exist.
+ *
+ * @param string $file file name for image
*
* @access public
* @return string image path for this theme
*/
- public function getImgPath()
+ public function getImgPath($file = null)
{
- return $this->img_path;
+ if (is_null($file)) {
+ return $this->img_path;
+ } else {
+ if (is_readable($this->img_path . $file)) {
+ return $this->img_path . $file;
+ } else {
+ return $GLOBALS['cfg']['ThemePath'] . '/'
+ . PMA_Theme_Manager::FALLBACK_THEME . '/img/' . $file;
+ }
+ }
}
/**
@@ -324,7 +345,7 @@ class PMA_Theme
*
* @see PMA_SQP_buildCssData()
*/
- public function SQP_buildCssRule($classname, $property, $value)
+ public function buildSQPCssRule($classname, $property, $value)
{
$str = '.' . $classname . ' {';
if ($value != '') {
@@ -347,17 +368,17 @@ class PMA_Theme
*
* @see PMA_SQP_buildCssRule()
*/
- public function SQP_buildCssData()
+ public function buildSQPCssData()
{
global $cfg;
$css_string = '';
foreach ($cfg['SQP']['fmtColor'] AS $key => $col) {
- $css_string .= $this->SQP_buildCssRule('syntax_' . $key, 'color', $col);
+ $css_string .= $this->buildSQPCssRule('syntax_' . $key, 'color', $col);
}
for ($i = 0; $i < 8; $i++) {
- $css_string .= $this->SQP_buildCssRule(
+ $css_string .= $this->buildSQPCssRule(
'syntax_indent' . $i, 'margin-left',
($i * $cfg['SQP']['fmtInd']) . $cfg['SQP']['fmtIndUnit']
);
@@ -376,7 +397,7 @@ class PMA_Theme
{
$success = true;
- echo $this->SQP_buildCssData();
+ echo $this->buildSQPCssData();
if ($GLOBALS['text_dir'] === 'ltr') {
$right = 'right';
@@ -388,7 +409,8 @@ class PMA_Theme
foreach ($this->_cssFiles as $file) {
$path = $this->getPath() . "/css/$file.css.php";
- $fallback = "./themes/" . PMA_Theme_Manager::FALLBACK_THEME . "/css/$file.css.php";
+ $fallback = "./themes/"
+ . PMA_Theme_Manager::FALLBACK_THEME . "/css/$file.css.php";
if (is_readable($path)) {
echo "\n/* FILE: $file.css.php */\n";
@@ -481,21 +503,33 @@ class PMA_Theme
{
$result = array();
// Opera 9.5+, IE 9
- $result[] = 'background-image: url(./themes/svg_gradient.php?from=' . $start_color . '&to=' . $end_color . ');';
+ $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 . '));';
+ $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 . ');';
+ $result[] = 'background: -webkit-linear-gradient(top, #'
+ . $start_color . ', #' . $end_color . ');';
// Firefox 3.6+
- $result[] = 'background: -moz-linear-gradient(top, #' . $start_color . ', #' . $end_color . ');';
+ $result[] = 'background: -moz-linear-gradient(top, #'
+ . $start_color . ', #' . $end_color . ');';
// IE 10
- $result[] = 'background: -ms-linear-gradient(top, #' . $start_color . ', #' . $end_color . ');';
+ $result[] = 'background: -ms-linear-gradient(top, #'
+ . $start_color . ', #' . $end_color . ');';
// Opera 11.10
- $result[] = 'background: -o-linear-gradient(top, #' . $start_color . ', #' . $end_color . ');';
+ $result[] = 'background: -o-linear-gradient(top, #'
+ . $start_color . ', #' . $end_color . ');';
// IE 6-8
- if (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 6 && PMA_USR_BROWSER_VER <= 8) {
- $result[] = 'filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#' . $start_color . '", endColorstr="#' . $end_color . '");';
+ if (PMA_USR_BROWSER_AGENT == 'IE'
+ && PMA_USR_BROWSER_VER >= 6
+ && PMA_USR_BROWSER_VER <= 8
+ ) {
+ $result[] = 'filter: '
+ . 'progid:DXImageTransform.Microsoft.gradient(startColorstr="#'
+ . $start_color . '", endColorstr="#' . $end_color . '");';
}
return implode("\n", $result);
}
@@ -512,37 +546,48 @@ class PMA_Theme
}
$result[] = 'span.cm-keyword, span.cm-statement-verb {';
- $result[] = ' color: ' . $GLOBALS['cfg']['SQP']['fmtColor']['alpha_reservedWord'] . ';';
+ $result[] = ' color: '
+ . $GLOBALS['cfg']['SQP']['fmtColor']['alpha_reservedWord'] . ';';
$result[] = '}';
$result[] = 'span.cm-variable {';
- $result[] = ' color: ' . $GLOBALS['cfg']['SQP']['fmtColor']['alpha_identifier'] . ';';
+ $result[] = ' color: '
+ . $GLOBALS['cfg']['SQP']['fmtColor']['alpha_identifier'] . ';';
$result[] = '}';
$result[] = 'span.cm-comment {';
- $result[] = ' color: ' . $GLOBALS['cfg']['SQP']['fmtColor']['comment'] . ';';
+ $result[] = ' color: '
+ . $GLOBALS['cfg']['SQP']['fmtColor']['comment'] . ';';
$result[] = '}';
$result[] = 'span.cm-mysql-string {';
- $result[] = ' color: ' . $GLOBALS['cfg']['SQP']['fmtColor']['quote'] . ';';
+ $result[] = ' color: '
+ . $GLOBALS['cfg']['SQP']['fmtColor']['quote'] . ';';
$result[] = '}';
$result[] = 'span.cm-operator {';
- $result[] = ' color: ' . $GLOBALS['cfg']['SQP']['fmtColor']['punct'] . ';';
+ $result[] = ' color: '
+ . $GLOBALS['cfg']['SQP']['fmtColor']['punct'] . ';';
$result[] = '}';
$result[] = 'span.cm-mysql-word {';
- $result[] = ' color: ' . $GLOBALS['cfg']['SQP']['fmtColor']['alpha_identifier'] . ';';
+ $result[] = ' color: '
+ . $GLOBALS['cfg']['SQP']['fmtColor']['alpha_identifier'] . ';';
$result[] = '}';
$result[] = 'span.cm-builtin {';
- $result[] = ' color: ' . $GLOBALS['cfg']['SQP']['fmtColor']['alpha_functionName'] . ';';
+ $result[] = ' color: '
+ . $GLOBALS['cfg']['SQP']['fmtColor']['alpha_functionName'] . ';';
$result[] = '}';
$result[] = 'span.cm-variable-2 {';
- $result[] = ' color: ' . $GLOBALS['cfg']['SQP']['fmtColor']['alpha_columnType'] . ';';
+ $result[] = ' color: '
+ . $GLOBALS['cfg']['SQP']['fmtColor']['alpha_columnType'] . ';';
$result[] = '}';
$result[] = 'span.cm-variable-3 {';
- $result[] = ' color: ' . $GLOBALS['cfg']['SQP']['fmtColor']['alpha_columnAttrib'] . ';';
+ $result[] = ' color: '
+ . $GLOBALS['cfg']['SQP']['fmtColor']['alpha_columnAttrib'] . ';';
$result[] = '}';
$result[] = 'span.cm-separator {';
- $result[] = ' color: ' . $GLOBALS['cfg']['SQP']['fmtColor']['punct'] . ';';
+ $result[] = ' color: '
+ . $GLOBALS['cfg']['SQP']['fmtColor']['punct'] . ';';
$result[] = '}';
$result[] = 'span.cm-number {';
- $result[] = ' color: ' . $GLOBALS['cfg']['SQP']['fmtColor']['digit_integer'] . ';';
+ $result[] = ' color: '
+ . $GLOBALS['cfg']['SQP']['fmtColor']['digit_integer'] . ';';
$result[] = '}';
return implode("\n", $result);
diff --git a/libraries/config.default.php b/libraries/config.default.php
index ba0e9e1e35..5ec68f017d 100644
--- a/libraries/config.default.php
+++ b/libraries/config.default.php
@@ -518,9 +518,9 @@ $cfg['Servers'][$i]['tracking_add_drop_table'] = true;
$cfg['Servers'][$i]['tracking_add_drop_database'] = true;
/**
- * Enables caching of TABLE STATUS outputs for specific databases on this server
- * (in some cases TABLE STATUS can be very slow, so you may want to cache it).
- * APC is used (if the PHP extension is available, if not, this setting is ignored
+ * Enables caching of TABLE STATUS outputs for specific databases on this server
+ * (in some cases TABLE STATUS can be very slow, so you may want to cache it).
+ * APC is used (if the PHP extension is available, if not, this setting is ignored
* silently). You have to provide StatusCacheLifetime.
* Takes effect only if DisableIS is true.
*
diff --git a/pmd_general.php b/pmd_general.php
index f9a8c45948..bdc52f376d 100644
--- a/pmd_general.php
+++ b/pmd_general.php
@@ -79,64 +79,64 @@ echo $script_tabs . $script_contr . $script_display_field;
+ alt="v" src="getImgPath('pmd/downarrow2_m.png'); ?>" />


; ?>)

; ?>)

; ?>)

; ?>)


; ?>)
; ?>)



; ?>)
; ?>)
-
+
-
+
-
+

';
- echo '
getImgPath('pmd/query_builder.png') . '" alt="key" width="20" height="20" title="';
echo __('Build Query');
echo '"/>';
}
?>
-
@@ -149,11 +149,11 @@ if (isset($_REQUEST['query'])) {
+ src="getImgPath('pmd/downarrow1.png'); ?>" id='key_HS_all' />
+ src="getImgPath('pmd/downarrow2.png'); ?>" id='key_HS' />