* fix the error of endless loop.

This commit is contained in:
wangchunsheng
2010-01-01 14:35:23 +00:00
parent 961899770d
commit 56442e1f0f

View File

@@ -38,7 +38,7 @@ class product extends control
/* 获取所有的产品列表。如果还没有产品,则跳转到产品的添加页面。*/
$this->products = $this->product->getPairs();
if(empty($this->products)) $this->locate($this->createLink('product', 'create'));
if(empty($this->products) and $this->methodName != 'create') $this->locate($this->createLink('product', 'create'));
$this->assign('products', $this->products);
}