]> git.mxchange.org Git - friendica.git/blobdiff - mod/subthread.php
App::get_baseurl is now replaced with System::baseUrl
[friendica.git] / mod / subthread.php
index c154187a695dc4a11511c2824923a4e3b97771a6..d4b861baabd7144ee9eba7bd92e8dad4f200bd76 100644 (file)
@@ -1,11 +1,13 @@
 <?php
 
+use Friendica\App;
+use Friendica\Core\System;
+
 require_once('include/security.php');
 require_once('include/bbcode.php');
 require_once('include/items.php');
 
-
-function subthread_content(&$a) {
+function subthread_content(App $a) {
 
        if(! local_user() && ! remote_user()) {
                return;
@@ -49,7 +51,7 @@ function subthread_content(&$a) {
                }
        }
 
-       // this represents the post owner on this system. 
+       // this represents the post owner on this system.
 
        $r = q("SELECT `contact`.*, `user`.`nickname` FROM `contact` LEFT JOIN `user` ON `contact`.`uid` = `user`.`uid`
                WHERE `contact`.`self` = 1 AND `contact`.`uid` = %d LIMIT 1",
@@ -71,8 +73,7 @@ function subthread_content(&$a) {
 
        if ((local_user()) && (local_user() == $owner_uid)) {
                $contact = $owner;
-       }
-       else {
+       } else {
                $r = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
                        intval($_SESSION['visitor_id']),
                        intval($owner_uid)
@@ -88,7 +89,7 @@ function subthread_content(&$a) {
 
        $post_type = (($item['resource-id']) ? t('photo') : t('status'));
        $objtype = (($item['resource-id']) ? ACTIVITY_OBJ_IMAGE : ACTIVITY_OBJ_NOTE );
-       $link = xmlify('<link rel="alternate" type="text/html" href="' . App::get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id'] . '" />' . "\n") ;
+       $link = xmlify('<link rel="alternate" type="text/html" href="' . System::baseUrl() . '/display/' . $owner['nickname'] . '/' . $item['id'] . '" />' . "\n") ;
        $body = $item['body'];
 
        $obj = <<< EOT
@@ -130,7 +131,7 @@ EOT;
 
        $ulink = '[url=' . $contact['url'] . ']' . $contact['name'] . '[/url]';
        $alink = '[url=' . $item['author-link'] . ']' . $item['author-name'] . '[/url]';
-       $plink = '[url=' . App::get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id'] . ']' . $post_type . '[/url]';
+       $plink = '[url=' . System::baseUrl() . '/display/' . $owner['nickname'] . '/' . $item['id'] . ']' . $post_type . '[/url]';
        $arr['body'] =  sprintf( $bodyverb, $ulink, $alink, $plink );
 
        $arr['verb'] = $activity;