Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRouslan Placella <rouslan@placella.com>2012-05-24 03:14:35 +0400
committerRouslan Placella <rouslan@placella.com>2012-06-11 17:06:02 +0400
commit88c899ff6ae9eadc9e4d56a94f1845fd65da8d84 (patch)
tree83b41323f17c47049bdc68b283023a78b512e145 /libraries/Menu.class.php
parent54d47b89db2bcb2641f59f9ca1941698cb13b549 (diff)
The PMA_Menu class no longer need to be a singleton
Diffstat (limited to 'libraries/Menu.class.php')
-rw-r--r--libraries/Menu.class.php29
1 files changed, 2 insertions, 27 deletions
diff --git a/libraries/Menu.class.php b/libraries/Menu.class.php
index 5b234346d2..61c188c096 100644
--- a/libraries/Menu.class.php
+++ b/libraries/Menu.class.php
@@ -37,17 +37,9 @@ class PMA_Menu
* @var string
*/
private $_table;
- /**
- * PMA_Menu instance
- *
- * @access private
- * @static
- * @var object
- */
- private static $_instance;
/**
- * Private constructor disables direct object creation
+ * Creates a new instance of PMA_Menu
*
* @param int $server Server id
* @param string $db Database name
@@ -55,7 +47,7 @@ class PMA_Menu
*
* @return New PMA_Table
*/
- private function __construct($server, $db, $table)
+ public function __construct($server, $db, $table)
{
$this->_server = $server;
$this->_db = $db;
@@ -67,23 +59,6 @@ class PMA_Menu
*
* @return void
*/
- public static function getInstance()
- {
- if (empty(self::$_instance)) {
- self::$_instance = new PMA_Menu(
- $GLOBALS['server'],
- $GLOBALS['db'],
- $GLOBALS['table']
- );
- }
- return self::$_instance;
- }
-
- /**
- * Prints the menu and the breadcrumbs
- *
- * @return void
- */
public function display()
{
echo $this->getDisplay();