* Optimize code.

This commit is contained in:
mayue
2022-06-10 16:17:58 +08:00
parent bf56790216
commit 9b76036761
+2 -1
View File
@@ -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'));