mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +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
|
||||
--------------------------------------------------------------------------------
|
||||
- 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
|
||||
|
|
|
@ -285,15 +285,15 @@ class SeedDMS_AccessOperation {
|
|||
/**
|
||||
* Check if document content may be reviewed
|
||||
*
|
||||
* Reviewing a document content is only allowed if the document was not
|
||||
* obsoleted. There are other requirements which are not taken into
|
||||
* Reviewing a document content is only allowed if the document is in
|
||||
* review. There are other requirements which are not taken into
|
||||
* account here.
|
||||
*/
|
||||
function mayReview($document) { /* {{{ */
|
||||
if(get_class($document) == $this->dms->getClassname('document')) {
|
||||
if($latestContent = $document->getLatestContent()) {
|
||||
$status = $latestContent->getStatus();
|
||||
if ($status["status"]!=S_OBSOLETE) {
|
||||
if ($status["status"]==S_DRAFT_REV) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -334,8 +334,9 @@ class SeedDMS_AccessOperation {
|
|||
/**
|
||||
* Check if document content may be approved
|
||||
*
|
||||
* Approving a document content is only allowed if the document was not
|
||||
* obsoleted and the document is not in review status.
|
||||
* Approving a document content is only allowed if the document is either
|
||||
* in approval status or released. In the second case the approval can be
|
||||
* edited.
|
||||
* There are other requirements which are not taken into
|
||||
* account here.
|
||||
*/
|
||||
|
@ -343,7 +344,7 @@ class SeedDMS_AccessOperation {
|
|||
if(get_class($document) == $this->dms->getClassname('document')) {
|
||||
if($latestContent = $document->getLatestContent()) {
|
||||
$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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,16 +31,16 @@ if (!$user->isAdmin()) {
|
|||
}
|
||||
|
||||
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"]));
|
||||
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()) {
|
||||
UI::exitError(getMLText("rm_user"),getMLText("cannot_delete_yourself"));
|
||||
UI::exitError(getMLText("transfer_objects"),getMLText("cannot_delete_yourself"));
|
||||
}
|
||||
|
||||
$allusers = $dms->getAllUsers($settings->_sortUsersInList);
|
||||
|
|
|
@ -699,7 +699,7 @@ function uploadDocumentFile($documentId) { /* {{{ */
|
|||
return;
|
||||
}
|
||||
|
||||
if(!ctype_digit($document) || $documentId == 0) {
|
||||
if(!ctype_digit($documentId) || $documentId == 0) {
|
||||
$app->response()->header('Content-Type', 'application/json');
|
||||
echo json_encode(array('success'=>true, 'message'=>'id is 0', 'data'=>''));
|
||||
return;
|
||||
|
|
|
@ -799,14 +799,16 @@ if(!is_writeable($settings->_configFilePath)) {
|
|||
?>
|
||||
<tr><td><b><?php printMLText($target."_converters");?></b></td></tr>
|
||||
<?php
|
||||
foreach($settings->_converters[$target] as $mimetype=>$cmd) {
|
||||
if(!empty($settings->_converters[$target])) {
|
||||
foreach($settings->_converters[$target] as $mimetype=>$cmd) {
|
||||
?>
|
||||
<tr title="<?php echo $mimetype;?>">
|
||||
<td><?php echo $mimetype;?>:</td>
|
||||
<td><?php $this->showTextField("converters[".$target."][".$mimetype."]", htmlspecialchars($cmd)); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<tr title="">
|
||||
<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>
|
||||
<?php
|
||||
break;
|
||||
case 'video/webm':
|
||||
case 'video/mp4':
|
||||
$this->contentHeading(getMLText("preview"));
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue
Block a user