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("<p class='err'>%s</p>\n", ER_ERROR_ACCESS_DENIED);
_PageBlue();
die();
}
// Only admins or owners can view this page
-if(!($cfgErrors->userIsAdmin() or $doc->userIsOwner($getUid))) {
+if(!(erConfig::userIsAdmin() or $doc->userIsOwner($getUid))) {
echo sprintf("<p class='err'>%s</div>", _c("error-reporter:You are not ".
"allowed to edit this report."));
_PageBlue();
$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"]);
}
$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"]);
}
"<input type='checkbox' id='hidden' name='hidden' value='true'%s /></td>".
"</tr>\n", _c("error-reporter:Hidden:"), $er->isHidden() ?
" checked='checked'" : "");
-if($cfgErrors->userIsAdmin()) {
+if(erConfig::userIsAdmin()) {
echo sprintf("<tr><td>%s</td><td><textarea name='comment' cols='40' ".
"rows='3'>%s</textarea>", _c("error-reporter:Comment:"), $er->getComment());
if($er->getComment() != "") {