From 5980b9697c9f7d9212199375c5aa223c45be39aa Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 9 Aug 2016 07:36:05 +0200 Subject: [PATCH] fix line endings --- op/op.AddDocumentLink.php | 100 +++++++++++++++++++------------------- op/op.AddFile.php | 2 +- op/op.RemoveDump.php | 70 +++++++++++++------------- op/op.RemoveEvent.php | 68 +++++++++++++------------- 4 files changed, 120 insertions(+), 120 deletions(-) diff --git a/op/op.AddDocumentLink.php b/op/op.AddDocumentLink.php index 26107625d..12baa371e 100644 --- a/op/op.AddDocumentLink.php +++ b/op/op.AddDocumentLink.php @@ -1,67 +1,67 @@ - getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); -} - -$documentid = $_GET["documentid"]; + 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(); + +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). " / ".$document->getName().""; - + if ($document->getAccessMode($user) < M_READ) { - UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); -} - -$public = (isset($_GET["public"]) && $_GET["public"] == "true") ? true : false; -if ($public && ($document->getAccessMode($user) == M_READ)) { - $public = false; -} - + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +$public = (isset($_GET["public"]) && $_GET["public"] == "true") ? true : false; +if ($public && ($document->getAccessMode($user) == M_READ)) { + $public = false; +} + if (!isset($_GET["docid"]) || !is_numeric($_GET["docid"]) || intval($_GET["docid"])<1) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_target_doc_id")); } - -$docid = $_GET["docid"]; + +$docid = $_GET["docid"]; $doc = $dms->getDocument($docid); - + if (!is_object($doc)) { - UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_doc_id")); + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_doc_id")); } if (!$document->addDocumentLink($docid, $user->getID(), $public)){ - UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); } header("Location:../out/out.ViewDocument.php?documentid=".$documentid."¤ttab=links"); diff --git a/op/op.AddFile.php b/op/op.AddFile.php index 89ff9e1a1..befaf9ddc 100644 --- a/op/op.AddFile.php +++ b/op/op.AddFile.php @@ -18,7 +18,7 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. include("../inc/inc.Settings.php"); -include("../inc/inc.LogInit.php"); +include("../inc/inc.LogInit.php"); include("../inc/inc.Utils.php"); include("../inc/inc.DBInit.php"); include("../inc/inc.Language.php"); diff --git a/op/op.RemoveDump.php b/op/op.RemoveDump.php index a3dbe940d..e27e62ad9 100644 --- a/op/op.RemoveDump.php +++ b/op/op.RemoveDump.php @@ -1,47 +1,47 @@ -isAdmin()) { - UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); + UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); } - + /* Check if the form data comes for a trusted request */ if(!checkFormKey('removedump')) { UI::exitError(getMLText("admin_tools"),getMLText("invalid_request_token")); } -if (!isset($_POST["dumpname"]) || !file_exists($settings->_contentDir.$_POST["dumpname"]) ) { - UI::exitError(getMLText("admin_tools"),getMLText("unknown_id")); +if (!isset($_POST["dumpname"]) || !file_exists($settings->_contentDir.$_POST["dumpname"]) ) { + UI::exitError(getMLText("admin_tools"),getMLText("unknown_id")); } - -if (!SeedDMS_Core_File::removeFile($settings->_contentDir.$_POST["dumpname"])) { - UI::exitError(getMLText("admin_tools"),getMLText("error_occured")); + +if (!SeedDMS_Core_File::removeFile($settings->_contentDir.$_POST["dumpname"])) { + UI::exitError(getMLText("admin_tools"),getMLText("error_occured")); } - -add_log_line("?dumpname=".$_POST["dumpname"]); + +add_log_line("?dumpname=".$_POST["dumpname"]); header("Location:../out/out.BackupTools.php"); - -?> + +?> diff --git a/op/op.RemoveEvent.php b/op/op.RemoveEvent.php index d47d83273..81ce0a384 100644 --- a/op/op.RemoveEvent.php +++ b/op/op.RemoveEvent.php @@ -1,40 +1,40 @@ -getID()!=$event["userID"])&&(!$user->isAdmin())){ } $res = delEvent($_POST["eventid"]); - + if (is_bool($res) && !$res) { UI::exitError(getMLText("edit_event"),getMLText("error_occured")); } -add_log_line("?id=".$_POST["eventid"]); +add_log_line("?id=".$_POST["eventid"]); $dt=getdate($event["start"]); - -header("Location:../out/out.Calendar.php?mode=w&day=".$dt["mday"]."&year=".$dt["year"]."&month=".$dt["mon"]); - -?> + +header("Location:../out/out.Calendar.php?mode=w&day=".$dt["mday"]."&year=".$dt["year"]."&month=".$dt["mon"]); + +?>