* [refac bug #53769] convert to int.

This commit is contained in:
wangyidong
2024-08-13 11:30:19 +08:00
committed by 孙广明
parent 7a87397d98
commit 8ea1dc169a
+11 -1
View File
@@ -1169,6 +1169,16 @@ class doc extends control
$this->display();
}
/**
* 移动文档
* Move Document.
*
* @param int $docID
* @param int $libID
* @param string $space mine|[int]
* @access public
* @return void
*/
public function moveDoc(int $docID, int $libID = 0, string $space = '')
{
$doc = $this->doc->getByID($docID);
@@ -1195,7 +1205,7 @@ class doc extends control
if(empty($space)) $space = $lib->type == 'mine' ? 'mine' : $lib->parent;
$libPairs = $this->doc->getLibPairs($space == 'mine' ? 'mine' : 'custom', '', (int)$space);
if(!isset($libPairs[$libID])) $libID = key($libPairs);
if(!isset($libPairs[$libID])) $libID = (int)key($libPairs);
$this->view->docID = $docID;
$this->view->libID = $libID;