]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apitimelinehome.php
Twitter Import + avatar fixes (cleaning up + fixing)
[quix0rs-gnu-social.git] / actions / apitimelinehome.php
index 22c6cc5f944b6f3ee481e479fca84d1bcea63b84..7ef3da79f0de65c11471623fd693d392c5dcfd31 100644 (file)
@@ -38,8 +38,6 @@ if (!defined('STATUSNET')) {
     exit(1);
 }
 
-require_once INSTALLDIR . '/lib/apibareauth.php';
-
 /**
  * Returns the most recent notices (default 20) posted by the target user.
  * This is the equivalent of 'You and friends' page accessed via Web.
@@ -107,7 +105,6 @@ class ApiTimelineHomeAction extends ApiBareAuthAction
     function showTimeline()
     {
         $profile    = $this->user->getProfile();
-        $avatar     = $profile->getAvatar(AVATAR_PROFILE_SIZE);
         $sitename   = common_config('site', 'name');
         // TRANS: Timeline title for user and friends. %s is a user nickname.
         $title      = sprintf(_("%s and friends"), $this->user->nickname);
@@ -120,17 +117,11 @@ class ApiTimelineHomeAction extends ApiBareAuthAction
             $this->user->nickname, $sitename
         );
 
-        $link = common_local_url(
-            'all',
-            array('nickname' => $this->user->nickname)
-        );
-
+        $logo = $profile->avatarUrl(AVATAR_PROFILE_SIZE);
+        $link = common_local_url('all',
+                    array('nickname' => $this->user->nickname));
         $self = $this->getSelfUri();
 
-        $logo = (!empty($avatar))
-            ? $avatar->displayUrl()
-            : Avatar::defaultImage(AVATAR_PROFILE_SIZE);
-
         switch($this->format) {
         case 'xml':
             $this->showXmlTimeline($this->notices);