*[misc] add param to responseAfterMove.
This commit is contained in:
@@ -1142,6 +1142,7 @@ class doc extends control
|
||||
{
|
||||
$lib = $this->doc->getLibByID($libID);
|
||||
if(empty($targetSpace)) $targetSpace = $this->doc->getLibTargetSpace($lib);
|
||||
$spaceType = $this->doc->getParamFromTargetSpace($targetSpace, 'type');
|
||||
|
||||
if(!empty($lib->main)) return $this->send(array('result' => 'fail', 'message' => $this->lang->doc->errorEditSystemDoc));
|
||||
|
||||
@@ -1156,10 +1157,9 @@ class doc extends control
|
||||
$this->doc->moveLib($libID, $data);
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
return $this->docZen->responseAfterMove($this->post->space, $libID);
|
||||
return $this->docZen->responseAfterMove($this->post->space, $spaceType, $libID);
|
||||
}
|
||||
|
||||
$spaceType = $this->doc->getParamFromTargetSpace($targetSpace, 'type');
|
||||
$this->docZen->setAclForCreateLib($spaceType);
|
||||
|
||||
$this->view->title = $this->lang->doc->moveLibAction;
|
||||
|
||||
@@ -3323,7 +3323,7 @@ class docModel extends model
|
||||
$this->dao->update(TABLE_DOCLIB)->data($data)->where('id')->eq($libID)->exec();
|
||||
|
||||
$from = in_array($lib->type, array('project', 'product')) ? ($lib->project ? "{$lib->type}.{$lib->project}" : "{$lib->type}.{$lib->product}") : "{$lib->type}.{$lib->parent}";
|
||||
$to = in_array($data->type, array('project', 'product')) ? ($data->project ? "{$data->type}.{$data->project}" : "{$data->type}.{$lib->product}") : "{$data->type}.{$data->parent}";
|
||||
$to = in_array($data->type, array('project', 'product')) ? (isset($data->project) ? "{$data->type}.{$data->project}" : "{$data->type}.{$lib->product}") : "{$data->type}.{$data->parent}";
|
||||
|
||||
$actionID = $this->loadModel('action')->create('docLib', $libID, 'Moved', '', json_encode(array('from' => $from, 'to' => $to)));
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
|
||||
Reference in New Issue
Block a user