mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-09 21:16:07 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
b51b3bb9f3
|
@ -55,6 +55,9 @@
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
Changes in version 5.1.6
|
Changes in version 5.1.6
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
- fix wrong check in restapi (part of #373)
|
||||||
|
- mayApprove() and mayReview() require the status to be S_DRAFT_APP resp. S_DRAFT_REV
|
||||||
|
- add preview for webm videos (Closes #374)
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
Changes in version 5.1.5
|
Changes in version 5.1.5
|
||||||
|
|
|
@ -285,15 +285,15 @@ class SeedDMS_AccessOperation {
|
||||||
/**
|
/**
|
||||||
* Check if document content may be reviewed
|
* Check if document content may be reviewed
|
||||||
*
|
*
|
||||||
* Reviewing a document content is only allowed if the document was not
|
* Reviewing a document content is only allowed if the document is in
|
||||||
* obsoleted. There are other requirements which are not taken into
|
* review. There are other requirements which are not taken into
|
||||||
* account here.
|
* account here.
|
||||||
*/
|
*/
|
||||||
function mayReview($document) { /* {{{ */
|
function mayReview($document) { /* {{{ */
|
||||||
if(get_class($document) == $this->dms->getClassname('document')) {
|
if(get_class($document) == $this->dms->getClassname('document')) {
|
||||||
if($latestContent = $document->getLatestContent()) {
|
if($latestContent = $document->getLatestContent()) {
|
||||||
$status = $latestContent->getStatus();
|
$status = $latestContent->getStatus();
|
||||||
if ($status["status"]!=S_OBSOLETE) {
|
if ($status["status"]==S_DRAFT_REV) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -334,8 +334,9 @@ class SeedDMS_AccessOperation {
|
||||||
/**
|
/**
|
||||||
* Check if document content may be approved
|
* Check if document content may be approved
|
||||||
*
|
*
|
||||||
* Approving a document content is only allowed if the document was not
|
* Approving a document content is only allowed if the document is either
|
||||||
* obsoleted and the document is not in review status.
|
* in approval status or released. In the second case the approval can be
|
||||||
|
* edited.
|
||||||
* There are other requirements which are not taken into
|
* There are other requirements which are not taken into
|
||||||
* account here.
|
* account here.
|
||||||
*/
|
*/
|
||||||
|
@ -343,7 +344,7 @@ class SeedDMS_AccessOperation {
|
||||||
if(get_class($document) == $this->dms->getClassname('document')) {
|
if(get_class($document) == $this->dms->getClassname('document')) {
|
||||||
if($latestContent = $document->getLatestContent()) {
|
if($latestContent = $document->getLatestContent()) {
|
||||||
$status = $latestContent->getStatus();
|
$status = $latestContent->getStatus();
|
||||||
if ($status["status"]!=S_OBSOLETE && $status["status"]!=S_DRAFT_REV && $status["status"]!=S_REJECTED) {
|
if ($status["status"]==S_DRAFT_APP) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,16 +31,16 @@ if (!$user->isAdmin()) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($_GET["userid"]) || !is_numeric($_GET["userid"]) || intval($_GET["userid"])<1) {
|
if (!isset($_GET["userid"]) || !is_numeric($_GET["userid"]) || intval($_GET["userid"])<1) {
|
||||||
UI::exitError(getMLText("rm_user"),getMLText("invalid_user_id"));
|
UI::exitError(getMLText("transfer_objects"),getMLText("invalid_user_id"));
|
||||||
}
|
}
|
||||||
|
|
||||||
$rmuser = $dms->getUser(intval($_GET["userid"]));
|
$rmuser = $dms->getUser(intval($_GET["userid"]));
|
||||||
if (!is_object($rmuser)) {
|
if (!is_object($rmuser)) {
|
||||||
UI::exitError(getMLText("rm_user"),getMLText("invalid_user_id"));
|
UI::exitError(getMLText("transfer_objects"),getMLText("invalid_user_id"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($rmuser->getID()==$user->getID()) {
|
if ($rmuser->getID()==$user->getID()) {
|
||||||
UI::exitError(getMLText("rm_user"),getMLText("cannot_delete_yourself"));
|
UI::exitError(getMLText("transfer_objects"),getMLText("cannot_delete_yourself"));
|
||||||
}
|
}
|
||||||
|
|
||||||
$allusers = $dms->getAllUsers($settings->_sortUsersInList);
|
$allusers = $dms->getAllUsers($settings->_sortUsersInList);
|
||||||
|
|
|
@ -699,7 +699,7 @@ function uploadDocumentFile($documentId) { /* {{{ */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!ctype_digit($document) || $documentId == 0) {
|
if(!ctype_digit($documentId) || $documentId == 0) {
|
||||||
$app->response()->header('Content-Type', 'application/json');
|
$app->response()->header('Content-Type', 'application/json');
|
||||||
echo json_encode(array('success'=>true, 'message'=>'id is 0', 'data'=>''));
|
echo json_encode(array('success'=>true, 'message'=>'id is 0', 'data'=>''));
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -799,6 +799,7 @@ if(!is_writeable($settings->_configFilePath)) {
|
||||||
?>
|
?>
|
||||||
<tr><td><b><?php printMLText($target."_converters");?></b></td></tr>
|
<tr><td><b><?php printMLText($target."_converters");?></b></td></tr>
|
||||||
<?php
|
<?php
|
||||||
|
if(!empty($settings->_converters[$target])) {
|
||||||
foreach($settings->_converters[$target] as $mimetype=>$cmd) {
|
foreach($settings->_converters[$target] as $mimetype=>$cmd) {
|
||||||
?>
|
?>
|
||||||
<tr title="<?php echo $mimetype;?>">
|
<tr title="<?php echo $mimetype;?>">
|
||||||
|
@ -807,6 +808,7 @@ if(!is_writeable($settings->_configFilePath)) {
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
<tr title="">
|
<tr title="">
|
||||||
<td><?php $this->showTextField("converters[".$target."][newmimetype]", "", '', getMLText('converter_new_mimetype')); ?>:</td>
|
<td><?php $this->showTextField("converters[".$target."][newmimetype]", "", '', getMLText('converter_new_mimetype')); ?>:</td>
|
||||||
|
|
|
@ -371,6 +371,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
||||||
</audio>
|
</audio>
|
||||||
<?php
|
<?php
|
||||||
break;
|
break;
|
||||||
|
case 'video/webm':
|
||||||
case 'video/mp4':
|
case 'video/mp4':
|
||||||
$this->contentHeading(getMLText("preview"));
|
$this->contentHeading(getMLText("preview"));
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user