]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/shownotice.php
Fix regression from WebFinger update for singleuser sites
[quix0rs-gnu-social.git] / actions / shownotice.php
index 6055184fcdf2ced037e4cf8bde2dee2be15ebad2..3b3e50884ddf5c35f734559400904ef920cf9628 100644 (file)
@@ -100,7 +100,7 @@ class ShownoticeAction extends Action
             return false;
         }
 
-        $this->user = User::staticGet('id', $this->profile->id);
+        $this->user = User::getKV('id', $this->profile->id);
 
         $this->avatar = $this->profile->getAvatar(AVATAR_PROFILE_SIZE);
 
@@ -117,11 +117,11 @@ class ShownoticeAction extends Action
     {
         $id = $this->arg('notice');
 
-        $notice = Notice::staticGet('id', $id);
+        $notice = Notice::getKV('id', $id);
 
         if (empty($notice)) {
             // Did we used to have it, and it got deleted?
-            $deleted = Deleted_notice::staticGet($id);
+            $deleted = Deleted_notice::getKV($id);
             if (!empty($deleted)) {
                 // TRANS: Client error displayed trying to show a deleted notice.
                 $this->clientError(_('Notice deleted.'), 410);
@@ -250,9 +250,7 @@ class ShownoticeAction extends Action
 
     function showAjax()
     {
-        header('Content-Type: text/xml;charset=utf-8');
-        $this->xw->startDocument('1.0', 'UTF-8');
-        $this->elementStart('html');
+        $this->startHTML('text/xml;charset=utf-8');
         $this->elementStart('head');
         // TRANS: Title for page that shows a notice.
         $this->element('title', null, _m('TITLE','Notice'));
@@ -261,7 +259,7 @@ class ShownoticeAction extends Action
         $nli = new NoticeListItem($this->notice, $this);
         $nli->show();
         $this->elementEnd('body');
-        $this->elementEnd('html');
+        $this->endHTML();
     }
 
     /**
@@ -290,7 +288,7 @@ class ShownoticeAction extends Action
      */
     function extraHead()
     {
-        $user = User::staticGet($this->profile->id);
+        $user = User::getKV($this->profile->id);
 
         if (!$user) {
             return;