mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-01 06:27:15 +00:00
Merge branch 'develop' into hooks
This commit is contained in:
commit
df35579ea6
|
@ -9,6 +9,13 @@
|
|||
- maximum execution time of php scripts can be set in the settings
|
||||
is now actually used.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Changes in version 4.2.2
|
||||
--------------------------------------------------------------------------------
|
||||
- admin can be set as reviewer/approver again and do the review/approval
|
||||
- fixed minor layout problem in folder tree (Bug #51)
|
||||
- close folder choose dialog when folder is selected (Bug #52)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Changes in version 4.2.1
|
||||
--------------------------------------------------------------------------------
|
||||
|
|
2
Makefile
2
Makefile
|
@ -1,4 +1,4 @@
|
|||
VERSION=4.2.1
|
||||
VERSION=4.2.2
|
||||
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.1';
|
||||
$this->version = '4.2.2';
|
||||
} /* }}} */
|
||||
|
||||
function getDB() { /* {{{ */
|
||||
|
|
|
@ -1208,7 +1208,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
|||
if (isset($approvers[$i])) {
|
||||
foreach ($approvers[$i] as $approverID) {
|
||||
$approver=($i=="i" ? $this->_dms->getUser($approverID) : $this->_dms->getGroup($approverID));
|
||||
$res=($i=="i" ? $docResultSet->getContent()->addIndApprover($approver, $user, !$pendingReview) : $docResultSet->getContent()->addGrpApprover($approver, $user, !$pendingReview));
|
||||
$res=($i=="i" ? $docResultSet->getContent()->addIndApprover($approver, $user, true) : $docResultSet->getContent()->addGrpApprover($approver, $user, !$pendingReview));
|
||||
$docResultSet->addApprover($approver, $i, $res);
|
||||
if ($res==0 || $res=-3 || $res=-4) {
|
||||
$pendingApproval=true;
|
||||
|
@ -2378,14 +2378,18 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
return $this->_approvalStatus;
|
||||
} /* }}} */
|
||||
|
||||
function addIndReviewer($user, $requestUser) { /* {{{ */
|
||||
function addIndReviewer($user, $requestUser, $listadmin=false) { /* {{{ */
|
||||
$db = $this->_document->_dms->getDB();
|
||||
|
||||
$userID = $user->getID();
|
||||
|
||||
// Get the list of users and groups with read access to this document.
|
||||
if($this->_document->getAccessMode($user) < M_READ) {
|
||||
return -2;
|
||||
}
|
||||
/*
|
||||
if (!isset($this->_readAccessList)) {
|
||||
$this->_readAccessList = $this->_document->getReadAccessList();
|
||||
$this->_readAccessList = $this->_document->getReadAccessList($listadmin);
|
||||
}
|
||||
$approved = false;
|
||||
foreach ($this->_readAccessList["users"] as $appUser) {
|
||||
|
@ -2397,6 +2401,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
if (!$approved) {
|
||||
return -2;
|
||||
}
|
||||
*/
|
||||
|
||||
// Check to see if the user has already been added to the review list.
|
||||
$reviewStatus = $user->getReviewStatus($this->_document->getID(), $this->_version);
|
||||
|
@ -2603,18 +2608,19 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
}
|
||||
} /* }}} */
|
||||
|
||||
function addIndApprover($user, $requestUser) { /* {{{ */
|
||||
function addIndApprover($user, $requestUser, $listadmin=false) { /* {{{ */
|
||||
$db = $this->_document->_dms->getDB();
|
||||
|
||||
$userID = $user->getID();
|
||||
|
||||
// Get the list of users and groups with read access to this document.
|
||||
if (!isset($this->_readAccessList)) {
|
||||
// TODO: error checking.
|
||||
$this->_readAccessList = $this->_document->getReadAccessList();
|
||||
if($this->_document->getAccessMode($user) < M_READ) {
|
||||
return -2;
|
||||
}
|
||||
/*
|
||||
$readAccessList = $this->_document->getReadAccessList($listadmin);
|
||||
$approved = false;
|
||||
foreach ($this->_readAccessList["users"] as $appUser) {
|
||||
foreach ($readAccessList["users"] as $appUser) {
|
||||
if ($userID == $appUser->getID()) {
|
||||
$approved = true;
|
||||
break;
|
||||
|
@ -2623,6 +2629,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
if (!$approved) {
|
||||
return -2;
|
||||
}
|
||||
*/
|
||||
|
||||
// Check to see if the user has already been added to the approvers list.
|
||||
$approvalStatus = $user->getApprovalStatus($this->_document->getID(), $this->_version);
|
||||
|
|
|
@ -12,10 +12,10 @@
|
|||
<email>uwe@steinmann.cx</email>
|
||||
<active>yes</active>
|
||||
</lead>
|
||||
<date>2013-04-30</date>
|
||||
<time>07:43:29</time>
|
||||
<date>2013-05-17</date>
|
||||
<time>09:21:37</time>
|
||||
<version>
|
||||
<release>4.2.1</release>
|
||||
<release>4.2.2</release>
|
||||
<api>4.2.1</api>
|
||||
</version>
|
||||
<stability>
|
||||
|
@ -24,7 +24,7 @@
|
|||
</stability>
|
||||
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
||||
<notes>
|
||||
- fixed bug in SeedDMS_Core_DocumentContent::addIndApp()
|
||||
- admins can be added as reviewer/approver again
|
||||
</notes>
|
||||
<contents>
|
||||
<dir baseinstalldir="SeedDMS" name="/">
|
||||
|
@ -510,6 +510,22 @@ New release
|
|||
</stability>
|
||||
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
||||
<notes>
|
||||
- fixed bug in SeedDMS_Core_DocumentContent::addIndApp()
|
||||
</notes>
|
||||
</release>
|
||||
<release>
|
||||
<date>2013-04-30</date>
|
||||
<time>07:43:29</time>
|
||||
<version>
|
||||
<release>4.2.1</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>
|
||||
- fixed bug in SeedDMS_Core_DocumentContent::addIndApp()
|
||||
</notes>
|
||||
</release>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
class SeedDMS_Version {
|
||||
|
||||
var $_number = "4.2.1";
|
||||
var $_number = "4.2.2";
|
||||
var $_string = "SeedDMS";
|
||||
|
||||
function SeedDMS_Version() {
|
||||
|
|
|
@ -116,7 +116,7 @@ function fileExistsInIncludePath($file) { /* {{{ */
|
|||
* Load default settings + set
|
||||
*/
|
||||
define("SEEDDMS_INSTALL", "on");
|
||||
define("SEEDDMS_VERSION", "4.2.1");
|
||||
define("SEEDDMS_VERSION", "4.2.2");
|
||||
|
||||
require_once('../inc/inc.ClassSettings.php');
|
||||
|
||||
|
|
|
@ -35,6 +35,10 @@ ul.actions li a.btn > i {
|
|||
font-size: 200%;
|
||||
}
|
||||
|
||||
ul.tree, ul.tree ul {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.nav-tabs > li {
|
||||
float:none;
|
||||
|
|
|
@ -705,25 +705,17 @@ class SeedDMS_Bootstrap_Style extends SeedDMS_View_Common {
|
|||
} /* }}} */
|
||||
|
||||
function printFolderChooser($formName, $accessMode, $exclude = -1, $default = false) { /* {{{ */
|
||||
?>
|
||||
<script language="JavaScript">
|
||||
var openDlg;
|
||||
function chooseFolder<?php print $formName ?>() {
|
||||
openDlg = open("out.FolderChooser.php?form=<?php echo $formName?>&mode=<?php echo $accessMode?>&exclude=<?php echo $exclude?>", "openDlg", "width=480,height=480,scrollbars=yes,resizable=yes,status=yes");
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
print "<input type=\"hidden\" id=\"targetid".$formName."\" name=\"targetid".$formName."\" value=\"". (($default) ? $default->getID() : "") ."\">";
|
||||
print "<div class=\"input-append\">\n";
|
||||
print "<input type=\"text\" id=\"choosefoldersearch\" data-provide=\"typeahead\" name=\"targetname".$formName."\" value=\"". (($default) ? htmlspecialchars($default->getName()) : "") ."\" placeholder=\"".getMLText('type_to_search')."\" autocomplete=\"off\" />";
|
||||
// print "<button type=\"button\" class=\"btn\" onclick=\"chooseFolder".$formName."(); return false;\">".getMLText("folder")."...</button>";
|
||||
print "<a data-target=\"#folderChooser\" href=\"out.FolderChooser.php?form=".$formName."&mode=".$accessMode."&exclude=".$exclude."\" role=\"button\" class=\"btn\" data-toggle=\"modal\">".getMLText("folder")."…</a>\n";
|
||||
print "<a data-target=\"#folderChooser".$formName."\" href=\"out.FolderChooser.php?form=".$formName."&mode=".$accessMode."&exclude=".$exclude."\" role=\"button\" class=\"btn\" data-toggle=\"modal\">".getMLText("folder")."…</a>\n";
|
||||
print "</div>\n";
|
||||
?>
|
||||
<div class="modal hide" id="folderChooser" tabindex="-1" role="dialog" aria-labelledby="folderChooserLabel" aria-hidden="true">
|
||||
<div class="modal hide" id="folderChooser<?= $formName ?>" tabindex="-1" role="dialog" aria-labelledby="folderChooser<?= $formName ?>Label" aria-hidden="true">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3 id="folderChooserLabel"><?php printMLText("choose_target_folder") ?></h3>
|
||||
<h3 id="folderChooser<?= $formName ?>Label"><?php printMLText("choose_target_folder") ?></h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Please wait, until document tree is loaded …</p>
|
||||
|
@ -732,6 +724,13 @@ class SeedDMS_Bootstrap_Style extends SeedDMS_View_Common {
|
|||
<button class="btn btn-primary" data-dismiss="modal" aria-hidden="true"><?php printMLText("close") ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<script language="JavaScript">
|
||||
/* Set up a callback which is called when a folder in the tree is selected */
|
||||
modalFolderChooser<?= $formName ?> = $('#folderChooser<?= $formName ?>');
|
||||
function folderSelectedCallback<?= $formName ?>(id, name) {
|
||||
modalFolderChooser<?= $formName ?>.modal('hide');
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
} /* }}} */
|
||||
|
||||
|
@ -967,8 +966,9 @@ class SeedDMS_Bootstrap_Style extends SeedDMS_View_Common {
|
|||
}
|
||||
if ($folder->getAccessMode($this->params['user']) >= $accessMode) {
|
||||
|
||||
if ($is_open) print "<i class=\"icon-folder-open\" name=\"treeimg".$folderID."\"></i><span style=\"padding-left:5px\" >";
|
||||
else print "<i class=\"icon-folder-close\" name=\"treeimg".$folderID."\"></i><span style=\"padding-left:5px\" >";
|
||||
if ($is_open) print "<i class=\"icon-folder-open\" name=\"treeimg".$folderID."\"></i>";
|
||||
else print "<i class=\"icon-folder-close\" name=\"treeimg".$folderID."\"></i>";
|
||||
// print "<span style=\"padding-left:5px\" >";
|
||||
|
||||
if ($folderID != $currentFolderID){
|
||||
|
||||
|
|
|
@ -52,23 +52,20 @@ function toggleTree(id){
|
|||
|
||||
var targetName;
|
||||
var targetID;
|
||||
|
||||
function folderSelected(id, name) {
|
||||
targetName.value = name;
|
||||
targetID.value = id;
|
||||
// window.close();
|
||||
// return true;
|
||||
if(typeof(folderSelectedCallback<?= $form ?>) !== 'undefined')
|
||||
folderSelectedCallback<?= $form ?>(id, name);
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<?php
|
||||
$this->contentContainerStart();
|
||||
$this->printFoldersTree($mode, $exclude, $rootfolderid);
|
||||
$this->contentContainerEnd();
|
||||
?>
|
||||
|
||||
|
||||
<script language="JavaScript">
|
||||
targetName = document.<?php echo $form?>.targetname<?php print $form ?>;
|
||||
targetID = document.<?php echo $form?>.targetid<?php print $form ?>;
|
||||
|
|
|
@ -407,11 +407,11 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
if($user->isAdmin()) {
|
||||
$this->contentHeading(getMLText("status"));
|
||||
$this->contentContainerStart();
|
||||
$status = $latestContent->getStatusLog();
|
||||
$statuslog = $latestContent->getStatusLog();
|
||||
echo "<table class=\"table table-condensed\"><thead>";
|
||||
echo "<th>".getMLText('date')."</th><th>".getMLText('status')."</th><th>".getMLText('user')."</th><th>".getMLText('comment')."</th></tr>\n";
|
||||
echo "</thead><tbody>";
|
||||
foreach($status as $entry) {
|
||||
foreach($statuslog as $entry) {
|
||||
if($suser = $dms->getUser($entry['userID']))
|
||||
$fullname = $suser->getFullName();
|
||||
else
|
||||
|
@ -458,7 +458,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
print "<tr><td colspan=5>\n";
|
||||
$this->contentSubHeading(getMLText("reviewers"));
|
||||
print "</tr>";
|
||||
|
||||
|
||||
print "<tr>\n";
|
||||
print "<td width='20%'><b>".getMLText("name")."</b></td>\n";
|
||||
print "<td width='20%'><b>".getMLText("last_update")."</b></td>\n";
|
||||
|
@ -511,7 +511,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
print "<li><a href=\"../out/out.ReviewDocument.php?documentid=".$documentid."&version=".$latestContent->getVersion()."&reviewid=".$r['reviewID']."\" class=\"btn btn-mini\">".getMLText("edit")."</a></li>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
print "</ul></td>\n";
|
||||
print "</td>\n</tr>\n";
|
||||
}
|
||||
|
@ -567,7 +567,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
print "<td>".htmlspecialchars($a["comment"])."</td>\n";
|
||||
print "<td>".getApprovalStatusText($a["status"])."</td>\n";
|
||||
print "<td><ul class=\"unstyled\">";
|
||||
|
||||
|
||||
if($accessop->mayApprove()) {
|
||||
if ($is_approver && $status["status"]==S_DRAFT_APP) {
|
||||
print "<li><a class=\"btn btn-mini\" href=\"../out/out.ApproveDocument.php?documentid=".$documentid."&version=".$latestContent->getVersion()."&approveid=".$a['approveID']."\">".getMLText("submit_approval")."</a></li>";
|
||||
|
@ -575,7 +575,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
print "<li><a class=\"btn btn-mini\" href=\"../out/out.ApproveDocument.php?documentid=".$documentid."&version=".$latestContent->getVersion()."&approveid=".$a['approveID']."\">".getMLText("edit")."</a></li>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
print "</ul>";
|
||||
print "</td>\n";
|
||||
print "</td>\n</tr>\n";
|
||||
|
@ -788,10 +788,10 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
$vstat = $version->getStatus();
|
||||
$workflow = $version->getWorkflow();
|
||||
$workflowstate = $version->getWorkflowState();
|
||||
|
||||
|
||||
// verify if file exists
|
||||
$file_exists=file_exists($dms->contentDir . $version->getPath());
|
||||
|
||||
|
||||
print "<tr>\n";
|
||||
print "<td nowrap>";
|
||||
/*
|
||||
|
@ -801,7 +801,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
if ($viewonlinefiletypes && in_array(strtolower($version->getFileType()), $viewonlinefiletypes))
|
||||
print "<li><a target=\"_blank\" href=\"../op/op.ViewOnline.php?documentid=".$documentid."&version=".$version->getVersion()."\"><i class=\"icon-star\"></i>" . getMLText("view_online") . "</a>";
|
||||
}else print "<li><img class=\"mimeicon\" src=\"".$this->getMimeIcon($version->getFileType())."\" title=\"".htmlspecialchars($version->getMimeType())."\">";
|
||||
|
||||
|
||||
print "</ul>";
|
||||
*/
|
||||
if ($viewonlinefiletypes && in_array(strtolower($version->getFileType()), $viewonlinefiletypes))
|
||||
|
@ -886,7 +886,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
foreach($files as $file) {
|
||||
|
||||
$file_exists=file_exists($dms->contentDir . $file->getPath());
|
||||
|
||||
|
||||
$responsibleUser = $file->getUser();
|
||||
|
||||
print "<tr>";
|
||||
|
|
Loading…
Reference in New Issue
Block a user