diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index 5bbd3078f..1ddf0bdd1 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -629,6 +629,19 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ return $this->_folder; } /* }}} */ + /** + * Set folder of a document + * + * This function basically moves a document from a folder to another + * folder. + * + * @param SeedDMS_Core_Folder $newFolder + * @return boolean false in case of an error, otherwise true + */ + function setParent($newFolder) { /* {{{ */ + return $this->setFolder($newFolder); + } /* }}} */ + /** * Set folder of a document * diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml index 6d1736908..fe6c72087 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -24,7 +24,7 @@ GPL License -- ??? +- add method SeedDMS_Core_Document::setParent() as an alias for setFolder() diff --git a/inc/inc.Utils.php b/inc/inc.Utils.php index d92ee3fb7..2a6f3545e 100644 --- a/inc/inc.Utils.php +++ b/inc/inc.Utils.php @@ -353,9 +353,9 @@ function add_log_line($msg="", $priority=null) { /* {{{ */ else $scriptname = basename($_SERVER["SCRIPT_NAME"], ".php"); if($user) - $logger->log($user->getLogin()." (".$ip.") ".$scriptname.($msg ? ' '.$msg : ''), $priority); + $logger->log($user->getLogin()." (".$ip.") ".$scriptname.($msg ? $msg : ''), $priority); else - $logger->log("-- (".$ip.") ".$scriptname.($msg ? ' '.$msg : ''), $priority); + $logger->log("-- (".$ip.") ".$scriptname.($msg ? $msg : ''), $priority); } /* }}} */ function _add_log_line($msg="") { /* {{{ */ diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 70419f256..85f7e2d4f 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -2704,6 +2704,8 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) // $content .= "".$version.""; $content .= ""; $content .= "
"; + if(!empty($extracontent['begin_action_list'])) + $content .= $extracontent['begin_action_list']; if($document->getAccessMode($user) >= M_ALL) { $content .= $this->printDeleteDocumentButton($document, 'splash_rm_document', true); } else { @@ -2720,6 +2722,8 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) if($enableClipboard) { $content .= ''; } + if(!empty($extracontent['end_action_list'])) + $content .= $extracontent['end_action_list']; $content .= "
"; $content .= ""; if(!$skipcont) @@ -2829,6 +2833,8 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) // $content .= ""; $content .= ""; $content .= "
"; + if(!empty($extracontent['begin_action_list'])) + $content .= $extracontent['begin_action_list']; $subFolderAccessMode = $subFolder->getAccessMode($user); if($subFolderAccessMode >= M_ALL) { $content .= $this->printDeleteFolderButton($subFolder, 'splash_rm_folder', true); @@ -2843,6 +2849,8 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) if($enableClipboard) { $content .= ''; } + if(!empty($extracontent['end_action_list'])) + $content .= $extracontent['end_action_list']; $content .= "
"; $content .= ""; if(!$skipcont) diff --git a/views/bootstrap/class.FolderChooser.php b/views/bootstrap/class.FolderChooser.php index 213a54162..33f099022 100644 --- a/views/bootstrap/class.FolderChooser.php +++ b/views/bootstrap/class.FolderChooser.php @@ -61,7 +61,7 @@ class SeedDMS_View_FolderChooser extends SeedDMS_Bootstrap_Style { // $this->htmlStartPage(getMLText("choose_target_folder")); // $this->contentContainerStart(); if(1) { - $this->printNewTreeNavigationHtml($rootfolderid, $mode, 0, $form, ($this->params['expandFolderTree'] == 1) ? -1 : 3, $orderby); + $this->printNewTreeNavigationHtml($rootfolderid, $mode, 0, $form, 0, $orderby); echo ''."\n"; } else { $this->printNewTreeNavigation($rootfolderid, $mode, 0, $form);