]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Show nickname if user has oldschool option enabled
authorChimo <chimo@chromic.org>
Sat, 6 Jun 2015 17:49:16 +0000 (13:49 -0400)
committeraroquen <aroquen@sfr.fr>
Sat, 6 Jun 2015 21:07:34 +0000 (23:07 +0200)
lib/toselector.php

index 4c0bda33124b669d3486b7a1295a93b15204cbd2..566b6a0f29accba2aecee3f0ecc757c192316dd2 100644 (file)
@@ -102,12 +102,16 @@ class ToSelector extends Widget
             $choices[$value] = $groups->getBestName();
         }
 
-       // Add subscribed users to dropdown menu
-       $users = $this->user->getSubscribed();
-       while ($users->fetch()) {
-         $value = 'profile:'.$users->id;
-         $choices[$value] = $users->getBestName();
-       }
+        // Add subscribed users to dropdown menu
+        $users = $this->user->getSubscribed();
+        while ($users->fetch()) {
+            $value = 'profile:'.$users->id;
+            if ($this->user->streamNicknames()) {
+                $choices[$value] = $users->getNickname();
+            } else {
+                $choices[$value] = $users->getBestName();
+            }
+        }
 
         if ($this->to instanceof Profile) {
             $value = 'profile:'.$this->to->id;