* Optimize code.
This commit is contained in:
@@ -919,7 +919,8 @@ class productModel extends model
|
||||
/* When there are products under the line, the program cannot be modified */
|
||||
foreach($oldLines as $oldLine)
|
||||
{
|
||||
$oldLineID = 'id' . $oldLine->id; if($data->modules[$oldLineID] != $oldLine->name or $data->programs[$oldLineID] != $oldLine->root)
|
||||
$oldLineID = 'id' . $oldLine->id;
|
||||
if($data->modules[$oldLineID] != $oldLine->name or $data->programs[$oldLineID] != $oldLine->root)
|
||||
{
|
||||
$product = $this->dao->select('*')->from(TABLE_PRODUCT)->where('line')->eq($oldLine->id)->fetchAll('id');
|
||||
if(!empty($product)) return print(js::error($this->lang->product->changeLineError) . js::locate('parent'));
|
||||
|
||||
Reference in New Issue
Block a user