Move database related code to Node_Database
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
This commit is contained in:
parent
8dc5b922db
commit
312d159922
@ -759,19 +759,6 @@ class Node
|
||||
. ' class="hideNavItem ajax">'
|
||||
. PMA_Util::getImage('lightbulb_off.png', __('Hide'))
|
||||
. '</a></span>';
|
||||
} else if ($this instanceof Node_Database) {
|
||||
if ($this->hiddenCount > 0) {
|
||||
$ret = '<span class="dbItemControls">'
|
||||
. '<a href="navigation.php'
|
||||
. PMA_URL_getCommon()
|
||||
. '&showUnhideDialog=true'
|
||||
. '&dbName=' . urldecode($this->real_name) . '"'
|
||||
. ' class="showUnhide ajax">'
|
||||
. PMA_Util::getImage(
|
||||
'lightbulb.png', __('Show hidden items')
|
||||
)
|
||||
. '</a></span>';
|
||||
}
|
||||
}
|
||||
}
|
||||
return $ret;
|
||||
|
||||
@ -639,6 +639,33 @@ class Node_Database extends Node
|
||||
return $retval;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns HTML for control buttons displayed infront of a node
|
||||
*
|
||||
* @return String HTML for control buttons
|
||||
*/
|
||||
public function getHtmlForControlButtons()
|
||||
{
|
||||
$ret = '';
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
if (isset($cfgRelation['navwork']) && $cfgRelation['navwork']) {
|
||||
if ($this->hiddenCount > 0) {
|
||||
$ret = '<span class="dbItemControls">'
|
||||
. '<a href="navigation.php'
|
||||
. PMA_URL_getCommon()
|
||||
. '&showUnhideDialog=true'
|
||||
. '&dbName=' . urldecode($this->real_name) . '"'
|
||||
. ' class="showUnhide ajax">'
|
||||
. PMA_Util::getImage(
|
||||
'lightbulb.png', __('Show hidden items')
|
||||
)
|
||||
. '</a></span>';
|
||||
}
|
||||
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the number of hidden items in this database
|
||||
*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user