X-Git-Url: https://git.rohieb.name/iserv-mod-error-reporter.git/blobdiff_plain/3e05075cf3aeff4d23dc9eba7af236ea47cb919d..f6faefbedad2de5c5d4aa915f5a5f180039c055b:/src/detail.php diff --git a/src/detail.php b/src/detail.php index 3b59479..6561b8f 100644 --- a/src/detail.php +++ b/src/detail.php @@ -42,7 +42,7 @@ $getAction = @$_GET["action"]; $getUid = @intval($_GET["uid"]); $postSubmit = @$_POST["submit"]; -isset($getUid) or die(); +isset($getUid) or die(); // Check if the specified report exists if(!is_object($doc->getErrorReportByID($getUid))) { @@ -54,7 +54,8 @@ if(!is_object($doc->getErrorReportByID($getUid))) { // Only admins or owners can view this page if(!($cfgErrors->userIsAdmin() or $doc->userIsOwner($getUid))) { - echo sprintf("
%s", _c("error-reporter:You are not allowed to edit this report.")); + echo sprintf("
%s", _c("error-reporter:You are not ". + "allowed to edit this report.")); _PageBlue(); die(); } @@ -71,12 +72,12 @@ if($getAction == "update" and $postSubmit == _c("Change")) $postCommentOld = stripslashes(@$_POST["comment_old"]); } - // change the fields of the old dataset - $er->setMachine(stripslashes(@$_POST["machine"])); - $er->setText(stripslashes(@$_POST["text"])); - $er->setVisibility(isset($_POST["hidden"]) ? true : false); + // change the fields of the old dataset + $er->setMachine(stripslashes(@$_POST["machine"])); + $er->setText(stripslashes(@$_POST["text"])); + $er->setVisibility(isset($_POST["hidden"]) ? true : false); - // Do we have to change the comment and his owner? + // Do we have to change the comment and his owner? if($cfgErrors->userIsAdmin()) { if(@$_POST["comment_old"] != @$_POST["comment"]) { $er->setComment(stripslashes(@$_POST["comment"]), $_SESSION["act"]); @@ -84,41 +85,47 @@ if($getAction == "update" and $postSubmit == _c("Change")) } // write into database, reload parent and close window - if($doc->writeErrorReport($er) != -1) { + if($doc->writeErrorReport($er) != -1) { js_try("opener.location.href = 'index.php';"); js_close(500); - } else { - printLastError(); - _PageBlue(); - die(); - } + } else { + printLastError(); + _PageBlue(); + die(); + } } // output form $hidctrl = "input type='hidden'"; Title(_c("error-reporter:Change an error report")); -echo sprintf("
\n"; _PageBlue(); ?>