diff --git a/CHANGELOG b/CHANGELOG index 261c04f55..16440afab 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -363,6 +363,8 @@ -------------------------------------------------------------------------------- - fix rest api endpoint PUT /folder/{id}/comment - show document preview when editing attributes of a document +- fix utilities which require translations +- fix potential XSS attack when deleting a folder/document -------------------------------------------------------------------------------- Changes in version 5.1.44 diff --git a/controllers/class.ExtensionMgr.php b/controllers/class.ExtensionMgr.php index 755baf186..c91bb8235 100644 --- a/controllers/class.ExtensionMgr.php +++ b/controllers/class.ExtensionMgr.php @@ -85,13 +85,14 @@ class SeedDMS_Controller_ExtensionMgr extends SeedDMS_Controller_Common { $extmgr = $this->params['extmgr']; $extname = $this->params['extname']; - if($settings->extensionIsDisabled($extname)) + if ($settings->extensionIsDisabled($extname)) { $settings->enableExtension($extname); - else + } else { $settings->disableExtension($extname); - $settings->save(); + } + $ret = $settings->save(); - return true; + return $ret; } /* }}} */ } diff --git a/doc/README.Converters.md b/doc/README.Converters.md index b96b6fc3e..07c980545 100644 --- a/doc/README.Converters.md +++ b/doc/README.Converters.md @@ -53,7 +53,7 @@ extracting text, creating an image, and converting to pdf. Unless you run a very old version of SeedDMS, you will never need this command for converting text files. SeedDMS has this trivial -converter build in. +converter built in. ### application/pdf @@ -63,7 +63,9 @@ If pdftotext takes too long on large document, then you may want to pass parameter `-l` to specify the last page to be converted. `-q` is for suppressing error/warnings send to stderr -`mutool draw -F txt -q -N -o - %s` +`mutool draw -F txt -q -N -o - '%s'` + +`mutool convert -F text -o - '%s'` ### application/vnd.openxmlformats-officedocument.wordprocessingml.document @@ -161,6 +163,10 @@ Converting from application/x-xopp to pdf only works if the xopp file does not use a pdf document as a background, because this pdf is not stored in the xopp fіle. +### application/epub+zip + +`mutool convert -F pdf -o "%o" "%f"` + ### Many office formats As already mentioned above, `unoconv` has some disadvantages. It is @@ -210,6 +216,10 @@ needed if the output goes to stdout. `pdftocairo` needs to output to stdout because the output file name passed to pdftocairo will be suffixed with `.png` +### application/epub+zip + +`mutool draw -F png -w %w -q -N -o '%o' '%f' 1` + ### application/postscript `convert -density 100 -resize %wx '%f[0]' 'png:%o'` diff --git a/inc/inc.ClassSettings.php b/inc/inc.ClassSettings.php index cf62d635d..45262f745 100644 --- a/inc/inc.ClassSettings.php +++ b/inc/inc.ClassSettings.php @@ -13,6 +13,7 @@ namespace Seeddms\Seeddms; +use PDO; use SeedDMS_Core_File; use SeedDMS_Core_DMS; use SeedDMS_Core_DatabaseAccess; @@ -384,6 +385,8 @@ class Settings { /* {{{ */ var $_incItemsPerPage = 0; // parse comments of folders and documents as markdown var $_markdownComments = false; + // show dropdown menu for actions on folders/documents + var $_actiondropdown = false; // Show form to submit missing translations at end of page var $_showMissingTranslations = false; // Extra Path to additional software, will be added to include path @@ -615,6 +618,7 @@ class Settings { /* {{{ */ if(isset($tab["incItemsPerPage"])) $this->_incItemsPerPage = intval($tab["incItemsPerPage"]); $this->_markdownComments = Settings::boolVal($tab["markdownComments"]); + $this->_actiondropdown = Settings::boolVal($tab["actiondropdown"]); // XML Path: /configuration/site/edition $node = $xml->xpath('/configuration/site/edition'); @@ -958,7 +962,7 @@ class Settings { /* {{{ */ $disabled = strval($tmp['disable']); else $disabled = 0; - $this->_extensions[$extname]['__disable__'] = $disabled=='1' || $disabled == 'true' ? true : false; + $this->_extensions[$extname]['__disable__'] = ($disabled=='1' || $disabled == 'true') ? true : false; foreach($extension->children() as $parameter) { $tmp2 = $parameter->attributes(); /* Do not read a parameter with the same name. Just a pre caution */ @@ -1059,6 +1063,7 @@ class Settings { /* {{{ */ $this->setXMLAttributValue($node, "maxItemsPerPage", $this->_maxItemsPerPage); $this->setXMLAttributValue($node, "incItemsPerPage", $this->_incItemsPerPage); $this->setXMLAttributValue($node, "markdownComments", $this->_markdownComments); + $this->setXMLAttributValue($node, "actiondropdown", $this->_actiondropdown); // XML Path: /configuration/site/edition $node = $this->getXMLNode($xml, '/configuration/site', 'edition'); diff --git a/op/op.Settings.php b/op/op.Settings.php index 13210fe97..3054759e6 100644 --- a/op/op.Settings.php +++ b/op/op.Settings.php @@ -110,6 +110,7 @@ if ($action == "saveSettings") setIntValue('maxItemsPerPage'); setIntValue('incItemsPerPage'); setBoolValue('markdownComments'); + setBoolValue('actiondropdown'); // SETTINGS - SITE - EDITION setBoolValue('strictFormCheck'); diff --git a/utils/delete.php b/utils/delete.php index d054ff09b..b272c2fcb 100644 --- a/utils/delete.php +++ b/utils/delete.php @@ -99,7 +99,6 @@ include($myincpath."/inc/inc.Language.php"); include($myincpath."/inc/inc.Init.php"); include($myincpath."/inc/inc.Extension.php"); include($myincpath."/inc/inc.DBInit.php"); -include($myincpath."/inc/inc.ClassNotificationService.php"); include($myincpath."/inc/inc.Notification.php"); include($myincpath."/inc/inc.ClassController.php"); diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 33fe6f5d1..128b76313 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -731,41 +731,68 @@ background-image: linear-gradient(to bottom, #882222, #111111);; echo $content; } /* }}} */ - protected function showButtonwithMenu($button, $options=array()) { /* {{{ */ + protected function getMenu($menuitems=[], $options=[]) { /* {{{ */ $content = ''; $content .= ' +
+'; + return $content; + } /* }}} */ + + protected function getButtonWithMenu($button, $options=array()) { /* {{{ */ + $content = ''; + if ($button['menuitems']) { + $content .= '