X-Git-Url: https://git.rohieb.name/iserv-mod-error-reporter.git/blobdiff_plain/68c9e4f4871634ad66d75ff281e3438c6a867381..36a47ab0347c6ec92d8cdec443895342f6153288:/src/detail.php?ds=sidebyside diff --git a/src/detail.php b/src/detail.php index b091f8f..1dfbcf3 100644 --- a/src/detail.php +++ b/src/detail.php @@ -30,9 +30,11 @@ require_once("mod_error-reporter/init.inc"); require_once("sec/secure.inc"); require_once("js.inc"); +db_user("errorreporter"); + PageBlue(_c("error-reporter:Change an error report"), "mod_error-reporter"); -if(!$cfgErrors->userHasAccess()) { +if(!erConfig::userHasAccess()) { printf("

%s

\n", ER_ERROR_ACCESS_DENIED); _PageBlue(); die(); @@ -53,7 +55,7 @@ if(!is_object($doc->getErrorReportByID($getUid))) { } // Only admins or owners can view this page -if(!($cfgErrors->userIsAdmin() or $doc->userIsOwner($getUid))) { +if(!(erConfig::userIsAdmin() or $doc->userIsOwner($getUid))) { echo sprintf("

%s", _c("error-reporter:You are not ". "allowed to edit this report.")); _PageBlue(); @@ -65,10 +67,9 @@ $er = $doc->getErrorReportByID($getUid); $strOldComment = $er->getComment(); // Probably we have to update an error report -echo "PostSubmit: $postSubmit"; if($getAction == "update" and $postSubmit == _("Change")) { - if($cfgErrors->userIsAdmin()) { + if(erConfig::userIsAdmin()) { $postComment = stripslashes(@$_POST["comment"]); $postCommentOld = stripslashes(@$_POST["comment_old"]); } @@ -79,7 +80,7 @@ if($getAction == "update" and $postSubmit == _("Change")) $er->setVisibility(isset($_POST["hidden"]) ? true : false); // Do we have to change the comment and his owner? - if($cfgErrors->userIsAdmin()) { + if(erConfig::userIsAdmin()) { if(@$_POST["comment_old"] != @$_POST["comment"]) { $er->setComment(stripslashes(@$_POST["comment"]), $_SESSION["act"]); } @@ -115,7 +116,7 @@ echo sprintf("". "". "\n", _c("error-reporter:Hidden:"), $er->isHidden() ? " checked='checked'" : ""); -if($cfgErrors->userIsAdmin()) { +if(erConfig::userIsAdmin()) { echo sprintf("%s", _c("error-reporter:Comment:"), $er->getComment()); if($er->getComment() != "") {