The branch, master has been updated
via 036d1a8397ac9da6c166f1d28d3fe9d3898c4213 (commit)
from e81b6c1cfd5f95ebd4809b54d6aaeed80beea52f (commit)
- Log -----------------------------------------------------------------
commit 036d1a8397ac9da6c166f1d28d3fe9d3898c4213
Author: Aris Feryanto <[email protected]>
Date: Mon Aug 29 15:00:06 2011 +0800
Correctly show error message when unable to save UI property
-----------------------------------------------------------------------
Summary of changes:
libraries/Table.class.php | 3 ++-
sql.php | 6 +++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/libraries/Table.class.php b/libraries/Table.class.php
index 3816b9b..34b144a 100644
--- a/libraries/Table.class.php
+++ b/libraries/Table.class.php
@@ -1509,7 +1509,8 @@ class PMA_Table
// there is no $table_create_time, or
// supplied $table_create_time is older than current create
time,
// so don't save
- return false;
+ return PMA_Message::error(sprintf(
+ __('Cannot save UI property "%s". The changes made will
not be persistent after you refresh this page. Please check if the table
structure has been changed.'), $property));
}
}
// save the value
diff --git a/sql.php b/sql.php
index b233400..8b8cf12 100644
--- a/sql.php
+++ b/sql.php
@@ -185,17 +185,17 @@ if (isset($_REQUEST['set_col_prefs']) &&
$_REQUEST['set_col_prefs'] == true) {
if (isset($_REQUEST['col_order'])) {
$col_order = explode(',', $_REQUEST['col_order']);
$retval = $pmatable->setUiProp(PMA_Table::PROP_COLUMN_ORDER,
$col_order, $_REQUEST['table_create_time']);
- if ($retval !== true) {
+ if (gettype($retval) != 'boolean') {
PMA_ajaxResponse($retval->getString(), false);
}
}
// set column visibility
- if (isset($_REQUEST['col_visib'])) {
+ if ($retval === true && isset($_REQUEST['col_visib'])) {
$col_visib = explode(',', $_REQUEST['col_visib']);
$retval = $pmatable->setUiProp(PMA_Table::PROP_COLUMN_VISIB,
$col_visib, $_REQUEST['table_create_time']);
- if ($retval !== true) {
+ if (gettype($retval) != 'boolean') {
PMA_ajaxResponse($retval->getString(), false);
}
}
hooks/post-receive
--
phpMyAdmin
------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management
Up to 160% more powerful than alternatives and 25% more efficient.
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
Phpmyadmin-git mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/phpmyadmin-git