* Change function commitResult after code review.
This commit is contained in:
@@ -123,7 +123,10 @@ class ci extends control
|
||||
$caseResult = $post->funcResult;
|
||||
$firstCase = array_shift($caseResult);
|
||||
$productID = $firstCase->productId;
|
||||
if(empty($productID) and !empty($firstCase->id)) $productID = $this->dao->select('product')->from(TABLE_CASE)->where('id')->eq((int)$firstCase->id)->fetch('product');
|
||||
if(empty($productID) and !empty($firstCase->id))
|
||||
{
|
||||
$productID = $this->dao->findById($firstCase->id)->from(TABLE_CASE)->fetch('product');
|
||||
}
|
||||
}
|
||||
if(empty($productID)) die(json_encode(array('result' => 'fail', 'message' => 'productID is not found')));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user