diff --git a/CHANGELOG b/CHANGELOG index 4ef1f9723..47f963c30 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -308,7 +308,7 @@ - use rename() on windows when moving an extension to its final destination - fixed bug in AddDocument, approver group wasn't checked properly against mandatory approvers -- email from address in settings can be force for all outgoing mail +- email From-address in settings can be forced for all outgoing mail - checking of ssl certificate for smtp can be turned off - add chart for disk space per month - clearing cache of js files works for a large number of files diff --git a/doc/README.Converters b/doc/README.Converters index e2cdebf72..dfa22f0c4 100644 --- a/doc/README.Converters +++ b/doc/README.Converters @@ -1,3 +1,23 @@ +Commands for converting documents +---------------------------------- + +This file contains commands for converting different document types +into + +* text (for fulltext search) +* png (for preview images) +* pdf (for pdf documents) + +Such conversions may not necessarily output an excact equivalent of +the input file, but outputs a suitable representation, e.g. +converting an mp3 file into text may output the metadata or even the +lyrics of the song. Converting it into a preview image may result +in a picture of the album cover. + +Please note, that when ever a command outputs anything to stderr, +this will considered as a failure of the command. Most command line +programs have a parameter (.e.g. `-q`) to suppress such an output. + Conversion to text for fulltext search ======================================= @@ -78,6 +98,9 @@ message/rfc822 text/plain iconv -c -f utf-8 -t latin1 '%f' | a2ps -1 -q -a1 -R -B -o - - | ps2pdf - - + The parameter `-q` is important because a2ps sends some statistical + data to stderr, which makes SeedDMS believe the command has failed. + application/x-xopp xournalpp -p "%o" "%f" diff --git a/index.php b/index.php index ce750c740..b6fa64a0d 100644 --- a/index.php +++ b/index.php @@ -1,23 +1,35 @@ + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://www.seeddms.org Main Site + */ -require("inc/inc.Settings.php"); +require "inc/inc.Settings.php"; if(true) { require_once("inc/inc.Utils.php"); diff --git a/out/out.EditUserData.php b/out/out.EditUserData.php index 16a7bb638..8e96805af 100644 --- a/out/out.EditUserData.php +++ b/out/out.EditUserData.php @@ -1,49 +1,61 @@ + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://www.seeddms.org Main Site + */ + +if (!isset($settings)) { + require_once "../inc/inc.Settings.php"; +} +require_once "inc/inc.Utils.php"; +require_once "inc/inc.LogInit.php"; +require_once "inc/inc.Language.php"; +require_once "inc/inc.Init.php"; +require_once "inc/inc.Extension.php"; +require_once "inc/inc.DBInit.php"; +require_once "inc/inc.ClassUI.php"; +require_once "inc/inc.Authentication.php"; $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); +$view = UI::factory($theme, $tmp[1], array('dms' => $dms, 'user' => $user)); $accessop = new SeedDMS_AccessOperation($dms, $user, $settings); if ($user->isGuest()) { - UI::exitError(getMLText("edit_user_details"),getMLText("access_denied")); + UI::exitError(getMLText("edit_user_details"), getMLText("access_denied")); } if (!$user->isAdmin() && ($settings->_disableSelfEdit)) { - UI::exitError(getMLText("edit_user_details"),getMLText("access_denied")); + UI::exitError(getMLText("edit_user_details"), getMLText("access_denied")); } -if($view) { +if ($view) { $view->setParam('enableuserimage', $settings->_enableUserImage); $view->setParam('enablelanguageselector', $settings->_enableLanguageSelector); $view->setParam('enablethemeselector', $settings->_enableThemeSelector); diff --git a/out/out.ReviewSummary.php b/out/out.ReviewSummary.php index 3699c7241..7dbd0c6f8 100644 --- a/out/out.ReviewSummary.php +++ b/out/out.ReviewSummary.php @@ -38,7 +38,7 @@ if (!$accessop->check_view_access($view, $_GET)) { } if ($user->isGuest()) { - UI::exitError(getMLText("my_documents"),getMLText("access_denied")); + UI::exitError(getMLText("my_documents"), getMLText("access_denied")); } if($view) { diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 37552d3d1..0ba8454f6 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -879,9 +879,11 @@ background-image: linear-gradient(to bottom, #882222, #111111);; $menuitems['expires'] = array('link'=>$this->params['settings']->_httpRoot."out/out.SetExpires".$docid, 'label'=>getMLText('expires')); } } - if ($accessMode == M_ALL) { + if ($document->getAccessMode($this->params['user'], 'removeDocument') == M_ALL) { if ($accessobject->check_view_access('RemoveDocument')) $menuitems['rm_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.RemoveDocument".$docid, 'label'=>getMLText('rm_document')); + } + if($accessMode == M_ALL) { if ($accessobject->check_view_access('DocumentAccess')) $menuitems['edit_document_access'] = array('link'=>$this->params['settings']->_httpRoot."out/out.DocumentAccess". $docid, 'label'=>getMLText('edit_document_access')); } @@ -3281,7 +3283,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) if(!empty($extracontent['begin_action_list'])) $content .= $extracontent['begin_action_list']; if($accessop->check_view_access('RemoveDocument')) { - if($document->getAccessMode($user) >= M_ALL) { + if($document->getAccessMode($user, 'removeDocument') >= M_ALL) { $actions['remove_document'] = $this->printDeleteDocumentButton($document, 'splash_rm_document', true); } else { $actions['remove_document'] = ''; diff --git a/views/bootstrap/class.UsrMgr.php b/views/bootstrap/class.UsrMgr.php index c55c74eca..65270d8e2 100644 --- a/views/bootstrap/class.UsrMgr.php +++ b/views/bootstrap/class.UsrMgr.php @@ -199,7 +199,10 @@ $(document).ready( function() { $session = array_shift($sessions); echo "