mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 08:55:54 +00:00
Merge branch 'develop' into hooks
This commit is contained in:
commit
17130cec5e
2
Makefile
2
Makefile
|
@ -1,4 +1,4 @@
|
|||
VERSION=4.2.2
|
||||
VERSION=4.3.0
|
||||
SRC=CHANGELOG inc conf utils index.php languages views op out README.md README.Notification README.Ubuntu drop-tables-innodb.sql styles js TODO LICENSE Makefile webdav install
|
||||
#restapi webapp
|
||||
|
||||
|
|
|
@ -243,7 +243,7 @@ class SeedDMS_Core_DMS {
|
|||
$this->convertFileTypes = array();
|
||||
$this->version = '@package_version@';
|
||||
if($this->version[0] == '@')
|
||||
$this->version = '4.2.2';
|
||||
$this->version = '4.3.0';
|
||||
} /* }}} */
|
||||
|
||||
function getDB() { /* {{{ */
|
||||
|
|
|
@ -12,11 +12,11 @@
|
|||
<email>uwe@steinmann.cx</email>
|
||||
<active>yes</active>
|
||||
</lead>
|
||||
<date>2013-05-17</date>
|
||||
<date>2013-05-22</date>
|
||||
<time>09:21:37</time>
|
||||
<version>
|
||||
<release>4.2.2</release>
|
||||
<api>4.2.1</api>
|
||||
<release>4.3.0</release>
|
||||
<api>4.3.0</api>
|
||||
</version>
|
||||
<stability>
|
||||
<release>stable</release>
|
||||
|
@ -24,7 +24,6 @@
|
|||
</stability>
|
||||
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
||||
<notes>
|
||||
- admins can be added as reviewer/approver again
|
||||
</notes>
|
||||
<contents>
|
||||
<dir baseinstalldir="SeedDMS" name="/">
|
||||
|
@ -529,5 +528,21 @@ New release
|
|||
- fixed bug in SeedDMS_Core_DocumentContent::addIndApp()
|
||||
</notes>
|
||||
</release>
|
||||
<release>
|
||||
<date>2013-05-17</date>
|
||||
<time>09:21:37</time>
|
||||
<version>
|
||||
<release>4.2.2</release>
|
||||
<api>4.2.1</api>
|
||||
</version>
|
||||
<stability>
|
||||
<release>stable</release>
|
||||
<api>stable</api>
|
||||
</stability>
|
||||
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
||||
<notes>
|
||||
- admins can be added as reviewer/approver again
|
||||
</notes>
|
||||
</release>
|
||||
</changelog>
|
||||
</package>
|
||||
|
|
|
@ -77,11 +77,15 @@ class SeedDMS_Session {
|
|||
if (!$this->db->getResult($queryStr))
|
||||
return false;
|
||||
$this->id = $id;
|
||||
$this->data = array('userid'=>$resArr[0]['userID'], 'theme'=>$resArr[0]['theme'], 'lang'=>$resArr[0]['language'], 'id'=>$resArr[0]['id'], 'lastaccess'=>$resArr[0]['lastAccess'], 'flashmsg'=>'', 'su'=>$resArr[0]['su']);
|
||||
$this->data = array('userid'=>$resArr[0]['userID'], 'theme'=>$resArr[0]['theme'], 'lang'=>$resArr[0]['language'], 'id'=>$resArr[0]['id'], 'lastaccess'=>$resArr[0]['lastAccess'], 'su'=>$resArr[0]['su']);
|
||||
if($resArr[0]['clipboard'])
|
||||
$this->data['clipboard'] = json_decode($resArr[0]['clipboard'], true);
|
||||
else
|
||||
$this->data['clipboard'] = array('docs'=>array(), 'folders'=>array());
|
||||
if($resArr[0]['splashmsg'])
|
||||
$this->data['splashmsg'] = json_decode($resArr[0]['splashmsg'], true);
|
||||
else
|
||||
$this->data['splashmsg'] = array();
|
||||
return $resArr[0];
|
||||
} /* }}} */
|
||||
|
||||
|
@ -107,6 +111,8 @@ class SeedDMS_Session {
|
|||
$this->data['lastaccess'] = $lastaccess;
|
||||
$this->data['su'] = 0;
|
||||
$this->data['clipboard'] = array('docs'=>array(), 'folders'=>array());
|
||||
$this->data['clipboard'] = array('type'=>'', 'msg'=>'');
|
||||
$this->data['splashmsg'] = array();
|
||||
return $id;
|
||||
} /* }}} */
|
||||
|
||||
|
@ -238,7 +244,7 @@ class SeedDMS_Session {
|
|||
function setClipboard($clipboard) { /* {{{ */
|
||||
/* id is only set if load() was called before */
|
||||
if($this->id) {
|
||||
$queryStr = "UPDATE tblSessions SET clipboard = " . json_encode($this->db->qstr($clipboard)) . " WHERE id = " . $this->db->qstr($this->id);
|
||||
$queryStr = "UPDATE tblSessions SET clipboard = " . $this->db->qstr(json_encode($clipboard)) . " WHERE id = " . $this->db->qstr($this->id);
|
||||
if (!$this->db->getResult($queryStr))
|
||||
return false;
|
||||
$this->data['clipboard'] = $clipboard;
|
||||
|
@ -301,5 +307,46 @@ class SeedDMS_Session {
|
|||
return true;
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Set splash message of session
|
||||
*
|
||||
* @param array $msg contains 'typ' and 'msg'
|
||||
*/
|
||||
function setSplashMsg($msg) { /* {{{ */
|
||||
/* id is only set if load() was called before */
|
||||
if($this->id) {
|
||||
$queryStr = "UPDATE tblSessions SET splashmsg = " . $this->db->qstr(json_encode($msg)) . " WHERE id = " . $this->db->qstr($this->id);
|
||||
if (!$this->db->getResult($queryStr))
|
||||
return false;
|
||||
$this->data['splashmsg'] = $msg;
|
||||
}
|
||||
return true;
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Set splash message of session
|
||||
*
|
||||
* @param array $msg contains 'typ' and 'msg'
|
||||
*/
|
||||
function clearSplashMsg() { /* {{{ */
|
||||
/* id is only set if load() was called before */
|
||||
if($this->id) {
|
||||
$queryStr = "UPDATE tblSessions SET splashmsg = '' WHERE id = " . $this->db->qstr($this->id);
|
||||
if (!$this->db->getResult($queryStr))
|
||||
return false;
|
||||
$this->data['splashmsg'] = '';
|
||||
}
|
||||
return true;
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Get splash message of session
|
||||
*
|
||||
* @return array last splash message
|
||||
*/
|
||||
function getSplashMsg() { /* {{{ */
|
||||
return (array) $this->data['splashmsg'];
|
||||
} /* }}} */
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
class SeedDMS_Version {
|
||||
|
||||
var $_number = "4.2.2";
|
||||
var $_number = "4.3.0";
|
||||
var $_string = "SeedDMS";
|
||||
|
||||
function SeedDMS_Version() {
|
||||
|
|
|
@ -490,6 +490,8 @@ CREATE TABLE `tblSessions` (
|
|||
`theme` varchar(30) NOT NULL default '',
|
||||
`language` varchar(30) NOT NULL default '',
|
||||
`clipboard` text default '',
|
||||
`su` INTEGER DEFAULT NULL,
|
||||
`splashmsg` text default '',
|
||||
PRIMARY KEY (`id`),
|
||||
CONSTRAINT `tblSessions_user` FOREIGN KEY (`userID`) REFERENCES `tblUsers` (`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
|
|
@ -426,7 +426,9 @@ CREATE TABLE `tblSessions` (
|
|||
`lastAccess` INTEGER NOT NULL default '0',
|
||||
`theme` varchar(30) NOT NULL default '',
|
||||
`language` varchar(30) NOT NULL default '',
|
||||
`clipboard` text default ''
|
||||
`clipboard` text default '',
|
||||
`su` INTEGER DEFAULT NULL,
|
||||
`splashmsg` text default ''
|
||||
) ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
|
|
@ -116,7 +116,7 @@ function fileExistsInIncludePath($file) { /* {{{ */
|
|||
* Load default settings + set
|
||||
*/
|
||||
define("SEEDDMS_INSTALL", "on");
|
||||
define("SEEDDMS_VERSION", "4.2.2");
|
||||
define("SEEDDMS_VERSION", "4.3.0");
|
||||
|
||||
require_once('../inc/inc.ClassSettings.php');
|
||||
|
||||
|
|
8
install/update-4.3.0/update-sqlite3.sql
Normal file
8
install/update-4.3.0/update-sqlite3.sql
Normal file
|
@ -0,0 +1,8 @@
|
|||
BEGIN;
|
||||
|
||||
ALTER TABLE tblSessions ADD COLUMN `splashmsg` TEXT DEFAULT '';
|
||||
|
||||
UPDATE tblVersion set major=4, minor=3, subminor=0;
|
||||
|
||||
COMMIT;
|
||||
|
8
install/update-4.3.0/update.sql
Normal file
8
install/update-4.3.0/update.sql
Normal file
|
@ -0,0 +1,8 @@
|
|||
START TRANSACTION;
|
||||
|
||||
ALTER TABLE tblSessions ADD COLUMN `splashmsg` TEXT DEFAULT '';
|
||||
|
||||
UPDATE tblVersion set major=4, minor=3, subminor=0;
|
||||
|
||||
COMMIT;
|
||||
|
|
@ -779,6 +779,14 @@ $text = array(
|
|||
'sign_out' => "Sign out",
|
||||
'sign_out_user' => "Sign out user",
|
||||
'space_used_on_data_folder' => "Space used on data folder",
|
||||
'splash_added_to_clipboard' => "Added to clipboard",
|
||||
'splash_document_locked' => "Document locked",
|
||||
'splash_document_unlocked' => "Document unlocked",
|
||||
'splash_folder_edited' => "Save folder changes",
|
||||
'splash_invalid_folder_id' => "Invalid folder ID",
|
||||
'splash_removed_from_clipboard' => "Removed from clipboard",
|
||||
'splash_substituted_user' => "Substituted user",
|
||||
'splash_switched_back_user' => "Switched back to original user",
|
||||
'status_approval_rejected' => "Draft rejected",
|
||||
'status_approved' => "Approved",
|
||||
'status_approver_removed' => "Approver removed from process",
|
||||
|
|
|
@ -37,6 +37,8 @@ if (isset($_GET["id"]) && is_numeric($_GET["id"]) && isset($_GET['type'])) {
|
|||
}
|
||||
}
|
||||
|
||||
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_added_to_clipboard')));
|
||||
|
||||
/* FIXME: this does not work because the folder id is not passed */
|
||||
$folderid = $_GET['folderid'];
|
||||
header("Location:../out/out.ViewFolder.php?folderid=".$folderid);
|
||||
|
|
|
@ -170,6 +170,8 @@ if(strcasecmp($sequence, "keep")) {
|
|||
}
|
||||
}
|
||||
|
||||
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_folder_edited')));
|
||||
|
||||
add_log_line("?folderid=".$folderid);
|
||||
|
||||
header("Location:../out/out.ViewFolder.php?folderid=".$folderid."&showtree=".$_POST["showtree"]);
|
||||
|
|
|
@ -1,57 +1,59 @@
|
|||
<?php
|
||||
// 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.
|
||||
|
||||
include("../inc/inc.Settings.php");
|
||||
include("../inc/inc.LogInit.php");
|
||||
include("../inc/inc.Utils.php");
|
||||
<?php
|
||||
// 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.
|
||||
|
||||
include("../inc/inc.Settings.php");
|
||||
include("../inc/inc.LogInit.php");
|
||||
include("../inc/inc.Utils.php");
|
||||
include("../inc/inc.DBInit.php");
|
||||
include("../inc/inc.Language.php");
|
||||
include("../inc/inc.ClassUI.php");
|
||||
include("../inc/inc.Authentication.php");
|
||||
|
||||
if (!isset($_GET["documentid"]) || !is_numeric($_GET["documentid"]) || intval($_GET["documentid"])<1) {
|
||||
include("../inc/inc.Language.php");
|
||||
include("../inc/inc.ClassUI.php");
|
||||
include("../inc/inc.Authentication.php");
|
||||
|
||||
if (!isset($_GET["documentid"]) || !is_numeric($_GET["documentid"]) || intval($_GET["documentid"])<1) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id"));
|
||||
}
|
||||
|
||||
$documentid = $_GET["documentid"];
|
||||
|
||||
$documentid = $_GET["documentid"];
|
||||
$document = $dms->getDocument($documentid);
|
||||
|
||||
if (!is_object($document)) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id"));
|
||||
}
|
||||
|
||||
$folder = $document->getFolder();
|
||||
$docPathHTML = getFolderPathHTML($folder, true). " / <a href=\"../out/out.ViewDocument.php?documentid=".$documentid."\">".$document->getName()."</a>";
|
||||
|
||||
if ($document->getAccessMode($user) < M_READWRITE) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied"));
|
||||
}
|
||||
|
||||
if ($document->isLocked()) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("document_already_locked"));
|
||||
}
|
||||
|
||||
if (!$document->setLocked($user)) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured"));
|
||||
|
||||
if (!is_object($document)) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id"));
|
||||
}
|
||||
|
||||
add_log_line();
|
||||
$folder = $document->getFolder();
|
||||
$docPathHTML = getFolderPathHTML($folder, true). " / <a href=\"../out/out.ViewDocument.php?documentid=".$documentid."\">".$document->getName()."</a>";
|
||||
|
||||
if ($document->getAccessMode($user) < M_READWRITE) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied"));
|
||||
}
|
||||
|
||||
if ($document->isLocked()) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("document_already_locked"));
|
||||
}
|
||||
|
||||
if (!$document->setLocked($user)) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured"));
|
||||
}
|
||||
|
||||
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_document_locked')));
|
||||
|
||||
add_log_line();
|
||||
header("Location:../out/out.ViewDocument.php?documentid=".$documentid);
|
||||
|
||||
?>
|
||||
|
||||
?>
|
||||
|
|
|
@ -37,6 +37,8 @@ if (isset($_GET["id"]) && is_numeric($_GET["id"]) && isset($_GET['type'])) {
|
|||
}
|
||||
}
|
||||
|
||||
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_removed_from_clipboard')));
|
||||
|
||||
$folderid = $_GET['folderid'];
|
||||
header("Location:../out/out.ViewFolder.php?folderid=".$folderid);
|
||||
|
||||
|
|
|
@ -25,6 +25,8 @@ include("../inc/inc.Authentication.php");
|
|||
|
||||
$session->resetSu();
|
||||
|
||||
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_switched_back_user')));
|
||||
|
||||
add_log_line("");
|
||||
header("Location: ../".(isset($settings->_siteDefaultPage) && strlen($settings->_siteDefaultPage)>0 ? $settings->_siteDefaultPage : "out/out.ViewFolder.php?folderid=".$settings->_rootFolderID));
|
||||
|
||||
|
|
|
@ -33,6 +33,8 @@ if (!isset($_GET["userid"])) {
|
|||
|
||||
$session->setSu($_GET['userid']);
|
||||
|
||||
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_substituted_user')));
|
||||
|
||||
add_log_line("?userid=".$_GET["userid"]);
|
||||
header("Location: ../".(isset($settings->_siteDefaultPage) && strlen($settings->_siteDefaultPage)>0 ? $settings->_siteDefaultPage : "out/out.ViewFolder.php?folderid=".$settings->_rootFolderID));
|
||||
|
||||
|
|
|
@ -1,62 +1,65 @@
|
|||
<?php
|
||||
// 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.
|
||||
|
||||
include("../inc/inc.Settings.php");
|
||||
include("../inc/inc.LogInit.php");
|
||||
include("../inc/inc.Utils.php");
|
||||
<?php
|
||||
// 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.
|
||||
|
||||
include("../inc/inc.Settings.php");
|
||||
include("../inc/inc.LogInit.php");
|
||||
include("../inc/inc.Utils.php");
|
||||
include("../inc/inc.DBInit.php");
|
||||
include("../inc/inc.Language.php");
|
||||
include("../inc/inc.ClassUI.php");
|
||||
include("../inc/inc.Authentication.php");
|
||||
|
||||
if (!isset($_GET["documentid"]) || !is_numeric($_GET["documentid"]) || intval($_GET["documentid"])<1) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id"));
|
||||
}
|
||||
$documentid = $_GET["documentid"];
|
||||
$document = $dms->getDocument($documentid);
|
||||
|
||||
if (!is_object($document)) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id"));
|
||||
}
|
||||
|
||||
$folder = $document->getFolder();
|
||||
$docPathHTML = getFolderPathHTML($folder, true). " / <a href=\"../out/out.ViewDocument.php?documentid=".$documentid."\">".$document->getName()."</a>";
|
||||
|
||||
if ($document->getAccessMode($user) < M_READWRITE) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied"));
|
||||
}
|
||||
|
||||
if (!$document->isLocked()) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("document_is_not_locked"));
|
||||
include("../inc/inc.Language.php");
|
||||
include("../inc/inc.ClassUI.php");
|
||||
include("../inc/inc.Authentication.php");
|
||||
|
||||
if (!isset($_GET["documentid"]) || !is_numeric($_GET["documentid"]) || intval($_GET["documentid"])<1) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id"));
|
||||
}
|
||||
|
||||
$documentid = $_GET["documentid"];
|
||||
$document = $dms->getDocument($documentid);
|
||||
|
||||
if (!is_object($document)) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id"));
|
||||
}
|
||||
|
||||
$folder = $document->getFolder();
|
||||
$docPathHTML = getFolderPathHTML($folder, true). " / <a href=\"../out/out.ViewDocument.php?documentid=".$documentid."\">".$document->getName()."</a>";
|
||||
|
||||
if ($document->getAccessMode($user) < M_READWRITE) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied"));
|
||||
}
|
||||
|
||||
if (!$document->isLocked()) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("document_is_not_locked"));
|
||||
}
|
||||
|
||||
$lockingUser = $document->getLockingUser();
|
||||
|
||||
if (($lockingUser->getID() == $user->getID()) || ($document->getAccessMode($user) == M_ALL)) {
|
||||
if (!$document->setLocked(false)) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured"));
|
||||
}
|
||||
}
|
||||
|
||||
if (($lockingUser->getID() == $user->getID()) || ($document->getAccessMode($user) == M_ALL)) {
|
||||
if (!$document->setLocked(false)) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured"));
|
||||
}
|
||||
}
|
||||
else {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied"));
|
||||
}
|
||||
add_log_line();
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied"));
|
||||
}
|
||||
|
||||
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_document_unlocked')));
|
||||
|
||||
add_log_line();
|
||||
header("Location:../out/out.ViewDocument.php?documentid=".$documentid);
|
||||
|
||||
?>
|
||||
|
||||
?>
|
||||
|
|
|
@ -46,11 +46,30 @@ class SeedDMS_Bootstrap_Style extends SeedDMS_View_Common {
|
|||
echo $this->extraheader;
|
||||
echo '<script type="text/javascript" src="../styles/bootstrap/jquery/jquery.min.js"></script>'."\n";
|
||||
echo '<script type="text/javascript" src="../js/jquery.passwordstrength.js"></script>'."\n";
|
||||
echo '<script type="text/javascript" src="../styles/bootstrap/noty/js/noty/jquery.noty.js"></script>'."\n";
|
||||
echo '<script type="text/javascript" src="../styles/bootstrap/noty/js/noty/layouts/topRight.js"></script>'."\n";
|
||||
echo '<script type="text/javascript" src="../styles/bootstrap/noty/js/noty/themes/default.js"></script>'."\n";
|
||||
|
||||
echo '<link rel="shortcut icon" href="../styles/'.$this->theme.'/favicon.ico" type="image/x-icon"/>'."\n";
|
||||
echo "<title>".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "SeedDMS").(strlen($title)>0 ? ": " : "").htmlspecialchars($title)."</title>\n";
|
||||
echo "</head>\n";
|
||||
echo "<body".(strlen($bodyClass)>0 ? " class=\"".$bodyClass."\"" : "").">\n";
|
||||
if($flashmsg = $this->params['session']->getSplashMsg()) {
|
||||
$this->params['session']->clearSplashMsg();
|
||||
?>
|
||||
<script>
|
||||
noty({
|
||||
text: '<?= $flashmsg['msg'] ?>',
|
||||
type: '<?= $flashmsg['type'] ?>',
|
||||
dismissQueue: true,
|
||||
layout: 'topRight',
|
||||
theme: 'defaultTheme',
|
||||
timeout: 1500,
|
||||
_template: '<div class="noty_message alert alert-block alert-error"><span class="noty_text"></span><div class="noty_close"></div></div>'
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
} /* }}} */
|
||||
|
||||
function htmlAddHeader($head) { /* {{{ */
|
||||
|
|
|
@ -220,11 +220,29 @@ class SeedDMS_View_ViewFolder extends SeedDMS_Bootstrap_Style {
|
|||
print "</small></td>";
|
||||
print "<td></td>";
|
||||
print "<td>";
|
||||
print "<div class=\"list-action\">";
|
||||
if($subFolder->getAccessMode($user) >= M_ALL) {
|
||||
?>
|
||||
<div class="list-action"><a class_="btn btn-mini" href="../out/out.RemoveFolder.php?folderid=<?php echo $subFolder->getID(); ?>"><i class="icon-remove"></i></a>
|
||||
<a class_="btn btn-mini" href="../out/out.EditFolder.php?folderid=<?php echo $subFolder->getID(); ?>"><i class="icon-edit"></i></a>
|
||||
<a class_="btn btn-mini" href="../op/op.AddToClipboard.php?folderid=<?php echo $folder->getID(); ?>&type=folder&id=<?php echo $subFolder->getID(); ?>" title="<?php printMLText("add_to_clipboard");?>"><i class="icon-copy"></i></a></div>
|
||||
<a class_="btn btn-mini" href="../out/out.RemoveFolder.php?folderid=<?php echo $subFolder->getID(); ?>"><i class="icon-remove"></i></a>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<span style="padding: 2px; color: #CCC;"><i class="icon-remove"></i></span>
|
||||
<?php
|
||||
}
|
||||
if($subFolder->getAccessMode($user) >= M_READWRITE) {
|
||||
?>
|
||||
<a class_="btn btn-mini" href="../out/out.EditFolder.php?folderid=<?php echo $subFolder->getID(); ?>"><i class="icon-edit"></i></a>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<span style="padding: 2px; color: #CCC;"><i class="icon-edit"></i></span>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<a class_="btn btn-mini" href="../op/op.AddToClipboard.php?folderid=<?php echo $folder->getID(); ?>&type=folder&id=<?php echo $subFolder->getID(); ?>" title="<?php printMLText("add_to_clipboard");?>"><i class="icon-copy"></i></a>
|
||||
<?php
|
||||
print "</div>";
|
||||
print "</td>";
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
@ -292,11 +310,29 @@ class SeedDMS_View_ViewFolder extends SeedDMS_Bootstrap_Style {
|
|||
print getOverallStatusText($status["status"])."</small></td>";
|
||||
print "<td>".$version."</td>";
|
||||
print "<td>";
|
||||
print "<div class=\"list-action\">";
|
||||
if($document->getAccessMode($user) >= M_ALL) {
|
||||
?>
|
||||
<div class="list-action"><a class_="btn btn-mini" href="../out/out.RemoveDocument.php?documentid=<?php echo $docID; ?>"><i class="icon-remove"></i></a>
|
||||
<a class_="btn btn-mini" href="../out/out.EditDocument.php?documentid=<?php echo $docID; ?>"><i class="icon-edit"></i></a>
|
||||
<a class_="btn btn-mini" href="../op/op.AddToClipboard.php?folderid=<?php echo $folder->getID(); ?>&type=document&id=<?php echo $docID; ?>" title="<?php printMLText("add_to_clipboard");?>"><i class="icon-copy"></i></a></div>
|
||||
<a class_="btn btn-mini" href="../out/out.RemoveDocument.php?documentid=<?php echo $docID; ?>"><i class="icon-remove"></i></a>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<span style="padding: 2px; color: #CCC;"><i class="icon-remove"></i></span>
|
||||
<?php
|
||||
}
|
||||
if($document->getAccessMode($user) >= M_READWRITE) {
|
||||
?>
|
||||
<a class_="btn btn-mini" href="../out/out.EditDocument.php?documentid=<?php echo $docID; ?>"><i class="icon-edit"></i></a>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<span style="padding: 2px; color: #CCC;"><i class="icon-edit"></i></span>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<a class_="btn btn-mini" href="../op/op.AddToClipboard.php?folderid=<?php echo $folder->getID(); ?>&type=document&id=<?php echo $docID; ?>" title="<?php printMLText("add_to_clipboard");?>"><i class="icon-copy"></i></a>
|
||||
<?php
|
||||
print "</div>";
|
||||
print "</td>";
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user