Merge branch 'seeddms-5.1.x' into seeddms-6.0.x

This commit is contained in:
Uwe Steinmann 2020-08-05 18:45:09 +02:00
commit b89b2a9254
5 changed files with 25 additions and 4 deletions

View File

@ -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
*

View File

@ -24,7 +24,7 @@
</stability>
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
<notes>
- ???
- add method SeedDMS_Core_Document::setParent() as an alias for setFolder()
</notes>
<contents>
<dir baseinstalldir="SeedDMS" name="/">

View File

@ -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="") { /* {{{ */

View File

@ -2704,6 +2704,8 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
// $content .= "<td>".$version."</td>";
$content .= "<td>";
$content .= "<div class=\"list-action\">";
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 .= '<a class="addtoclipboard" rel="D'.$docID.'" msg="'.getMLText('splash_added_to_clipboard').'" title="'.getMLText("add_to_clipboard").'"><i class="icon-copy"></i></a>';
}
if(!empty($extracontent['end_action_list']))
$content .= $extracontent['end_action_list'];
$content .= "</div>";
$content .= "</td>";
if(!$skipcont)
@ -2829,6 +2833,8 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
// $content .= "<td></td>";
$content .= "<td>";
$content .= "<div class=\"list-action\">";
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 .= '<a class="addtoclipboard" rel="F'.$subFolder->getID().'" msg="'.getMLText('splash_added_to_clipboard').'" title="'.getMLText("add_to_clipboard").'"><i class="icon-copy"></i></a>';
}
if(!empty($extracontent['end_action_list']))
$content .= $extracontent['end_action_list'];
$content .= "</div>";
$content .= "</td>";
if(!$skipcont)

View File

@ -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 '<script src="../out/out.FolderChooser.php?action=js&'.$_SERVER['QUERY_STRING'].'"></script>'."\n";
} else {
$this->printNewTreeNavigation($rootfolderid, $mode, 0, $form);