[go: nahoru, domu]

Skip to content

Commit

Permalink
Do not try to sync favorite tables if configuration storage is not en…
Browse files Browse the repository at this point in the history
…abled

Fixes #13092

Signed-off-by: Michal Čihař <michal@cihar.com>
  • Loading branch information
nijel committed Mar 20, 2017
1 parent 528fb46 commit cb691fa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ phpMyAdmin - ChangeLog
- issue #13084 Do not point users to setup when it is disabled
- issue #12660 Delete only phpMyAdmin cookies on upgrade
- issue #13088 Fixed editing of rows with text primary key
- issue #13092 Do not try to sync favorite tables if configuration storage is not enabled

4.6.6 (2017-01-23)
- issue #12759 Fix Notice regarding 'Undefined index: old_usergroup'
Expand Down
5 changes: 2 additions & 3 deletions libraries/RecentFavoriteTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,9 @@ public function getHtmlSyncFavoriteTables()
if ($server_id == 0) {
return '';
}
$cfgRelation = PMA_getRelationsParam();
// Not to show this once list is synchronized.
$is_synced = isset($_SESSION['tmpval']['favorites_synced'][$server_id]) ?
true : false;
if (!$is_synced) {
if ($cfgRelation['favoritework'] && ! isset($_SESSION['tmpval']['favorites_synced'][$server_id])) {
$params = array('ajax_request' => true, 'favorite_table' => true,
'sync_favorite_tables' => true);
$url = 'db_structure.php' . URL::getCommon($params);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,10 @@ public function addRemoveFavoriteTablesAction()

// Request for Synchronization of favorite tables.
if (isset($_REQUEST['sync_favorite_tables'])) {
$this->synchronizeFavoriteTables($fav_instance, $user, $favorite_tables);
$cfgRelation = PMA_getRelationsParam();
if ($cfgRelation['favoritework']) {
$this->synchronizeFavoriteTables($fav_instance, $user, $favorite_tables);
}
return;
}
$changes = true;
Expand Down

0 comments on commit cb691fa

Please sign in to comment.