Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
659f973173
52
libraries/navigation/Nodes/Node_DatabaseChild.class.php
Normal file
52
libraries/navigation/Nodes/Node_DatabaseChild.class.php
Normal file
@ -0,0 +1,52 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Functionality for the navigation tree
|
||||
*
|
||||
* @package PhpMyAdmin-Navigation
|
||||
*/
|
||||
if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a node that is a concrete child of a database node
|
||||
*
|
||||
* @package PhpMyAdmin-Navigation
|
||||
*/
|
||||
abstract class Node_DatabaseChild extends Node
|
||||
{
|
||||
/**
|
||||
* Returns HTML for hide button displayed infront of the database child node
|
||||
*
|
||||
* @return HTML for hide button
|
||||
*/
|
||||
public function getHtmlForControlButtons()
|
||||
{
|
||||
$ret = '';
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
if ($cfgRelation['navwork']) {
|
||||
$db = $this->realParent()->real_name;
|
||||
$item = $this->real_name;
|
||||
$ret = '<span class="navItemControls">'
|
||||
. '<a href="navigation.php?'
|
||||
. PMA_generate_common_url()
|
||||
. '&hideNavItem=true'
|
||||
. '&itemType=' . urldecode($this->getItemType())
|
||||
. '&itemName=' . urldecode($item)
|
||||
. '&dbName=' . urldecode($db) . '"'
|
||||
. ' class="hideNavItem ajax">'
|
||||
. PMA_Util::getImage('b_close', 'Hide')
|
||||
. '</a></span>';
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the type of the item reprsented by the node.
|
||||
*
|
||||
* @return string type of the item
|
||||
*/
|
||||
protected abstract function getItemType();
|
||||
}
|
||||
?>
|
||||
@ -9,12 +9,14 @@ if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once 'libraries/navigation/Nodes/Node_DatabaseChild.class.php';
|
||||
|
||||
/**
|
||||
* Represents a event node in the navigation tree
|
||||
*
|
||||
* @package PhpMyAdmin-Navigation
|
||||
*/
|
||||
class Node_Event extends Node
|
||||
class Node_Event extends Node_DatabaseChild
|
||||
{
|
||||
/**
|
||||
* Initialises the class
|
||||
@ -63,28 +65,13 @@ class Node_Event extends Node
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns HTML for hide button displayed infront of the event node
|
||||
* Returns the type of the item represented by the node.
|
||||
*
|
||||
* @return HTML for hide button
|
||||
* @return string type of the item
|
||||
*/
|
||||
public function getHtmlForControlButtons()
|
||||
protected function getItemType()
|
||||
{
|
||||
$ret = '';
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
if ($cfgRelation['navwork']) {
|
||||
$db = $this->realParent()->real_name;
|
||||
$event = $this->real_name;
|
||||
$ret = '<span class="navItemControls">'
|
||||
. '<a href="navigation.php?'
|
||||
. PMA_generate_common_url()
|
||||
. '&hideNavItem=true&itemType=event'
|
||||
. '&itemName=' . urldecode($event)
|
||||
. '&dbName=' . urldecode($db) . '"'
|
||||
. ' class="hideNavItem ajax">'
|
||||
. PMA_Util::getImage('b_close', 'Hide')
|
||||
. '</a></span>';
|
||||
}
|
||||
return $ret;
|
||||
return 'event';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -9,12 +9,14 @@ if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once 'libraries/navigation/Nodes/Node_DatabaseChild.class.php';
|
||||
|
||||
/**
|
||||
* Represents a function node in the navigation tree
|
||||
*
|
||||
* @package PhpMyAdmin-Navigation
|
||||
*/
|
||||
class Node_Function extends Node
|
||||
class Node_Function extends Node_DatabaseChild
|
||||
{
|
||||
/**
|
||||
* Initialises the class
|
||||
@ -64,28 +66,13 @@ class Node_Function extends Node
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns HTML for hide button displayed infront of the function node
|
||||
* Returns the type of the item represented by the node.
|
||||
*
|
||||
* @return HTML for hide button
|
||||
* @return string type of the item
|
||||
*/
|
||||
public function getHtmlForControlButtons()
|
||||
protected function getItemType()
|
||||
{
|
||||
$ret = '';
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
if ($cfgRelation['navwork']) {
|
||||
$db = $this->realParent()->real_name;
|
||||
$function = $this->real_name;
|
||||
$ret = '<span class="navItemControls">'
|
||||
. '<a href="navigation.php?'
|
||||
. PMA_generate_common_url()
|
||||
. '&hideNavItem=true&itemType=function'
|
||||
. '&itemName=' . urldecode($function)
|
||||
. '&dbName=' . urldecode($db) . '"'
|
||||
. ' class="hideNavItem ajax">'
|
||||
. PMA_Util::getImage('b_close', 'Hide')
|
||||
. '</a></span>';
|
||||
}
|
||||
return $ret;
|
||||
return 'function';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -9,12 +9,14 @@ if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once 'libraries/navigation/Nodes/Node_DatabaseChild.class.php';
|
||||
|
||||
/**
|
||||
* Represents a procedure node in the navigation tree
|
||||
*
|
||||
* @package PhpMyAdmin-Navigation
|
||||
*/
|
||||
class Node_Procedure extends Node
|
||||
class Node_Procedure extends Node_DatabaseChild
|
||||
{
|
||||
/**
|
||||
* Initialises the class
|
||||
@ -64,28 +66,13 @@ class Node_Procedure extends Node
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns HTML for hide button displayed infront of the table node
|
||||
* Returns the type of the item represented by the node.
|
||||
*
|
||||
* @return HTML for hide button
|
||||
* @return string type of the item
|
||||
*/
|
||||
public function getHtmlForControlButtons()
|
||||
protected function getItemType()
|
||||
{
|
||||
$ret = '';
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
if ($cfgRelation['navwork']) {
|
||||
$db = $this->realParent()->real_name;
|
||||
$procedure = $this->real_name;
|
||||
$ret = '<span class="navItemControls">'
|
||||
. '<a href="navigation.php?'
|
||||
. PMA_generate_common_url()
|
||||
. '&hideNavItem=true&itemType=procedure'
|
||||
. '&itemName=' . urldecode($procedure)
|
||||
. '&dbName=' . urldecode($db) . '"'
|
||||
. ' class="hideNavItem ajax">'
|
||||
. PMA_Util::getImage('b_close', 'Hide')
|
||||
. '</a></span>';
|
||||
}
|
||||
return $ret;
|
||||
return 'procedure';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -9,12 +9,14 @@ if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once 'libraries/navigation/Nodes/Node_DatabaseChild.class.php';
|
||||
|
||||
/**
|
||||
* Represents a columns node in the navigation tree
|
||||
*
|
||||
* @package PhpMyAdmin-Navigation
|
||||
*/
|
||||
class Node_Table extends Node
|
||||
class Node_Table extends Node_DatabaseChild
|
||||
{
|
||||
/**
|
||||
* Initialises the class
|
||||
@ -232,28 +234,13 @@ class Node_Table extends Node
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns HTML for hide button displayed infront of the table node
|
||||
* Returns the type of the item represented by the node.
|
||||
*
|
||||
* @return HTML for hide button
|
||||
* @return string type of the item
|
||||
*/
|
||||
public function getHtmlForControlButtons()
|
||||
protected function getItemType()
|
||||
{
|
||||
$ret = '';
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
if ($cfgRelation['navwork']) {
|
||||
$db = $this->realParent()->real_name;
|
||||
$table = $this->real_name;
|
||||
$ret = '<span class="navItemControls">'
|
||||
. '<a href="navigation.php?'
|
||||
. PMA_generate_common_url()
|
||||
. '&hideNavItem=true&itemType=table'
|
||||
. '&itemName=' . urldecode($table)
|
||||
. '&dbName=' . urldecode($db) . '"'
|
||||
. ' class="hideNavItem ajax">'
|
||||
. PMA_Util::getImage('b_close', 'Hide')
|
||||
. '</a></span>';
|
||||
}
|
||||
return $ret;
|
||||
return 'table';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -9,12 +9,14 @@ if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once 'libraries/navigation/Nodes/Node_DatabaseChild.class.php';
|
||||
|
||||
/**
|
||||
* Represents a view node in the navigation tree
|
||||
*
|
||||
* @package PhpMyAdmin-Navigation
|
||||
*/
|
||||
class Node_View extends Node
|
||||
class Node_View extends Node_DatabaseChild
|
||||
{
|
||||
/**
|
||||
* Initialises the class
|
||||
@ -41,28 +43,13 @@ class Node_View extends Node
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns HTML for hide button displayed infront of the view node
|
||||
* Returns the type of the item represented by the node.
|
||||
*
|
||||
* @return HTML for hide button
|
||||
* @return string type of the item
|
||||
*/
|
||||
public function getHtmlForControlButtons()
|
||||
protected function getItemType()
|
||||
{
|
||||
$ret = '';
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
if ($cfgRelation['navwork']) {
|
||||
$db = $this->realParent()->real_name;
|
||||
$view = $this->real_name;
|
||||
$ret = '<span class="navItemControls">'
|
||||
. '<a href="navigation.php?'
|
||||
. PMA_generate_common_url()
|
||||
. '&hideNavItem=true&itemType=view'
|
||||
. '&itemName=' . urldecode($view)
|
||||
. '&dbName=' . urldecode($db) . '"'
|
||||
. ' class="hideNavItem ajax">'
|
||||
. PMA_Util::getImage('b_close', 'Hide')
|
||||
. '</a></span>';
|
||||
}
|
||||
return $ret;
|
||||
return 'view';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user