* fix for bug

This commit is contained in:
wangyidong
2011-04-26 08:32:01 +00:00
parent 0fe6ca37d4
commit 18065ba29b
3 changed files with 19 additions and 30 deletions
+11 -1
View File
@@ -53,7 +53,17 @@ class tree extends control
if($viewType == 'story')
{
$this->product->setMenu($this->product->getPairs(), $rootID, 'story');
$this->view->allProduct = $this->product->getPairs();
$products = $this->product->getPairs();
$allProduct = array();
foreach($products as $key => $productVal)
{
if($key == $rootID) continue;
$allProduct[$key] = $productVal;
}
$this->view->allProduct =$allProduct;
$keys = array_keys($allProduct);
$this->view->key = $keys[0];
$this->view->productModules = $this->tree->getOptionMenu($keys[0], 'story');
$this->lang->tree->menu = $this->lang->product->menu;
$this->lang->set('menugroup.tree', 'product');