* fix a bug for no project and product.
This commit is contained in:
@@ -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>";
|
||||
|
||||
@@ -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>";
|
||||
|
||||
Reference in New Issue
Block a user