diff --git a/libraries/navigation/Nodes/Node.class.php b/libraries/navigation/Nodes/Node.class.php index 02fb5443d0..96aefe1bb3 100644 --- a/libraries/navigation/Nodes/Node.class.php +++ b/libraries/navigation/Nodes/Node.class.php @@ -741,27 +741,7 @@ class Node */ public function getHtmlForControlButtons() { - $ret = ''; - $cfgRelation = PMA_getRelationsParam(); - if (isset($cfgRelation['navwork']) && $cfgRelation['navwork']) { - if ($this instanceof Node_DatabaseChild_Container - || $this instanceof Node_DatabaseChild - ) { - $db = $this->realParent()->real_name; - $item = $this->real_name; - $ret = '' - . '' - . PMA_Util::getImage('lightbulb_off.png', __('Hide')) - . ''; - } - } - return $ret; + return ''; } /** diff --git a/libraries/navigation/Nodes/Node_DatabaseChild.class.php b/libraries/navigation/Nodes/Node_DatabaseChild.class.php index d75cec0f62..1fae2e467a 100644 --- a/libraries/navigation/Nodes/Node_DatabaseChild.class.php +++ b/libraries/navigation/Nodes/Node_DatabaseChild.class.php @@ -10,7 +10,9 @@ if (! defined('PHPMYADMIN')) { } /** - * Represents a node that is a concrete child of a database node + * Represents a node that is a child of a database node + * This may either be a concrete child such as table or a container + * such as a table group * * @package PhpMyAdmin-Navigation */ @@ -22,5 +24,31 @@ abstract class Node_DatabaseChild extends Node * @return string type of the item */ protected abstract function getItemType(); + + /** + * 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']) { + $db = $this->realParent()->real_name; + $item = $this->real_name; + $ret = '' + . '' + . PMA_Util::getImage('lightbulb_off.png', __('Hide')) + . ''; + } + return $ret; + } } ?> diff --git a/libraries/navigation/Nodes/Node_DatabaseChild_Container.class.php b/libraries/navigation/Nodes/Node_DatabaseChild_Container.class.php index 3b80c36660..e7c91dd8ca 100644 --- a/libraries/navigation/Nodes/Node_DatabaseChild_Container.class.php +++ b/libraries/navigation/Nodes/Node_DatabaseChild_Container.class.php @@ -9,12 +9,14 @@ if (! defined('PHPMYADMIN')) { exit; } +require_once 'libraries/navigation/Nodes/Node_DatabaseChild.class.php'; + /** * Represents container node that carries children of a database * * @package PhpMyAdmin-Navigation */ -abstract class Node_DatabaseChild_Container extends Node +abstract class Node_DatabaseChild_Container extends Node_DatabaseChild { /** * Initialises the class by setting the common variables