Browse Source

Update Report page

Add information to the user about an undelivered email when reporting
Visman 4 years ago
parent
commit
06bfaaa18a
1 changed files with 5 additions and 1 deletions
  1. 5 1
      app/Models/Pages/Report.php

+ 5 - 1
app/Models/Pages/Report.php

@@ -84,7 +84,11 @@ class Report extends Page
                     $this->c->users->update($this->user);
                     $this->c->users->update($this->user);
                 }
                 }
 
 
-                return $this->c->Redirect->page('ViewPost', ['id' => $post->id])->message('Report redirect');
+                if (false === $result && '1' == $this->c->config->o_report_method) {
+                    $this->fIswev = ['e', __('Error mail', $this->c->config->o_admin_email)];
+                } else {
+                    return $this->c->Redirect->page('ViewPost', ['id' => $post->id])->message('Report redirect');
+                }
             }
             }
 
 
             $this->fIswev = $v->getErrors();
             $this->fIswev = $v->getErrors();