* add a alert when no product.

This commit is contained in:
wangchunsheng
2010-09-11 07:06:40 +00:00
parent 66832034b8
commit 131e2fe157
3 changed files with 7 additions and 1 deletions
+5 -1
View File
@@ -36,7 +36,11 @@ class bug extends control
$this->loadModel('story');
$this->loadModel('task');
$this->products = $this->product->getPairs();
if(empty($this->products)) $this->locate($this->createLink('product', 'create'));
if(empty($this->products))
{
echo js::alert($this->lang->product->errorNoProduct);
die(js::locate($this->createLink('product', 'create')));
}
$this->view->products = $this->products;
}