* Fix a bug: batch edit main branch error.

This commit is contained in:
xieqiyu
2021-11-10 09:37:59 +08:00
parent 76651524d9
commit 4f90b186ea
3 changed files with 38 additions and 18 deletions
+4 -3
View File
@@ -102,12 +102,13 @@ class branch extends control
$this->loadModel('action');
$this->loadModel('product')->setMenu($productID);
if($this->post->name)
if($this->post->IDList)
{
$changes = $this->branch->batchUpdate();
$changes = $this->branch->batchUpdate($productID);
foreach($changes as $branchID => $change)
{
if($change) $this->action->create('branch', $branchID, 'Edited');
$extra = $branchID == BRANCH_MAIN ? $productID : '';
if($change) $this->action->create('branch', $branchID, 'Edited', '', $extra);
}
die(js::locate($this->session->branchManage, 'parent'));