From: Mikael Nordfeldth Date: Tue, 6 May 2014 14:08:36 +0000 (+0200) Subject: User object didn't have getNickname() function X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8b12e41351164763dddfb2511bad6283c67f2817;p=quix0rs-gnu-social.git User object didn't have getNickname() function We're just jumping on to the Profile->getNickname() function. --- diff --git a/classes/User.php b/classes/User.php index 7a4564c80d..115bda09b7 100644 --- a/classes/User.php +++ b/classes/User.php @@ -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); diff --git a/extlib/DB/DataObject.php b/extlib/DB/DataObject.php index 828477d6e8..1232d184df 100755 --- a/extlib/DB/DataObject.php +++ b/extlib/DB/DataObject.php @@ -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); } diff --git a/plugins/OStatus/actions/usersalmon.php b/plugins/OStatus/actions/usersalmon.php index 550c034e49..3376e4d5ea 100644 --- a/plugins/OStatus/actions/usersalmon.php +++ b/plugins/OStatus/actions/usersalmon.php @@ -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.