mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 07:22:11 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
d80009e484
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
48
index.php
48
index.php
|
@ -1,23 +1,35 @@
|
|||
<?php
|
||||
// SeedDMS (Formerly MyDMS) Document Management System
|
||||
// Copyright (C) 2002-2005 Markus Westphal
|
||||
// Copyright (C) 2006-2008 Malcolm Cowe
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
/**
|
||||
* SeedDMS (Formerly MyDMS) Document Management System
|
||||
*
|
||||
* PHP version 8
|
||||
*
|
||||
* Copyright (C) 2002-2005 Markus Westphal
|
||||
* Copyright (C) 2006-2008 Malcolm Cowe
|
||||
* Copyright (C) 2010-2024 Uwe Steinmann
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* @category SeedDMS
|
||||
* @package SeedDMS
|
||||
* @author Uwe Steinmann <info@seeddms.org>
|
||||
* @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");
|
||||
|
|
|
@ -1,49 +1,61 @@
|
|||
<?php
|
||||
// MyDMS. Document Management System
|
||||
// Copyright (C) 2002-2005 Markus Westphal
|
||||
// Copyright (C) 2006-2008 Malcolm Cowe
|
||||
// Copyright (C) 2010 Matteo Lucarelli
|
||||
// Copyright (C) 2010-2016 Uwe Steinmann
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
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");
|
||||
/**
|
||||
* MyDMS. Document Management System
|
||||
* Copyright (C) 2002-2005 Markus Westphal
|
||||
* Copyright (C) 2006-2008 Malcolm Cowe
|
||||
* Copyright (C) 2010 Matteo Lucarelli
|
||||
* Copyright (C) 2010-2024 Uwe Steinmann
|
||||
*
|
||||
* PHP version 8
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* @category SeedDMS
|
||||
* @package SeedDMS
|
||||
* @author Uwe Steinmann <info@seeddms.org>
|
||||
* @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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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'] = '<span style="padding: 2px; color: #CCC;"><i class="fa fa-remove"></i></span>';
|
||||
|
|
|
@ -199,7 +199,10 @@ $(document).ready( function() {
|
|||
$session = array_shift($sessions);
|
||||
echo "<tr><td>".getMLText('lastaccess')."</td><td>".getLongReadableDate($session->getLastAccess())."</td></tr>\n";
|
||||
}
|
||||
// echo "<tr><td>".getMLText('network_drive')."</td><td><a href=\"http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot.'checkout/'.preg_replace('/[^A-Za-z0-9_-]/', '', $seluser->getLogin())."\">".preg_replace('/[^A-Za-z0-9_-]/', '', $seluser->getLogin())."</a></td></tr>\n";
|
||||
$item = $this->callHook('addInfoItem', $seluser);
|
||||
if($item) {
|
||||
echo "<tr><td>".$item[0]."</td><td>".$item[1]."</td></tr>\n";
|
||||
}
|
||||
echo "</table>";
|
||||
|
||||
}
|
||||
|
@ -469,9 +472,11 @@ $(document).ready( function() {
|
|||
'options'=>$options
|
||||
)
|
||||
);
|
||||
$this->contentContainerEnd();
|
||||
if($workflowmode == "traditional" || $workflowmode == 'traditional_only_approval') {
|
||||
if($workflowmode == "traditional") {
|
||||
$this->contentSubHeading(getMLText("mandatory_reviewers"));
|
||||
$this->contentContainerStart();
|
||||
$options = array();
|
||||
if($currUser)
|
||||
$res=$currUser->getMandatoryReviewers();
|
||||
|
@ -517,8 +522,10 @@ $(document).ready( function() {
|
|||
)
|
||||
);
|
||||
}
|
||||
$this->contentContainerEnd();
|
||||
|
||||
$this->contentSubHeading(getMLText("mandatory_approvers"));
|
||||
$this->contentContainerStart();
|
||||
$options = array();
|
||||
if($currUser)
|
||||
$res=$currUser->getMandatoryApprovers();
|
||||
|
@ -563,10 +570,12 @@ $(document).ready( function() {
|
|||
'options'=>$options
|
||||
)
|
||||
);
|
||||
$this->contentContainerEnd();
|
||||
} elseif($workflowmode == 'advanced') {
|
||||
$workflows = $dms->getAllWorkflows();
|
||||
if($workflows) {
|
||||
$this->contentSubHeading(getMLText("workflow"));
|
||||
$this->contentContainerStart();
|
||||
$options = array();
|
||||
$mandatoryworkflows = $currUser ? $currUser->getMandatoryWorkflows() : array();
|
||||
foreach ($workflows as $workflow) {
|
||||
|
@ -585,9 +594,9 @@ $(document).ready( function() {
|
|||
'options'=>$options
|
||||
)
|
||||
);
|
||||
$this->contentContainerEnd();
|
||||
}
|
||||
}
|
||||
$this->contentContainerEnd();
|
||||
$this->formSubmit("<i class=\"fa fa-save\"></i> ".getMLText($currUser ? "save" : "add_user"));
|
||||
?>
|
||||
</form>
|
||||
|
|
|
@ -806,9 +806,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'));
|
||||
}
|
||||
|
@ -3255,7 +3257,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'] = '<span style="padding: 2px; color: #CCC;"><i class="fa fa-remove"></i></span>';
|
||||
|
|
Loading…
Reference in New Issue
Block a user