]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch 'master' into 0.9.x
authorBrion Vibber <brion@pobox.com>
Wed, 2 Mar 2011 01:11:29 +0000 (17:11 -0800)
committerBrion Vibber <brion@pobox.com>
Wed, 2 Mar 2011 01:11:29 +0000 (17:11 -0800)
1  2 
classes/Profile.php

diff --combined classes/Profile.php
index 5e196051815fc63612da1fe05be18b36aea94b9c,d030e38b1b5c86866a7f3372a53a7088ea277c7e..eb9299348d4f386401f72177683fb9316dd6d9d2
@@@ -186,6 -186,10 +186,10 @@@ class Profile extends Memcached_DataObj
          $notice = $this->getNotices(0, 1);
  
          if ($notice->fetch()) {
+             if ($notice instanceof ArrayWrapper) {
+                 // hack for things trying to work with single notices
+                 return $notice->_items[0];
+             }
              return $notice;
          } else {
              return null;
              case Right::EMAILONFAVE:
                  $result = !$this->isSandboxed();
                  break;
 +            case Right::WEBLOGIN:
 +                $result = !$this->isSilenced();
 +                break;
 +            case Right::API:
 +                $result = !$this->isSilenced();
 +                break;
              case Right::BACKUPACCOUNT:
                  $result = common_config('profile', 'backup');
                  break;
       *
       * @param User $cur Current user
       *
 -     * @return array representation of <statusnet:profile_info> element
 +     * @return array representation of <statusnet:profile_info> element or null
       */
  
      function profileInfo($cur)
      {
 -        $profileInfoAttr = array();
 +        $profileInfoAttr = array('local_id' => $this->id);
  
          if ($cur != null) {
              // Whether the current user is a subscribed to this profile