Merge branch 'sprint/187_tianshujie_20591' into 'master'

* Fix bug #20591.

See merge request easycorp/zentaopms!2192
This commit is contained in:
孙广明
2022-03-11 01:16:47 +00:00
2 changed files with 15 additions and 3 deletions
+13 -1
View File
@@ -1029,9 +1029,21 @@ EOF;
}
elseif($data->mode == 'edit')
{
$response['result'] = 'success';
$response['message'] = $this->lang->saveSuccess;
$this->user->updateContactList($data->listID, $data->listName, $data->users);
$this->user->setGlobalContacts($data->listID, isset($data->share));
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('manageContacts', "listID=$listID")));
if(dao::isError())
{
$response['result'] = 'fail';
$response['message'] = dao::getError();
return $this->send($response);
}
$response['locate'] = inlink('manageContacts', "listID=$listID");
return $this->send($response);
}
}
+2 -2
View File
@@ -1478,13 +1478,13 @@ class userModel extends model
if(empty($data->listName))
{
dao::$errors['listName'][] = sprintf($this->lang->error->notempty, $this->lang->user->contacts->listName);
return print(js::error(dao::getError()));
return false;
}
$this->dao->update(TABLE_USERCONTACT)->data($data)
->where('id')->eq($listID)
->exec();
if(dao::isError()) return print(js::error(dao::getError()));
if(dao::isError()) return false;
}
/**