2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Functionality for the navigation tree
6 * @package PhpMyAdmin-Navigation
8 if (! defined('PHPMYADMIN')) {
12 require_once './libraries/check_user_privileges.lib.php';
15 * Represents a container for database nodes in the navigation tree
17 * @package PhpMyAdmin-Navigation
19 class Node_Database_Container
extends Node
22 * Initialises the class
24 * @param string $name An identifier for the new node
26 public function __construct($name)
28 parent
::__construct($name, Node
::CONTAINER
);
30 if ($GLOBALS['is_create_db_priv']
31 && $GLOBALS['cfg']['ShowCreateDb'] !== false
33 $new = PMA_NodeFactory
::getInstance(
34 'Node', _pgettext('Create new database', 'New')
37 $new->icon
= PMA_Util
::getImage('b_newdb.png', '');
39 'text' => 'server_databases.php?server=' . $GLOBALS['server']
40 . '&token=' . $_SESSION[' PMA_token '],
41 'icon' => 'server_databases.php?server=' . $GLOBALS['server']
42 . '&token=' . $_SESSION[' PMA_token '],
44 $new->classes
= 'new_database italics';
45 $this->addChild($new);