]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
User object didn't have getNickname() function
authorMikael Nordfeldth <mmn@hethane.se>
Tue, 6 May 2014 14:08:36 +0000 (16:08 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Tue, 6 May 2014 14:08:36 +0000 (16:08 +0200)
We're just jumping on to the Profile->getNickname() function.

classes/User.php
extlib/DB/DataObject.php
plugins/OStatus/actions/usersalmon.php

index 7a4564c80dbb0dc5f1b21de9b30cddd4709def05..115bda09b7c0f60007b6e37ba53b761bb3bf3e16 100644 (file)
@@ -137,6 +137,11 @@ class User extends Managed_DataObject
         return $this->uri;
     }
 
+    public function getNickname()
+    {
+        return $this->getProfile()->getNickname();
+    }
+
     function isSubscribed(Profile $other)
     {
         return $this->getProfile()->isSubscribed($other);
index 828477d6e87f340645a32a21aaf3004d1b668e2a..1232d184dfad1666e9fe532c6c29dbf832635f78 100755 (executable)
@@ -4309,6 +4309,7 @@ class DB_DataObject extends DB_DataObject_Overload
                 $case[strtolower($k)] = $k;
             }
             if ((substr(phpversion(),0,1) == 5) && isset($case[strtolower($element)])) {
+                file_put_contents('/tmp/backtrace', var_export(debug_backtrace(),true));
                 trigger_error("PHP5 set/get calls should match the case of the variable",E_USER_WARNING);
                 $element = strtolower($element);
             }
index 550c034e4921f8870a93cfaff178f8d2448bda2a..3376e4d5ea4c9ed7c1aa44c5258491f000bca4dd 100644 (file)
@@ -89,7 +89,7 @@ class UsersalmonAction extends SalmonAction
             // In reply to a notice either from or mentioning this user.
         } else if (!empty($context->attention) &&
                    (array_key_exists($this->user->uri, $context->attention) ||
-                    array_key_exists($common_profile_url($this->user->nickname),
+                    array_key_exists($common_profile_url($this->user->getNickname()),
                              $context->attention)))
         {
             // To the attention of this user.