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:
Diffstat (limited to 'libraries/RecentFavoriteTable.class.php')
-rw-r--r--libraries/RecentFavoriteTable.class.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/libraries/RecentFavoriteTable.class.php b/libraries/RecentFavoriteTable.class.php
index a96c4de175..d9bc639749 100644
--- a/libraries/RecentFavoriteTable.class.php
+++ b/libraries/RecentFavoriteTable.class.php
@@ -283,5 +283,27 @@ class PMA_RecentFavoriteTable
}
return true;
}
+
+ /**
+ * Generate Html for sync Favorite tables anchor. (from localStorage to pmadb)
+ *
+ * @return string
+ */
+ public function _getHtmlSyncFavoriteTables()
+ {
+ $retval = '';
+ $server_id = $GLOBALS['server'];
+ // Not to show this once list is synchronized.
+ $is_synced = isset($_SESSION['tmpval']['favorites_synced'][$server_id]) ?
+ true : false;
+ if (!$is_synced) {
+ $params = array('ajax_request' => true, 'favorite_table' => true,
+ 'sync_favorite_tables' => true);
+ $url = 'db_structure.php' . PMA_URL_getCommon($params);
+ $retval = '<a class="hide" id="sync_favorite_tables"';
+ $retval .= ' href="' . $url . '"></a>';
+ }
+ return $retval;
+ }
}
?>