Die Sperrung wurde von [username] eingerichtet.
",
'update_reviewers' => "Liste der Prüfer aktualisieren",
-'update' => "aktualisieren",
+'update' => "Aktualisieren",
'uploaded_by' => "Hochgeladen durch",
'uploading_failed' => "Das Hochladen einer Datei ist fehlgeschlagen. Bitte überprüfen Sie die maximale Dateigröße für Uploads.",
'uploading_zerosize' => "Versuch eine leere Datei hochzuladen. Vorgang wird abgebrochen.",
diff --git a/op/op.AddDocument.php b/op/op.AddDocument.php
index 2e3517e1d..fbe743974 100644
--- a/op/op.AddDocument.php
+++ b/op/op.AddDocument.php
@@ -76,7 +76,15 @@ if (!is_numeric($sequence)) {
UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("invalid_sequence"));
}
-$expires = (isset($_POST["expires"]) && $_POST["expires"] == "true") ? mktime(0,0,0, intval($_POST["expmonth"]), intval($_POST["expday"]), intval($_POST["expyear"])) : false;
+$expires = false;
+if (!isset($_POST['expires']) || $_POST["expires"] != "false") {
+ if($_POST["expdate"]) {
+ $tmp = explode('-', $_POST["expdate"]);
+ $expires = mktime(0,0,0, $tmp[1], $tmp[0], $tmp[2]);
+ } else {
+ $expires = mktime(0,0,0, $_POST["expmonth"], $_POST["expday"], $_POST["expyear"]);
+ }
+}
// Get the list of reviewers and approvers for this document.
$reviewers = array();
diff --git a/op/op.EditDocument.php b/op/op.EditDocument.php
index fb961229c..aee70d04c 100644
--- a/op/op.EditDocument.php
+++ b/op/op.EditDocument.php
@@ -161,6 +161,41 @@ if (($oldcomment = $document->getComment()) != $comment) {
}
}
+$expires = false;
+if ($_POST["expires"] != "false") {
+ if($_POST["expdate"]) {
+ $tmp = explode('-', $_POST["expdate"]);
+ $expires = mktime(0,0,0, $tmp[1], $tmp[0], $tmp[2]);
+ } else {
+ $expires = mktime(0,0,0, $_POST["expmonth"], $_POST["expday"], $_POST["expyear"]);
+ }
+}
+
+if ($expires) {
+ if($document->setExpires($expires)) {
+ if($notifier) {
+ $notifyList = $document->getNotifyList();
+ $folder = $document->getFolder();
+ // Send notification to subscribers.
+ $subject = "expiry_changed_email_subject";
+ $message = "expiry_changed_email_body";
+ $params = array();
+ $params['name'] = $document->getName();
+ $params['folder_path'] = $folder->getFolderPathPlain();
+ $params['username'] = $user->getFullName();
+ $params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
+ $params['sitename'] = $settings->_siteName;
+ $params['http_root'] = $settings->_httpRoot;
+ $notifier->toList($user, $notifyList["users"], $subject, $message, $params);
+ foreach ($notifyList["groups"] as $grp) {
+ $notifier->toGroup($user, $grp, $subject, $message, $params);
+ }
+ }
+ } else {
+ UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured"));
+ }
+}
+
if (($oldkeywords = $document->getKeywords()) != $keywords) {
if($document->setKeywords($keywords)) {
}
diff --git a/op/op.Preview.php b/op/op.Preview.php
index 8ae43c7f0..aa50245e8 100644
--- a/op/op.Preview.php
+++ b/op/op.Preview.php
@@ -46,18 +46,26 @@ if ($document->getAccessMode($user) < M_READ) {
exit;
}
-$version = $_GET["version"];
-if (!isset($version) || !is_numeric($version) || intval($version)<1) {
+if(isset($_GET['version'])) {
+ $version = $_GET["version"];
+ if (!is_numeric($version) || intval($version)<1)
+ exit;
+ $object = $document->getContentByVersion($version);
+} elseif(isset($_GET['file'])) {
+ $file = $_GET['file'];
+ if (!is_numeric($file) || intval($file)<1)
+ exit;
+ $object = $document->getDocumentFile($file);
+} else {
exit;
}
-$content = $document->getContentByVersion($version);
-if (!is_object($content)) {
+if (!is_object($object)) {
exit;
}
$previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir, $_GET["width"]);
header('Content-Type: image/png');
-$previewer->getPreview($content);
+$previewer->getPreview($object);
?>
diff --git a/op/op.UpdateDocument.php b/op/op.UpdateDocument.php
index cb6f6887a..dcfa92ad0 100644
--- a/op/op.UpdateDocument.php
+++ b/op/op.UpdateDocument.php
@@ -218,9 +218,9 @@ if ($_FILES['userfile']['error'] == 0) {
}
$expires = false;
- if ($_POST["expires"] != "false") {
+ if (!isset($_POST['expires']) || $_POST["expires"] != "false") {
if($_POST["expdate"]) {
- $tmp = explode('/', $_POST["expdate"]);
+ $tmp = explode('-', $_POST["expdate"]);
$expires = mktime(0,0,0, $tmp[1], $tmp[0], $tmp[2]);
} else {
$expires = mktime(0,0,0, $_POST["expmonth"], $_POST["expday"], $_POST["expyear"]);
diff --git a/styles/bootstrap/application.css b/styles/bootstrap/application.css
index f9675e25e..d3a0df5be 100644
--- a/styles/bootstrap/application.css
+++ b/styles/bootstrap/application.css
@@ -2,6 +2,14 @@ body { /* Add top padding for full-width layout */
padding-top: 60px;
}
img.mimeicon {
+ -moz-border-bottom-colors: none;
+ -moz-border-image: none;
+ -moz-border-left-colors: none;
+ -moz-border-right-colors: none;
+ -moz-border-top-colors: none;
+ border-color: #CCCCCC #AAAAAA #999999 #CCCCCC;
+ border-style: solid;
+ border-width: 1px 2px 2px 1px;
}
.list-action a {
@@ -16,6 +24,17 @@ img.mimeicon {
min-height: 100px;
}
+ul.actions li a:hover > i {
+ text-decoration: none;
+}
+ul.actions li a > i {
+ color: #000;
+ margin-right: 5px;
+}
+ul.actions li a.btn > i {
+ font-size: 200%;
+}
+
@media (max-width: 480px) {
.nav-tabs > li {
float:none;
diff --git a/views/bootstrap/class.EditDocument.php b/views/bootstrap/class.EditDocument.php
index aaec2b129..c4611db44 100644
--- a/views/bootstrap/class.EditDocument.php
+++ b/views/bootstrap/class.EditDocument.php
@@ -71,6 +71,11 @@ function checkForm()
contentHeading(getMLText("edit_document_props"));
$this->contentContainerStart();
+
+ if($document->expires())
+ $expdate = date('d-m-Y', $document->getExpires());
+ else
+ $expdate = '';
?>