]> git.mxchange.org Git - friendica.git/blobdiff - mod/subthread.php
Merge pull request #3985 from hoergen/develop
[friendica.git] / mod / subthread.php
index 0745fc0eef4948a204f61581aedc7994a0e045c5..a597b169872feb63a144aa5def4ae12d333ad2ac 100644 (file)
@@ -1,6 +1,8 @@
 <?php
 
 use Friendica\App;
+use Friendica\Core\System;
+use Friendica\Database\DBM;
 
 require_once('include/security.php');
 require_once('include/bbcode.php');
@@ -21,7 +23,7 @@ function subthread_content(App $a) {
                dbesc($item_id)
        );
 
-       if(! $item_id || (! dbm::is_result($r))) {
+       if(! $item_id || (! DBM::is_result($r))) {
                logger('subthread: no item ' . $item_id);
                return;
        }
@@ -42,7 +44,7 @@ function subthread_content(App $a) {
                        intval($item['contact-id']),
                        intval($item['uid'])
                );
-               if (! dbm::is_result($r)) {
+               if (! DBM::is_result($r)) {
                        return;
                }
                if (! $r[0]['self']) {
@@ -56,7 +58,7 @@ function subthread_content(App $a) {
                WHERE `contact`.`self` = 1 AND `contact`.`uid` = %d LIMIT 1",
                intval($owner_uid)
        );
-       if (dbm::is_result($r))
+       if (DBM::is_result($r))
                $owner = $r[0];
 
        if (! $owner) {
@@ -77,7 +79,7 @@ function subthread_content(App $a) {
                        intval($_SESSION['visitor_id']),
                        intval($owner_uid)
                );
-               if (dbm::is_result($r))
+               if (DBM::is_result($r))
                        $contact = $r[0];
        }
        if (! $contact) {
@@ -88,7 +90,7 @@ function subthread_content(App $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 +132,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;