Don't preload the children of table nodes in

This commit is contained in:
Rouslan Placella 2012-07-03 16:31:57 +01:00
parent 32644bafeb
commit 56a1d90cdb
2 changed files with 5 additions and 11 deletions

View File

@ -186,7 +186,9 @@ class PMA_NavigationTree {
$retval = $table;
$containers = $this->addTableContainers($table);
array_shift($path); // remove table
foreach ($containers as $container) {
if (count($path) > 0 && array_key_exists($path[0], $containers)) {
$container = $table->getChild($path[0], true);
$retval = $container;
foreach ($table->getData($container->real_name) as $item) {
switch ($container->real_name) {
case 'indexes':
@ -239,11 +241,10 @@ class PMA_NavigationTree {
}
// Add all new Nodes to the tree
foreach ($retval as $node) {
$node->loaded = true;
$table->addChild($node);
}
} else {
foreach ($db->children as $node) {
foreach ($table->children as $node) {
$retval[$node->real_name] = $node;
}
}
@ -492,7 +493,7 @@ class PMA_NavigationTree {
$v_path = implode('.', array_reverse($v_path));
$loaded = '';
if ($node->loaded || $node->is_group || $GLOBALS['cfg']['LeftFrameLight'] != true) {
if ($node->is_group || $GLOBALS['cfg']['LeftFrameLight'] != true) {
$loaded = ' loaded';
}
$container = '';

View File

@ -83,12 +83,6 @@ class Node {
*/
protected $links;
/**
* @var string If the node is a container, this indicates if
* its children are already loaded
*/
private $loaded = false;
/**
* @var string classes
*/
@ -158,7 +152,6 @@ class Node {
case 'separator':
case 'separator_depth':
case 'visible':
case 'loaded':
$this->$a = $b;
return true;
default: