Merge branch 'sprint/187_tianshujie_20591' into 'master'
* Fix bug #20591. See merge request easycorp/zentaopms!2192
This commit is contained in:
+13
-1
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user