From 328b1b2b1ade10a0a2d89fc8c1c311fab86fd4c2 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 5 Aug 2020 18:41:53 +0200 Subject: [PATCH 1/5] add method setParent() as an alias for setFolder() --- SeedDMS_Core/Core/inc.ClassDocument.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index bda805c0c..054be2674 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -602,6 +602,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 * From d705ff4618d3bc3604e82c5c5bb418c2f9638689 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 5 Aug 2020 18:42:22 +0200 Subject: [PATCH 2/5] notes for 5.1.19 --- SeedDMS_Core/package.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml index 152259263..f5d232221 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() From 0cd7a621f491a9715afdcdb5342663be6eeed5c4 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 5 Aug 2020 18:42:44 +0200 Subject: [PATCH 3/5] remove space in log message --- inc/inc.Utils.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/inc.Utils.php b/inc/inc.Utils.php index 5a3d7c9a8..1a7f810d1 100644 --- a/inc/inc.Utils.php +++ b/inc/inc.Utils.php @@ -348,9 +348,9 @@ function add_log_line($msg="", $priority=null) { /* {{{ */ else $ip = $_SERVER['REMOTE_ADDR']; if($user) - $logger->log($user->getLogin()." (".$ip.") ".basename($_SERVER["REQUEST_URI"], ".php").($msg ? ' '.$msg : ''), $priority); + $logger->log($user->getLogin()." (".$ip.") ".basename($_SERVER["REQUEST_URI"], ".php").($msg ? $msg : ''), $priority); else - $logger->log("-- (".$ip.") ".basename($_SERVER["REQUEST_URI"], ".php").($msg ? ' '.$msg : ''), $priority); + $logger->log("-- (".$ip.") ".basename($_SERVER["REQUEST_URI"], ".php").($msg ? $msg : ''), $priority); } /* }}} */ function _add_log_line($msg="") { /* {{{ */ From 1ce602c98c0b38f606824b61b3826485c9baae90 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 5 Aug 2020 18:43:12 +0200 Subject: [PATCH 4/5] add [begin|end]_action_list as keys for extracontent in list items --- views/bootstrap/class.Bootstrap.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index cdc3d96c5..0a9f1e4ac 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -2439,6 +2439,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 { @@ -2455,6 +2457,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 .= ""; } @@ -2564,6 +2568,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); @@ -2578,6 +2584,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) From c68f111c7a8e57460a10821a80134766d9c52ff6 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 5 Aug 2020 18:43:45 +0200 Subject: [PATCH 5/5] git rid of expandFolderTree checking --- views/bootstrap/class.FolderChooser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);