* [bug#56706] select lib after moving.
This commit is contained in:
@@ -1238,7 +1238,7 @@ 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, $spaceType, $libID);
|
||||
return $this->docZen->responseAfterMove($this->post->space, $libID);
|
||||
}
|
||||
|
||||
$this->docZen->setAclForCreateLib($spaceType);
|
||||
@@ -1294,7 +1294,7 @@ class doc extends control
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
|
||||
return $this->docZen->responseAfterMove($this->post->space, $spaceType, $data->lib, $locate, $docID);
|
||||
return $this->docZen->responseAfterMove($this->post->space, $data->lib, $docID);
|
||||
}
|
||||
|
||||
$projects = $this->loadModel('project')->getPairsByProgram(0, 'all', false, 'order_asc');
|
||||
|
||||
+6
-12
@@ -392,24 +392,18 @@ class docZen extends doc
|
||||
* Return after move lib or doc.
|
||||
*
|
||||
* @param string $space
|
||||
* @param string $spaceType
|
||||
* @param int $libID
|
||||
* @param string $locateLink
|
||||
* @param int $docID
|
||||
*
|
||||
* @access protected
|
||||
* @return bool|int
|
||||
* @return void
|
||||
*/
|
||||
protected function responseAfterMove(string $space, string $spaceType = 'mine', int $libID = 0, string $locateLink = '', int $docID = 0): bool|int
|
||||
protected function responseAfterMove(string $space, int $libID = 0, int $docID = 0)
|
||||
{
|
||||
if(empty($locateLink))
|
||||
{
|
||||
if($spaceType == 'mine') $locateLink = $this->createLink('doc', 'mySpace', "type=mine&libID={$libID}");
|
||||
elseif($spaceType == 'custom') $locateLink = $this->createLink('doc', 'teamSpace', "objectID={$space}&libID={$libID}");
|
||||
else $locateLink = true;
|
||||
}
|
||||
if($locateLink === 'true') $locateLink = true;
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'docApp' => $docID ? array('executeCommand', 'handleMovedDoc', array($docID, $space, $libID)) : array('load', null, null, null, array('noLoading' => true, 'picks' => 'lib'))));
|
||||
$spaceID = (int)(explode('.', $space)[1]);
|
||||
if($docID) $docAppAction = array('executeCommand', 'handleMovedDoc', array($docID, $space, $libID));
|
||||
else $docAppAction = array('selectSpace', $spaceID, $libID);
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'docApp' => $docAppAction));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user