]> git.mxchange.org Git - friendica.git/blobdiff - mod/ignored.php
Replace old database queries with the new ones
[friendica.git] / mod / ignored.php
index a311713077f134b305a067a230e7d34819bae72e..9931a556a6701e0ec9e37ddd835ea62dbf2dc84e 100644 (file)
@@ -1,5 +1,8 @@
 <?php
 
+use Friendica\App;
+use Friendica\Core\System;
+use Friendica\Database\DBM;
 
 function ignored_init(App $a) {
 
@@ -19,7 +22,7 @@ function ignored_init(App $a) {
                intval(local_user()),
                intval($message_id)
        );
-       if (! dbm::is_result($r)) {
+       if (! DBM::is_result($r)) {
                killme();
        }
 
@@ -37,13 +40,10 @@ function ignored_init(App $a) {
        $return_path = ((x($_REQUEST,'return')) ? $_REQUEST['return'] : '');
        if ($return_path) {
                $rand = '_=' . time();
-               if (strpos($return_path, '?')) {
-                       $rand = "&$rand";
-               } else {
-                       $rand = "?$rand";
-               }
+               if(strpos($return_path, '?')) $rand = "&$rand";
+               else $rand = "?$rand";
 
-               goaway(App::get_baseurl() . "/" . $return_path . $rand);
+               goaway(System::baseUrl() . "/" . $return_path . $rand);
        }
 
        // the json doesn't really matter, it will either be 0 or 1