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:
-rw-r--r--ChangeLog13
-rw-r--r--README2
-rw-r--r--js/ajax.js2
-rw-r--r--js/functions.js6
-rw-r--r--js/line_counts.php4
-rw-r--r--js/messages.php1
-rw-r--r--js/navigation.js9
-rw-r--r--js/server_status_processes.js1
-rw-r--r--libraries/Config.class.php2
-rw-r--r--libraries/DatabaseInterface.class.php10
-rw-r--r--libraries/DisplayResults.class.php32
-rw-r--r--libraries/Scripts.class.php2
-rw-r--r--libraries/Util.class.php50
-rw-r--r--libraries/language_stats.inc.php12
-rw-r--r--libraries/navigation/NavigationTree.class.php41
-rw-r--r--libraries/navigation/Nodes/Node.class.php5
-rw-r--r--libraries/navigation/Nodes/Node_Database.class.php2
-rw-r--r--libraries/navigation/Nodes/Node_Table.class.php19
-rw-r--r--libraries/plugins/schema/Export_Relation_Schema.class.php24
-rw-r--r--libraries/plugins/schema/dia/Dia_Relation_Schema.class.php8
-rw-r--r--libraries/plugins/schema/dia/TableStatsDia.class.php4
-rw-r--r--libraries/plugins/schema/eps/Eps_Relation_Schema.class.php8
-rw-r--r--libraries/plugins/schema/eps/TableStatsEps.class.php4
-rw-r--r--libraries/plugins/schema/pdf/Pdf_Relation_Schema.class.php44
-rw-r--r--libraries/plugins/schema/pdf/TableStatsPdf.class.php4
-rw-r--r--libraries/plugins/schema/svg/Svg_Relation_Schema.class.php8
-rw-r--r--libraries/plugins/schema/svg/TableStatsSvg.class.php4
-rw-r--r--libraries/relation_cleanup.lib.php4
-rw-r--r--libraries/structure.lib.php4
-rw-r--r--locale/az/LC_MESSAGES/phpmyadmin.mobin124374 -> 124370 bytes
-rw-r--r--locale/ca/LC_MESSAGES/phpmyadmin.mobin276001 -> 281619 bytes
-rw-r--r--locale/da/LC_MESSAGES/phpmyadmin.mobin328116 -> 329212 bytes
-rw-r--r--locale/el/LC_MESSAGES/phpmyadmin.mobin460751 -> 461113 bytes
-rw-r--r--locale/es/LC_MESSAGES/phpmyadmin.mobin346551 -> 346846 bytes
-rw-r--r--locale/et/LC_MESSAGES/phpmyadmin.mobin322940 -> 323429 bytes
-rw-r--r--locale/fi/LC_MESSAGES/phpmyadmin.mobin176067 -> 177390 bytes
-rw-r--r--locale/fr/LC_MESSAGES/phpmyadmin.mobin347766 -> 347766 bytes
-rw-r--r--locale/hu/LC_MESSAGES/phpmyadmin.mobin343899 -> 350232 bytes
-rw-r--r--locale/ia/LC_MESSAGES/phpmyadmin.mobin188709 -> 189858 bytes
-rw-r--r--locale/id/LC_MESSAGES/phpmyadmin.mobin207663 -> 209986 bytes
-rw-r--r--locale/it/LC_MESSAGES/phpmyadmin.mobin269899 -> 272893 bytes
-rw-r--r--locale/nl/LC_MESSAGES/phpmyadmin.mobin337993 -> 337999 bytes
-rw-r--r--locale/pt_BR/LC_MESSAGES/phpmyadmin.mobin317522 -> 320369 bytes
-rw-r--r--locale/sk/LC_MESSAGES/phpmyadmin.mobin222111 -> 229952 bytes
-rw-r--r--server_privileges.php4
45 files changed, 179 insertions, 154 deletions
diff --git a/ChangeLog b/ChangeLog
index ae769dadcf..dbae4a1809 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,19 @@
phpMyAdmin - ChangeLog
======================
+4.3.7.0 (2015-01-15)
+- bug #4694 js error on marking table as favorite in Safari (in private mode)
+- bug #4695 Changing $cfg['DefaultTabTable'] doesn't update link and title
+- bug Undefined index menuswork
+- bug Undefined index navwork
+- bug Undefined index central_columnswork
+- bug #4697 Server Status refresh not behaving as expected
+- bug Null argument in array_multisort()
+- bug #4699 Navigation panel should not hide icons based on 'TableNavigationLinksMode'
+- bug #4703 Unsaved schema page exported as pdf.pdf
+- bug #4707 Call to undefined method PMA_Schema_PDF::dieSchema()
+- bug #4702 URL is non RFC-2396 compatible in get_scripts.js.php
+
4.3.6.0 (2015-01-07)
- bug Undefined index notices while configuring recent and favorite tables
- bug #4687 Designer breaks without configuration storage
diff --git a/README b/README
index 0d5848f28f..40ea02bed8 100644
--- a/README
+++ b/README
@@ -1,7 +1,7 @@
phpMyAdmin - Readme
===================
-Version 4.3.6
+Version 4.3.7
A set of PHP-scripts to manage MySQL over the web.
diff --git a/js/ajax.js b/js/ajax.js
index da6584c26c..93f9bee761 100644
--- a/js/ajax.js
+++ b/js/ajax.js
@@ -525,7 +525,7 @@ var AJAX = {
if ($.inArray(script, self._scripts) == -1) {
needRequest = true;
this.add(script);
- request.push("scripts[]=" + script);
+ request.push("scripts%5B%5D=" + script);
}
}
request.push("call_done=1");
diff --git a/js/functions.js b/js/functions.js
index 2de4521393..d1fb1c1235 100644
--- a/js/functions.js
+++ b/js/functions.js
@@ -3840,14 +3840,13 @@ AJAX.registerOnload('functions.js', function () {
cache: false,
type: 'POST',
data: {
- favorite_tables: (window.localStorage && window.localStorage.favorite_tables
- !== undefined)
+ favorite_tables: (isStorageSupported('localStorage'))
? window.localStorage['favorite_tables']
: ''
},
success: function (data) {
// Update localStorage.
- if (window.localStorage && window.localStorage !== undefined) {
+ if (isStorageSupported('localStorage')) {
window.localStorage.favorite_tables
= data.favorite_tables;
}
@@ -4652,6 +4651,7 @@ function isStorageSupported(type)
}
} catch(error) {
// Not supported
+ PMA_ajaxShowMessage(PMA_messages.strNoLocalStorage, false);
}
return false;
}
diff --git a/js/line_counts.php b/js/line_counts.php
index 8b9d823d4e..01a9304b6d 100644
--- a/js/line_counts.php
+++ b/js/line_counts.php
@@ -100,7 +100,7 @@ $LINE_COUNT["tbl_select.js"] = 395;
$LINE_COUNT["replication.js"] = 72;
$LINE_COUNT["normalization.js"] = 707;
$LINE_COUNT["rte.js"] = 944;
-$LINE_COUNT["server_status_processes.js"] = 172;
+$LINE_COUNT["server_status_processes.js"] = 173;
$LINE_COUNT["tbl_relation.js"] = 227;
$LINE_COUNT["server_status_queries.js"] = 40;
$LINE_COUNT["tbl_structure.js"] = 546;
@@ -439,7 +439,7 @@ $LINE_COUNT["openlayers/src/openlayers/lib/OpenLayers/Feature.js"] = 227;
$LINE_COUNT["openlayers/src/openlayers/lib/OpenLayers/Tile/WFS.js"] = 192;
$LINE_COUNT["openlayers/src/openlayers/lib/OpenLayers/Tile/Image.js"] = 578;
$LINE_COUNT["openlayers/src/openlayers/lib/OpenLayers/Tile/Image/IFrame.js"] = 262;
-$LINE_COUNT["navigation.js"] = 1423;
+$LINE_COUNT["navigation.js"] = 1424;
$LINE_COUNT["import.js"] = 167;
$LINE_COUNT["server_status_variables.js"] = 109;
$LINE_COUNT["server_status_sorter.js"] = 89;
diff --git a/js/messages.php b/js/messages.php
index 51a3eadf2f..d1284124e1 100644
--- a/js/messages.php
+++ b/js/messages.php
@@ -526,6 +526,7 @@ $js_messages['phpErrorsBeingSubmitted'] = '<div class="error">'
$js_messages['strConsoleRequeryConfirm'] = __('Execute this query again?');
$js_messages['strConsoleDeleteBookmarkConfirm'] = __('Do you really want to delete this bookmark?');
+$js_messages['strNoLocalStorage'] = __('Your web browser does not support local storage of settings or the quota limit has been reached, some features may not work properly for you. In Safari, such problem is commonly caused by "Private Mode Browsing".');
echo "var PMA_messages = new Array();\n";
foreach ($js_messages as $name => $js_message) {
diff --git a/js/navigation.js b/js/navigation.js
index a72647dc7e..af470a9dd7 100644
--- a/js/navigation.js
+++ b/js/navigation.js
@@ -330,8 +330,7 @@ $(function () {
cache: false,
type: 'POST',
data: {
- favorite_tables: (window.localStorage && window.localStorage.favorite_tables
- !== undefined)
+ favorite_tables: (isStorageSupported('localStorage'))
? window.localStorage.favorite_tables
: ''
},
@@ -345,7 +344,7 @@ $(function () {
$('#' + anchor_id).attr("title")
);
// Update localStorage.
- if (window.localStorage && window.localStorage !== undefined) {
+ if (isStorageSupported('localStorage')) {
window.localStorage.favorite_tables = data.favorite_tables;
}
} else {
@@ -360,7 +359,9 @@ $(function () {
var storage = window.sessionStorage;
// remove tree from storage if Navi_panel config form is submitted
$(document).on('submit', 'form.config-form', function(event) {
- if ($(this).attr('action').indexOf('form=Navi_panel') >= 0) {
+ if ($(this).attr('action').indexOf('form=Navi_panel') >= 0 ||
+ $(this).attr('action').indexOf('form=Main_panel') >= 0
+ ) {
storage.removeItem('navTree');
}
});
diff --git a/js/server_status_processes.js b/js/server_status_processes.js
index 30be1af686..4e398982a9 100644
--- a/js/server_status_processes.js
+++ b/js/server_status_processes.js
@@ -152,6 +152,7 @@ AJAX.registerOnload('server_status_processes.js', function() {
// Bind event handler for change in refresh rate
$('#id_refreshRate').on('change', function(event) {
processList.refreshInterval = $(this).val();
+ processList.refresh();
});
// Bind event handler for table header links
$('#tableprocesslist').on('click', 'thead a', function() {
diff --git a/libraries/Config.class.php b/libraries/Config.class.php
index de90899621..db40270b82 100644
--- a/libraries/Config.class.php
+++ b/libraries/Config.class.php
@@ -114,7 +114,7 @@ class PMA_Config
*/
function checkSystem()
{
- $this->set('PMA_VERSION', '4.3.6');
+ $this->set('PMA_VERSION', '4.3.7');
/**
* @deprecated
*/
diff --git a/libraries/DatabaseInterface.class.php b/libraries/DatabaseInterface.class.php
index 507c63e349..a2b9fd0944 100644
--- a/libraries/DatabaseInterface.class.php
+++ b/libraries/DatabaseInterface.class.php
@@ -638,10 +638,12 @@ class PMA_DatabaseInterface
}
}
- if ($sort_order == 'DESC') {
- array_multisort($$sort_by, SORT_DESC, $each_tables);
- } else {
- array_multisort($$sort_by, SORT_ASC, $each_tables);
+ if (! empty($$sort_by)) {
+ if ($sort_order == 'DESC') {
+ array_multisort($$sort_by, SORT_DESC, $each_tables);
+ } else {
+ array_multisort($$sort_by, SORT_ASC, $each_tables);
+ }
}
// cleanup the temporary sort array
diff --git a/libraries/DisplayResults.class.php b/libraries/DisplayResults.class.php
index 0ffdf52be5..7f1d7d8326 100644
--- a/libraries/DisplayResults.class.php
+++ b/libraries/DisplayResults.class.php
@@ -580,6 +580,7 @@ class PMA_DisplayResults
* @param string $title text for button
* @param integer $pos position for next query
* @param string $html_sql_query query ready for display
+ * @param boolean $back whether 'begin' or 'previous'
* @param string $onsubmit optional onsubmit clause
* @param string $input_for_real_end optional hidden field for special treatment
* @param string $onclick optional onclick clause
@@ -592,17 +593,25 @@ class PMA_DisplayResults
* _getMoveForwardButtonsForTableNavigation()
*/
private function _getTableNavigationButton(
- $caption, $title, $pos, $html_sql_query, $onsubmit = '',
+ $caption, $title, $pos, $html_sql_query, $back, $onsubmit = '',
$input_for_real_end = '', $onclick = ''
) {
$caption_output = '';
- if (PMA_Util::showIcons('TableNavigationLinksMode')) {
- $caption_output .= $caption;
- }
-
- if (PMA_Util::showText('TableNavigationLinksMode')) {
- $caption_output .= '&nbsp;' . $title;
+ if ($back) {
+ if (PMA_Util::showIcons('TableNavigationLinksMode')) {
+ $caption_output .= $caption;
+ }
+ if (PMA_Util::showText('TableNavigationLinksMode')) {
+ $caption_output .= '&nbsp;' . $title;
+ }
+ } else {
+ if (PMA_Util::showText('TableNavigationLinksMode')) {
+ $caption_output .= $title;
+ }
+ if (PMA_Util::showIcons('TableNavigationLinksMode')) {
+ $caption_output .= '&nbsp;' . $caption;
+ }
}
$title_output = ' title="' . $title . '"';
@@ -833,11 +842,11 @@ class PMA_DisplayResults
$html_sql_query, $pos_prev
) {
return $this->_getTableNavigationButton(
- '&lt;&lt;', _pgettext('First page', 'Begin'), 0, $html_sql_query
+ '&lt;&lt;', _pgettext('First page', 'Begin'), 0, $html_sql_query, true
)
. $this->_getTableNavigationButton(
'&lt;', _pgettext('Previous page', 'Previous'), $pos_prev,
- $html_sql_query
+ $html_sql_query, true
);
} // end of the '_getMoveBackwardButtonsForTableNavigation()' function
@@ -900,7 +909,8 @@ class PMA_DisplayResults
'&gt;',
_pgettext('Next page', 'Next'),
$pos_next,
- $html_sql_query
+ $html_sql_query,
+ false
);
// prepare some options for the End button
@@ -932,7 +942,7 @@ class PMA_DisplayResults
$this->__get('unlim_num_rows')
/ $_SESSION['tmpval']['max_rows']
)- 1) * $maxRows),
- $html_sql_query, $onsubmit, $input_for_real_end, $onclick
+ $html_sql_query, false, $onsubmit, $input_for_real_end, $onclick
);
return $buttons_html;
diff --git a/libraries/Scripts.class.php b/libraries/Scripts.class.php
index eeb765c679..6bd2c914c0 100644
--- a/libraries/Scripts.class.php
+++ b/libraries/Scripts.class.php
@@ -78,7 +78,7 @@ class PMA_Scripts
}
}
if ($include) {
- $scripts[] = "scripts[]=" . $value['filename'];
+ $scripts[] = "scripts%5B%5D=" . $value['filename'];
}
}
$separator = PMA_URL_getArgSeparator();
diff --git a/libraries/Util.class.php b/libraries/Util.class.php
index 80e10f9589..60a50c5dea 100644
--- a/libraries/Util.class.php
+++ b/libraries/Util.class.php
@@ -2456,18 +2456,17 @@ class PMA_Util
// Move to the beginning or to the previous page
if ($pos > 0) {
+ $caption1 = ''; $caption2 = '';
if (self::showIcons('TableNavigationLinksMode')) {
- $caption1 = '&lt;&lt;';
- $caption2 = ' &lt; ';
- $title1 = ' title="' . _pgettext('First page', 'Begin') . '"';
- $title2 = ' title="'
- . _pgettext('Previous page', 'Previous') . '"';
- } else {
- $caption1 = _pgettext('First page', 'Begin') . ' &lt;&lt;';
- $caption2 = _pgettext('Previous page', 'Previous') . ' &lt;';
- $title1 = '';
- $title2 = '';
- } // end if... else...
+ $caption1 .= '&lt;&lt; ';
+ $caption2 .= '&lt; ';
+ }
+ if (self::showText('TableNavigationLinksMode')) {
+ $caption1 .= _pgettext('First page', 'Begin');
+ $caption2 .= _pgettext('Previous page', 'Previous');
+ }
+ $title1 = ' title="' . _pgettext('First page', 'Begin') . '"';
+ $title2 = ' title="' . _pgettext('Previous page', 'Previous') . '"';
$_url_params[$name] = 0;
$list_navigator_html .= '<a' . $class . $title1 . ' href="' . $script
@@ -2475,7 +2474,7 @@ class PMA_Util
. '</a>';
$_url_params[$name] = $pos - $max_count;
- $list_navigator_html .= '<a' . $class . $title2 . ' href="' . $script
+ $list_navigator_html .= ' <a' . $class . $title2 . ' href="' . $script
. PMA_URL_getCommon($_url_params) . '">' . $caption2
. '</a>';
}
@@ -2493,17 +2492,20 @@ class PMA_Util
$list_navigator_html .= '</form>';
if ($pos + $max_count < $count) {
- if ( self::showIcons('TableNavigationLinksMode')) {
- $caption3 = ' &gt; ';
- $caption4 = '&gt;&gt;';
- $title3 = ' title="' . _pgettext('Next page', 'Next') . '"';
- $title4 = ' title="' . _pgettext('Last page', 'End') . '"';
- } else {
- $caption3 = '&gt; ' . _pgettext('Next page', 'Next');
- $caption4 = '&gt;&gt; ' . _pgettext('Last page', 'End');
- $title3 = '';
- $title4 = '';
- } // end if... else...
+ $caption3 = ''; $caption4 = '';
+ if (self::showText('TableNavigationLinksMode')) {
+ $caption3 .= _pgettext('Next page', 'Next');
+ $caption4 .= _pgettext('Last page', 'End');
+ }
+ if (self::showIcons('TableNavigationLinksMode')) {
+ $caption3 .= ' &gt;';
+ $caption4 .= ' &gt;&gt;';
+ if (! self::showText('TableNavigationLinksMode')) {
+
+ }
+ }
+ $title3 = ' title="' . _pgettext('Next page', 'Next') . '"';
+ $title4 = ' title="' . _pgettext('Last page', 'End') . '"';
$_url_params[$name] = $pos + $max_count;
$list_navigator_html .= '<a' . $class . $title3 . ' href="' . $script
@@ -2515,7 +2517,7 @@ class PMA_Util
$_url_params[$name] = $count - $max_count;
}
- $list_navigator_html .= '<a' . $class . $title4 . ' href="' . $script
+ $list_navigator_html .= ' <a' . $class . $title4 . ' href="' . $script
. PMA_URL_getCommon($_url_params) . '" >' . $caption4
. '</a>';
}
diff --git a/libraries/language_stats.inc.php b/libraries/language_stats.inc.php
index 430e8bc024..60c0ef10a6 100644
--- a/libraries/language_stats.inc.php
+++ b/libraries/language_stats.inc.php
@@ -12,11 +12,11 @@ $GLOBALS["language_stats"] = array (
'bn' => 85,
'br' => 19,
'bs' => 14,
- 'ca' => 83,
+ 'ca' => 84,
'ckb' => 17,
'cs' => 94,
'cy' => 20,
- 'da' => 99,
+ 'da' => 100,
'de' => 99,
'el' => 99,
'en_GB' => 90,
@@ -30,11 +30,11 @@ $GLOBALS["language_stats"] = array (
'he' => 19,
'hi' => 42,
'hr' => 33,
- 'hu' => 99,
+ 'hu' => 100,
'hy' => 3,
'ia' => 63,
'id' => 74,
- 'it' => 79,
+ 'it' => 80,
'ja' => 73,
'ka' => 15,
'kk' => 10,
@@ -54,12 +54,12 @@ $GLOBALS["language_stats"] = array (
'nl' => 99,
'pa' => 2,
'pl' => 88,
- 'pt_BR' => 93,
+ 'pt_BR' => 95,
'pt' => 60,
'ro' => 60,
'ru' => 99,
'si' => 67,
- 'sk' => 76,
+ 'sk' => 77,
'sl' => 99,
'sq' => 100,
'sr@latin' => 51,
diff --git a/libraries/navigation/NavigationTree.class.php b/libraries/navigation/NavigationTree.class.php
index 1b9ae22c61..2dd06e6114 100644
--- a/libraries/navigation/NavigationTree.class.php
+++ b/libraries/navigation/NavigationTree.class.php
@@ -693,12 +693,9 @@ class PMA_NavigationTree
);
$groups[$key]->separator = $node->separator;
$groups[$key]->separator_depth = $node->separator_depth - 1;
- $groups[$key]->icon = '';
- if (PMA_Util::showIcons('TableNavigationLinksMode')) {
- $groups[$key]->icon = PMA_Util::getImage(
- 'b_group.png'
- );
- }
+ $groups[$key]->icon = PMA_Util::getImage(
+ 'b_group.png'
+ );
$groups[$key]->pos2 = $node->pos2;
$groups[$key]->pos3 = $node->pos3;
if ($node instanceof Node_Table_Container
@@ -1025,25 +1022,25 @@ class PMA_NavigationTree
if ($node->type == Node::CONTAINER) {
$retval .= "<i>";
}
- if (PMA_Util::showIcons('TableNavigationLinksMode')) {
- $retval .= "<div class='block'>";
- if (isset($node->links['icon'])) {
- $args = array();
- foreach ($node->parents(true) as $parent) {
- $args[] = urlencode($parent->real_name);
- }
- $link = vsprintf($node->links['icon'], $args);
- if ($linkClass != '') {
- $retval .= "<a class='$linkClass' href='$link'>";
- $retval .= "{$node->icon}</a>";
- } else {
- $retval .= "<a href='$link'>{$node->icon}</a>";
- }
+
+ $retval .= "<div class='block'>";
+ if (isset($node->links['icon'])) {
+ $args = array();
+ foreach ($node->parents(true) as $parent) {
+ $args[] = urlencode($parent->real_name);
+ }
+ $link = vsprintf($node->links['icon'], $args);
+ if ($linkClass != '') {
+ $retval .= "<a class='$linkClass' href='$link'>";
+ $retval .= "{$node->icon}</a>";
} else {
- $retval .= "<u>{$node->icon}</u>";
+ $retval .= "<a href='$link'>{$node->icon}</a>";
}
- $retval .= "</div>";
+ } else {
+ $retval .= "<u>{$node->icon}</u>";
}
+ $retval .= "</div>";
+
if (isset($node->links['text'])) {
$args = array();
foreach ($node->parents(true) as $parent) {
diff --git a/libraries/navigation/Nodes/Node.class.php b/libraries/navigation/Nodes/Node.class.php
index dd714624e0..a9bb228edd 100644
--- a/libraries/navigation/Nodes/Node.class.php
+++ b/libraries/navigation/Nodes/Node.class.php
@@ -91,6 +91,11 @@ class Node
public $links;
/**
+ * @var string HTML title
+ */
+ public $title;
+
+ /**
* @var string Extra CSS classes for the node
*/
public $classes = '';
diff --git a/libraries/navigation/Nodes/Node_Database.class.php b/libraries/navigation/Nodes/Node_Database.class.php
index 9abb521eef..74dff6cd35 100644
--- a/libraries/navigation/Nodes/Node_Database.class.php
+++ b/libraries/navigation/Nodes/Node_Database.class.php
@@ -624,7 +624,7 @@ class Node_Database extends Node
{
$ret = '';
$cfgRelation = PMA_getRelationsParam();
- if ($cfgRelation['navwork']) {
+ if (isset($cfgRelation['navwork']) && $cfgRelation['navwork']) {
if ( $this->_hiddenCount > 0) {
$ret = '<span class="dbItemControls">'
. '<a href="navigation.php'
diff --git a/libraries/navigation/Nodes/Node_Table.class.php b/libraries/navigation/Nodes/Node_Table.class.php
index 4bcc8d4829..9ac1a34487 100644
--- a/libraries/navigation/Nodes/Node_Table.class.php
+++ b/libraries/navigation/Nodes/Node_Table.class.php
@@ -48,6 +48,23 @@ class Node_Table extends Node_DatabaseChild
$this->icon = PMA_Util::getImage('b_browse.png', __('Browse'));
break;
}
+ switch($GLOBALS['cfg']['DefaultTabTable']) {
+ case 'tbl_structure.php':
+ $this->title = __('Structure');
+ break;
+ case 'tbl_select.php':
+ $this->title = __('Search');
+ break;
+ case 'tbl_change.php':
+ $this->title = __('Insert');
+ break;
+ case 'tbl_sql.php':
+ $this->title = __('SQL');
+ break;
+ case 'sql.php':
+ $this->title = __('Browse');
+ break;
+ }
$this->links = array(
'text' => $GLOBALS['cfg']['DefaultTabTable']
. '?server=' . $GLOBALS['server']
@@ -57,7 +74,7 @@ class Node_Table extends Node_DatabaseChild
. '?server=' . $GLOBALS['server']
. '&amp;db=%2$s&amp;table=%1$s&amp;token='
. $_SESSION[' PMA_token '],
- 'title' => __('Browse')
+ 'title' => $this->title
);
$this->classes = 'table';
}
diff --git a/libraries/plugins/schema/Export_Relation_Schema.class.php b/libraries/plugins/schema/Export_Relation_Schema.class.php
index 729339563f..7d7a7adeba 100644
--- a/libraries/plugins/schema/Export_Relation_Schema.class.php
+++ b/libraries/plugins/schema/Export_Relation_Schema.class.php
@@ -248,6 +248,28 @@ class PMA_Export_Relation_Schema
}
/**
+ * Returns the file name
+ *
+ * @param String $extension file extension
+ */
+ protected function getFileName($extension)
+ {
+ $filename = $GLOBALS['db'] . $extension;
+ // Get the name of this page to use as filename
+ if ($this->pageNumber != -1 && ! $this->offline) {
+ $_name_sql = 'SELECT page_descr FROM '
+ . PMA_Util::backquote($GLOBALS['cfgRelation']['db']) . '.'
+ . PMA_Util::backquote($GLOBALS['cfgRelation']['pdf_pages'])
+ . ' WHERE page_nr = ' . $this->pageNumber;
+ $_name_rs = PMA_queryAsControlUser($_name_sql);
+ $_name_row = $GLOBALS['dbi']->fetchRow($_name_rs);
+ $filename = $_name_row[0] . $extension;
+ }
+
+ return $filename;
+ }
+
+ /**
* Displays an error message
*
* @param integer $pageNumber ID of the chosen page
@@ -258,7 +280,7 @@ class PMA_Export_Relation_Schema
*
* @return void
*/
- function dieSchema($pageNumber, $type = '', $error_message = '')
+ public static function dieSchema($pageNumber, $type = '', $error_message = '')
{
echo "<p><strong>" . __("SCHEMA ERROR: ") . $type . "</strong></p>" . "\n";
if (!empty($error_message)) {
diff --git a/libraries/plugins/schema/dia/Dia_Relation_Schema.class.php b/libraries/plugins/schema/dia/Dia_Relation_Schema.class.php
index 3f6abfa13d..c8619555ee 100644
--- a/libraries/plugins/schema/dia/Dia_Relation_Schema.class.php
+++ b/libraries/plugins/schema/dia/Dia_Relation_Schema.class.php
@@ -176,7 +176,7 @@ class PMA_DIA extends XMLWriter
$output = $this->flush();
PMA_Response::getInstance()->disable();
PMA_downloadHeader(
- $fileName . '.dia',
+ $fileName,
'application/x-dia-diagram',
/*overload*/mb_strlen($output)
);
@@ -302,11 +302,7 @@ class PMA_Dia_Relation_Schema extends PMA_Export_Relation_Schema
function showOutput()
{
global $dia;
- $filename = $GLOBALS['db'];
- if ($this->pageNumber != -1) {
- $filename .= '-' . $this->pageNumber;
- }
- $dia->showOutput($filename);
+ $dia->showOutput($this->getFileName('.dia'));
}
/**
diff --git a/libraries/plugins/schema/dia/TableStatsDia.class.php b/libraries/plugins/schema/dia/TableStatsDia.class.php
index 81f86c1612..a3aabb5622 100644
--- a/libraries/plugins/schema/dia/TableStatsDia.class.php
+++ b/libraries/plugins/schema/dia/TableStatsDia.class.php
@@ -62,7 +62,7 @@ class Table_Stats_Dia extends TableStats
*/
protected function showMissingTableError()
{
- $this->diagram->dieSchema(
+ PMA_Export_Relation_Schema::dieSchema(
$this->pageNumber,
"DIA",
sprintf(__('The %s table doesn\'t exist!'), $this->tableName)
@@ -76,7 +76,7 @@ class Table_Stats_Dia extends TableStats
*/
protected function showMissingCoordinatesError()
{
- $this->diagram->dieSchema(
+ PMA_Export_Relation_Schema::dieSchema(
$this->pageNumber,
"DIA",
sprintf(
diff --git a/libraries/plugins/schema/eps/Eps_Relation_Schema.class.php b/libraries/plugins/schema/eps/Eps_Relation_Schema.class.php
index 205c0024b7..45c7966843 100644
--- a/libraries/plugins/schema/eps/Eps_Relation_Schema.class.php
+++ b/libraries/plugins/schema/eps/Eps_Relation_Schema.class.php
@@ -295,7 +295,7 @@ class PMA_EPS
$output = $this->stringCommands;
PMA_Response::getInstance()->disable();
PMA_downloadHeader(
- $fileName . '.eps',
+ $fileName,
'image/x-eps',
/*overload*/mb_strlen($output)
);
@@ -432,11 +432,7 @@ class PMA_Eps_Relation_Schema extends PMA_Export_Relation_Schema
function showOutput()
{
global $eps;
- $filename = $GLOBALS['db'];
- if ($this->pageNumber != -1) {
- $filename .= '-' . $this->pageNumber;
- }
- $eps->showOutput($filename);
+ $eps->showOutput($this->getFileName('.eps'));
}
/**
diff --git a/libraries/plugins/schema/eps/TableStatsEps.class.php b/libraries/plugins/schema/eps/TableStatsEps.class.php
index 3e40627f9f..6643972272 100644
--- a/libraries/plugins/schema/eps/TableStatsEps.class.php
+++ b/libraries/plugins/schema/eps/TableStatsEps.class.php
@@ -75,7 +75,7 @@ class Table_Stats_Eps extends TableStats
*/
protected function showMissingTableError()
{
- $this->diagram->dieSchema(
+ PMA_Export_Relation_Schema::dieSchema(
$this->pageNumber,
"EPS",
sprintf(__('The %s table doesn\'t exist!'), $this->tableName)
@@ -89,7 +89,7 @@ class Table_Stats_Eps extends TableStats
*/
protected function showMissingCoordinatesError()
{
- $this->diagram->dieSchema(
+ PMA_Export_Relation_Schema::dieSchema(
$this->pageNumber,
"EPS",
sprintf(
diff --git a/libraries/plugins/schema/pdf/Pdf_Relation_Schema.class.php b/libraries/plugins/schema/pdf/Pdf_Relation_Schema.class.php
index 82be0fa4fc..2b4350f975 100644
--- a/libraries/plugins/schema/pdf/Pdf_Relation_Schema.class.php
+++ b/libraries/plugins/schema/pdf/Pdf_Relation_Schema.class.php
@@ -653,7 +653,8 @@ class PMA_Pdf_Relation_Schema extends PMA_Export_Relation_Schema
*/
function showOutput()
{
- $this->_showOutput($this->pageNumber);
+ global $pdf;
+ $pdf->Download($this->getFileName('.pdf'));
}
/**
@@ -825,47 +826,6 @@ class PMA_Pdf_Relation_Schema extends PMA_Export_Relation_Schema
}
/**
- * Outputs the PDF document to a file
- * or sends the output to browser
- *
- * @param integer $pageNumber page number
- *
- * @global object $pdf The current PDF document
- * @access private
- *
- * @return void
- *
- * @see PMA_Schema_PDF
- */
- private function _showOutput($pageNumber)
- {
- global $pdf;
-
- // Get the name of this pdfpage to use as filename
- if ($this->offline) {
- $filename = $GLOBALS['db'];
- if ($this->pageNumber != -1) {
- $filename .= '-' . $this->pageNumber;
- }
- } else {
- $_name_sql = 'SELECT page_descr FROM '
- . PMA_Util::backquote($GLOBALS['cfgRelation']['db']) . '.'
- . PMA_Util::backquote($GLOBALS['cfgRelation']['pdf_pages'])
- . ' WHERE page_nr = ' . $pageNumber;
- $_name_rs = PMA_queryAsControlUser($_name_sql);
- if ($_name_rs) {
- $_name_row = $GLOBALS['dbi']->fetchRow($_name_rs);
- $filename = $_name_row[0] . '.pdf';
- }
- if (empty($filename)) {
- $filename = $pageNumber . '.pdf';
- }
- }
-
- $pdf->Download($filename);
- }
-
- /**
* Generates data dictionary pages.
*
* @param array $alltables Tables to document.
diff --git a/libraries/plugins/schema/pdf/TableStatsPdf.class.php b/libraries/plugins/schema/pdf/TableStatsPdf.class.php
index a20829ccc8..c45637dbce 100644
--- a/libraries/plugins/schema/pdf/TableStatsPdf.class.php
+++ b/libraries/plugins/schema/pdf/TableStatsPdf.class.php
@@ -76,7 +76,7 @@ class Table_Stats_Pdf extends TableStats
*/
protected function showMissingTableError()
{
- $this->diagram->dieSchema(
+ PMA_Export_Relation_Schema::dieSchema(
$this->pageNumber,
"PDF",
sprintf(__('The %s table doesn\'t exist!'), $this->tableName)
@@ -90,7 +90,7 @@ class Table_Stats_Pdf extends TableStats
*/
protected function showMissingCoordinatesError()
{
- $this->diagram->dieSchema(
+ PMA_Export_Relation_Schema::dieSchema(
$this->pageNumber,
"PDF",
sprintf(
diff --git a/libraries/plugins/schema/svg/Svg_Relation_Schema.class.php b/libraries/plugins/schema/svg/Svg_Relation_Schema.class.php
index f2ae1f1bc6..75eafebab3 100644
--- a/libraries/plugins/schema/svg/Svg_Relation_Schema.class.php
+++ b/libraries/plugins/schema/svg/Svg_Relation_Schema.class.php
@@ -188,7 +188,7 @@ class PMA_SVG extends XMLWriter
$output = $this->flush();
PMA_Response::getInstance()->disable();
PMA_downloadHeader(
- $fileName . '.svg',
+ $fileName,
'image/svg+xml',
/*overload*/mb_strlen($output)
);
@@ -405,11 +405,7 @@ class PMA_Svg_Relation_Schema extends PMA_Export_Relation_Schema
function showOutput()
{
global $svg;
- $filename = $GLOBALS['db'];
- if ($this->pageNumber != -1) {
- $filename .= '-' . $this->pageNumber;
- }
- $svg->showOutput($filename);
+ $svg->showOutput($this->getFileName('.svg'));
}
diff --git a/libraries/plugins/schema/svg/TableStatsSvg.class.php b/libraries/plugins/schema/svg/TableStatsSvg.class.php
index 7b421c318a..0fce77cbb5 100644
--- a/libraries/plugins/schema/svg/TableStatsSvg.class.php
+++ b/libraries/plugins/schema/svg/TableStatsSvg.class.php
@@ -76,7 +76,7 @@ class Table_Stats_Svg extends TableStats
*/
protected function showMissingTableError()
{
- $this->diagram->dieSchema(
+ PMA_Export_Relation_Schema::dieSchema(
$this->pageNumber,
"SVG",
sprintf(__('The %s table doesn\'t exist!'), $this->tableName)
@@ -90,7 +90,7 @@ class Table_Stats_Svg extends TableStats
*/
protected function showMissingCoordinatesError()
{
- $this->diagram->dieSchema(
+ PMA_Export_Relation_Schema::dieSchema(
$this->pageNumber,
"SVG",
sprintf(
diff --git a/libraries/relation_cleanup.lib.php b/libraries/relation_cleanup.lib.php
index 2b591d2fd3..d76774936b 100644
--- a/libraries/relation_cleanup.lib.php
+++ b/libraries/relation_cleanup.lib.php
@@ -203,7 +203,9 @@ function PMA_relationsCleanupDatabase($db)
PMA_queryAsControlUser($remove_query);
}
- if ($cfgRelation['central_columnswork']) {
+ if (isset($cfgRelation['central_columnswork'])
+ && $cfgRelation['central_columnswork']
+ ) {
$remove_query = 'DELETE FROM ' . PMA_Util::backquote($cfgRelation['db'])
. '.' . PMA_Util::backquote($cfgRelation['central_columns'])
. ' WHERE db_name = \'' . PMA_Util::sqlAddSlashes($db) . '\'';
diff --git a/libraries/structure.lib.php b/libraries/structure.lib.php
index 100440935e..37203fdd23 100644
--- a/libraries/structure.lib.php
+++ b/libraries/structure.lib.php
@@ -1521,7 +1521,9 @@ function PMA_getHtmlForCheckAllTableColumn($pmaThemeImage, $text_dir,
__('Fulltext'), 'b_ftext.png', 'ftext'
);
}
- if ($GLOBALS['cfgRelation']['central_columnswork']) {
+ if (isset($GLOBALS['cfgRelation']['central_columnswork'])
+ && $GLOBALS['cfgRelation']['central_columnswork']
+ ) {
$html_output .= PMA_Util::getButtonOrImage(
'submit_mult', 'mult_submit', 'submit_mult_central_columns_add',
__('Add to central columns'), 'centralColumns_add.png',
diff --git a/locale/az/LC_MESSAGES/phpmyadmin.mo b/locale/az/LC_MESSAGES/phpmyadmin.mo
index ab7a948cd3..c08cd316f6 100644
--- a/locale/az/LC_MESSAGES/phpmyadmin.mo
+++ b/locale/az/LC_MESSAGES/phpmyadmin.mo
Binary files differ
diff --git a/locale/ca/LC_MESSAGES/phpmyadmin.mo b/locale/ca/LC_MESSAGES/phpmyadmin.mo
index f1501c83fb..270ba03885 100644
--- a/locale/ca/LC_MESSAGES/phpmyadmin.mo
+++ b/locale/ca/LC_MESSAGES/phpmyadmin.mo
Binary files differ
diff --git a/locale/da/LC_MESSAGES/phpmyadmin.mo b/locale/da/LC_MESSAGES/phpmyadmin.mo
index d2b580edf3..bad0e9dcf8 100644
--- a/locale/da/LC_MESSAGES/phpmyadmin.mo
+++ b/locale/da/LC_MESSAGES/phpmyadmin.mo
Binary files differ
diff --git a/locale/el/LC_MESSAGES/phpmyadmin.mo b/locale/el/LC_MESSAGES/phpmyadmin.mo
index 78de6f2e19..57dd5ddc69 100644
--- a/locale/el/LC_MESSAGES/phpmyadmin.mo
+++ b/locale/el/LC_MESSAGES/phpmyadmin.mo
Binary files differ
diff --git a/locale/es/LC_MESSAGES/phpmyadmin.mo b/locale/es/LC_MESSAGES/phpmyadmin.mo
index cdb1a78b4f..ff012ad01f 100644
--- a/locale/es/LC_MESSAGES/phpmyadmin.mo
+++ b/locale/es/LC_MESSAGES/phpmyadmin.mo
Binary files differ
diff --git a/locale/et/LC_MESSAGES/phpmyadmin.mo b/locale/et/LC_MESSAGES/phpmyadmin.mo
index 05f0dd15ff..92e9c0b4b8 100644
--- a/locale/et/LC_MESSAGES/phpmyadmin.mo
+++ b/locale/et/LC_MESSAGES/phpmyadmin.mo
Binary files differ
diff --git a/locale/fi/LC_MESSAGES/phpmyadmin.mo b/locale/fi/LC_MESSAGES/phpmyadmin.mo
index d8319dc7dd..79597ed50e 100644
--- a/locale/fi/LC_MESSAGES/phpmyadmin.mo
+++ b/locale/fi/LC_MESSAGES/phpmyadmin.mo
Binary files differ
diff --git a/locale/fr/LC_MESSAGES/phpmyadmin.mo b/locale/fr/LC_MESSAGES/phpmyadmin.mo
index ef3fcb2bc8..14de7fd1b4 100644
--- a/locale/fr/LC_MESSAGES/phpmyadmin.mo
+++ b/locale/fr/LC_MESSAGES/phpmyadmin.mo
Binary files differ
diff --git a/locale/hu/LC_MESSAGES/phpmyadmin.mo b/locale/hu/LC_MESSAGES/phpmyadmin.mo
index 615a89743b..f5af56f451 100644
--- a/locale/hu/LC_MESSAGES/phpmyadmin.mo
+++ b/locale/hu/LC_MESSAGES/phpmyadmin.mo
Binary files differ
diff --git a/locale/ia/LC_MESSAGES/phpmyadmin.mo b/locale/ia/LC_MESSAGES/phpmyadmin.mo
index 12210da920..30f29b7fec 100644
--- a/locale/ia/LC_MESSAGES/phpmyadmin.mo
+++ b/locale/ia/LC_MESSAGES/phpmyadmin.mo
Binary files differ
diff --git a/locale/id/LC_MESSAGES/phpmyadmin.mo b/locale/id/LC_MESSAGES/phpmyadmin.mo
index c642c51ce3..5e522ccd55 100644
--- a/locale/id/LC_MESSAGES/phpmyadmin.mo
+++ b/locale/id/LC_MESSAGES/phpmyadmin.mo
Binary files differ
diff --git a/locale/it/LC_MESSAGES/phpmyadmin.mo b/locale/it/LC_MESSAGES/phpmyadmin.mo
index eb0e302c09..4b187a92bb 100644
--- a/locale/it/LC_MESSAGES/phpmyadmin.mo
+++ b/locale/it/LC_MESSAGES/phpmyadmin.mo
Binary files differ
diff --git a/locale/nl/LC_MESSAGES/phpmyadmin.mo b/locale/nl/LC_MESSAGES/phpmyadmin.mo
index 6b75dc6709..14a3e4db14 100644
--- a/locale/nl/LC_MESSAGES/phpmyadmin.mo
+++ b/locale/nl/LC_MESSAGES/phpmyadmin.mo
Binary files differ
diff --git a/locale/pt_BR/LC_MESSAGES/phpmyadmin.mo b/locale/pt_BR/LC_MESSAGES/phpmyadmin.mo
index 4c89f269a7..ab41c705a4 100644
--- a/locale/pt_BR/LC_MESSAGES/phpmyadmin.mo
+++ b/locale/pt_BR/LC_MESSAGES/phpmyadmin.mo
Binary files differ
diff --git a/locale/sk/LC_MESSAGES/phpmyadmin.mo b/locale/sk/LC_MESSAGES/phpmyadmin.mo
index e0afd7033a..85096b2ea5 100644
--- a/locale/sk/LC_MESSAGES/phpmyadmin.mo
+++ b/locale/sk/LC_MESSAGES/phpmyadmin.mo
Binary files differ
diff --git a/server_privileges.php b/server_privileges.php
index e9dc898bef..2db8f91ce7 100644
--- a/server_privileges.php
+++ b/server_privileges.php
@@ -27,7 +27,9 @@ $header = $response->getHeader();
$scripts = $header->getScripts();
$scripts->addFile('server_privileges.js');
-if ((isset($_REQUEST['viewing_mode']) && $_REQUEST['viewing_mode'] == 'server')
+if ((isset($_REQUEST['viewing_mode'])
+ && $_REQUEST['viewing_mode'] == 'server')
+ && isset($GLOBALS['cfgRelation']['menuswork'])
&& $GLOBALS['cfgRelation']['menuswork']
) {
include_once 'libraries/server_users.lib.php';