File tree 2 files changed +11
-3
lines changed
2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 1
1
language : php
2
2
3
3
php :
4
- - 5.5
5
4
- 5.6
6
5
- 7.0
7
6
Original file line number Diff line number Diff line change @@ -336,7 +336,7 @@ public function getAvatar()
336
336
return $ this ->author ->getAvatar ();
337
337
}
338
338
339
- return 'http://www.gravatar.com/avatar/00000000000000000000000000000000 ?d=mm&f=y&s=50 ' ;
339
+ return 'http://www.gravatar.com/avatar?d=mm&f=y&s=50 ' ;
340
340
}
341
341
342
342
/**
@@ -346,7 +346,16 @@ public function getAvatar()
346
346
*/
347
347
public static function getAuthors ()
348
348
{
349
- return ArrayHelper::map (static ::find ()->joinWith ('author ' )->groupBy ('createdBy ' )->asArray ()->all (), 'createdBy ' , 'author.username ' );
349
+ $ query = static ::find ()
350
+ ->alias ('c ' )
351
+ ->select (['c.createdBy ' , 'a.username ' ])
352
+ ->joinWith ('author a ' )
353
+ ->groupBy (['c.createdBy ' , 'a.username ' ])
354
+ ->orderBy ('a.username ' )
355
+ ->asArray ()
356
+ ->all ();
357
+
358
+ return ArrayHelper::map ($ query , 'createdBy ' , 'author.username ' );
350
359
}
351
360
352
361
/**
You can’t perform that action at this time.
0 commit comments