https://bugzilla.wikimedia.org/show_bug.cgi?id=38362
Jacob <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #2 from Jacob <[email protected]> 2012-07-12 14:15:05 UTC --- This is my first patch ever so I hope I'm in line with all the MediaWiki standards. I was also interested in displaying the user_real_name instead of the user_name for each item. You can do that by adding the following to LocalSettings.php. This will also make the default Special:Listusers page display user_real_name also. I don't think there is a way to differentiate from the given hooks. $wgHooks['SpecialListusersQueryInfo'][] = 'getRealName'; $wgHooks['SpecialListusersFormatRow'][] = 'setRealName'; function getRealName( $special, &$query ) { $query['fields'][] = 'user_real_name'; return true; } function setRealName( &$item, $row ) { $userPage = Title::makeTitle( NS_USER, $row->user_name ); $userName = Title::makeTitle( NS_USER, $row->user_real_name ); if ($userName->getText() != '') { $item = Linker::link( $userPage, htmlspecialchars( $userName->getText()) ); } else { $item = Linker::link( $userPage, htmlspecialchars( $userPage->getText()) ); } return true; } -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
