Merge commit 'd4f754c' into QA_4_2
This commit is contained in:
commit
782fe7a1e5
@ -96,7 +96,7 @@ class PMA_RecentFavoriteTable
|
||||
/**
|
||||
* Returns the recent/favorite tables array
|
||||
*
|
||||
* @return array
|
||||
* @return array
|
||||
*/
|
||||
public function getTables()
|
||||
{
|
||||
@ -203,36 +203,47 @@ class PMA_RecentFavoriteTable
|
||||
if ($this->_tableType == 'recent') {
|
||||
foreach ($this->_tables as $table) {
|
||||
$html .= '<li class="warp_link">';
|
||||
$html .= '<a href="sql.php?server=' . $GLOBALS['server']
|
||||
. '&db=' . $table['db']
|
||||
. '&table=' . $table['table']
|
||||
. '&token=' . $_SESSION[' PMA_token ']
|
||||
. '">`' . $table['db'] . '`.`' . $table['table'] . '`</a>';
|
||||
$recent_params = array(
|
||||
'db' => $table['db'],
|
||||
'table' => $table['table']
|
||||
);
|
||||
$recent_url = 'sql.php'
|
||||
. PMA_URL_getCommon($recent_params);
|
||||
$html .= '<a href="' . $recent_url . '">`'
|
||||
. htmlspecialchars($table['db']) . '`.`'
|
||||
. htmlspecialchars($table['table']) . '`</a>';
|
||||
$html .= '</li>';
|
||||
}
|
||||
} else {
|
||||
foreach ($this->_tables as $table) {
|
||||
$html .= '<li class="warp_link">';
|
||||
|
||||
$html .= '<a class="ajax favorite_table_anchor"';
|
||||
$fav_params = array('db' => $table['db'],
|
||||
'ajax_request' => true,
|
||||
'favorite_table' => $table['table'],
|
||||
'remove_favorite' => true);
|
||||
$html .= '<a class="ajax favorite_table_anchor" ';
|
||||
$fav_params = array(
|
||||
'db' => $table['db'],
|
||||
'ajax_request' => true,
|
||||
'favorite_table' => $table['table'],
|
||||
'remove_favorite' => true
|
||||
);
|
||||
$fav_rm_url = 'db_structure.php'
|
||||
. PMA_URL_getCommon($fav_params);
|
||||
$html .= 'href="' . $fav_rm_url
|
||||
. '" title="' . __("Remove from Favorites")
|
||||
. '" data-favtargetn="' . $table['db'] . "." . $table['table']
|
||||
. '" data-favtargetn="'
|
||||
. md5($table['db'] . "." . $table['table'])
|
||||
. '" >'
|
||||
. PMA_Util::getIcon('b_favorite.png')
|
||||
. '</a>';
|
||||
|
||||
$html .= '<a href="sql.php?server=' . $GLOBALS['server']
|
||||
. '&db=' . $table['db']
|
||||
. '&table=' . $table['table']
|
||||
. '&token=' . $_SESSION[' PMA_token ']
|
||||
. '">`' . $table['db'] . '`.`' . $table['table'] . '`</a>';
|
||||
$fav_params = array(
|
||||
'db' => $table['db'],
|
||||
'table' => $table['table']
|
||||
);
|
||||
$table_url = 'sql.php'
|
||||
. PMA_URL_getCommon($fav_params);
|
||||
$html .= '<a href="' . $table_url . '">`'
|
||||
. htmlspecialchars($table['db']) . '`.`'
|
||||
. htmlspecialchars($table['table']) . '`</a>';
|
||||
$html .= '</li>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -189,9 +189,9 @@ class PMA_Navigation
|
||||
$html .= '<td style="width:80px"><a href="navigation.php?'
|
||||
. PMA_URL_getCommon()
|
||||
. '&unhideNavItem=true'
|
||||
. '&itemType=' . $t
|
||||
. '&itemName=' . urldecode($hiddenItem)
|
||||
. '&dbName=' . urldecode($dbName) . '"'
|
||||
. '&itemType=' . urlencode($t)
|
||||
. '&itemName=' . urlencode($hiddenItem)
|
||||
. '&dbName=' . urlencode($dbName) . '"'
|
||||
. ' class="unhideNavItem ajax">'
|
||||
. PMA_Util::getIcon('lightbulb.png', __('Show'))
|
||||
. '</a></td>';
|
||||
|
||||
@ -32,9 +32,9 @@ abstract class Node_DatabaseChild extends Node
|
||||
. '<a href="navigation.php?'
|
||||
. PMA_URL_getCommon()
|
||||
. '&hideNavItem=true'
|
||||
. '&itemType=' . urldecode($this->getItemType())
|
||||
. '&itemName=' . urldecode($item)
|
||||
. '&dbName=' . urldecode($db) . '"'
|
||||
. '&itemType=' . urlencode($this->getItemType())
|
||||
. '&itemName=' . urlencode($item)
|
||||
. '&dbName=' . urlencode($db) . '"'
|
||||
. ' class="hideNavItem ajax">'
|
||||
. PMA_Util::getImage('lightbulb_off.png', __('Hide'))
|
||||
. '</a></span>';
|
||||
|
||||
@ -2736,9 +2736,8 @@ function PMA_checkFavoriteTable($db, $current_table)
|
||||
function PMA_getHtmlForFavoriteAnchor($db, $current_table, $titles)
|
||||
{
|
||||
$html_output = '<a ';
|
||||
$html_output .= 'id="' . preg_replace(
|
||||
'/\s+/', '', $current_table['TABLE_NAME']
|
||||
) . '_favorite_anchor" ';
|
||||
$html_output .= 'id="' . md5($current_table['TABLE_NAME'])
|
||||
. '_favorite_anchor" ';
|
||||
$html_output .= 'class="ajax favorite_table_anchor';
|
||||
|
||||
// Check if current table is already in favorite list.
|
||||
@ -2746,13 +2745,15 @@ function PMA_getHtmlForFavoriteAnchor($db, $current_table, $titles)
|
||||
$fav_params = array('db' => $db,
|
||||
'ajax_request' => true,
|
||||
'favorite_table' => $current_table['TABLE_NAME'],
|
||||
(($already_favorite?'remove':'add') . '_favorite') => true);
|
||||
(($already_favorite?'remove':'add') . '_favorite') => true
|
||||
);
|
||||
$fav_url = 'db_structure.php' . PMA_URL_getCommon($fav_params);
|
||||
$html_output .= '" ';
|
||||
$html_output .= 'href="' . $fav_url
|
||||
. '" title="' . ($already_favorite ? __("Remove from Favorites")
|
||||
: __("Add to Favorites"))
|
||||
. '" data-favtargets="' . $db . "." . $current_table['TABLE_NAME']
|
||||
. '" data-favtargets="'
|
||||
. md5($db . "." . $current_table['TABLE_NAME'])
|
||||
. '" >'
|
||||
. (!$already_favorite ? $titles['NoFavorite']
|
||||
: $titles['Favorite']) . '</a>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user