* fix a bug for no project and product.

This commit is contained in:
wangyidong
2013-07-04 06:44:33 +00:00
parent 9c0c366153
commit 178c3f2dee
2 changed files with 4 additions and 0 deletions

View File

@@ -59,6 +59,8 @@ class productModel extends model
*/
public function select($products, $productID, $currentModule, $currentMethod, $extra = '')
{
if(!$productID) return;
$currentProduct = $this->getById($productID);
$output = "<div id='currentItem'>";
$output .= "<a onclick=\"showDropMenu('product', '$productID', '$currentModule', '$currentMethod', '$extra')\">{$currentProduct->name}<span id='dropIcon'></span></a>";

View File

@@ -116,6 +116,8 @@ class projectModel extends model
*/
public function select($projects, $projectID, $currentModule, $currentMethod, $extra = '')
{
if(!$projectID) return;
$currentProject = $this->getById($projectID);
$output = "<div id='currentItem'>";
$output .= "<a onclick=\"showDropMenu('project', '$projectID', '$currentModule', '$currentMethod', '$extra')\">{$currentProject->name}<span id='dropIcon'></span></a>";