]> git.mxchange.org Git - friendica.git/blobdiff - mod/ignored.php
Merge pull request #5830 from nupplaphil/update_from_boot
[friendica.git] / mod / ignored.php
index f42e3a8bd3571d1a9d8024ffe2cd2fb67eda4a01..4f14119fef876d792e9b3f1e684139a09fb9812f 100644 (file)
@@ -7,8 +7,6 @@ use Friendica\Model\Item;
 
 function ignored_init(App $a)
 {
-       $ignored = 0;
-
        if (!local_user()) {
                killme();
        }
@@ -26,9 +24,8 @@ function ignored_init(App $a)
                killme();
        }
 
-       if (!$thread['ignored']) {
-               $ignored = true;
-       }
+       // Numeric values are needed for the json output further below
+       $ignored = ($thread['ignored'] ? 0 : 1);
 
        if ($thread['uid'] != 0) {
                DBA::update('thread', ['ignored' => $ignored], ['iid' => $message_id]);
@@ -46,7 +43,7 @@ function ignored_init(App $a)
                        $rand = "?$rand";
                }
 
-               goaway(System::baseUrl() . "/" . $return_path . $rand);
+               $a->internalRedirect($return_path . $rand);
        }
 
        // the json doesn't really matter, it will either be 0 or 1