r23580 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23579‎ | r23580 | r23581 >
Date:04:21, 30 June 2007
Author:robchurch
Status:old
Tags:
Comment:
(bug 10404) Show rights log fragment for the selected user in Special:Userrights
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/SpecialUserrights.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialUserrights.php
@@ -154,6 +154,7 @@
155155 }
156156
157157 $this->showEditUserGroupsForm( $username, $user->getGroups() );
 158+ $this->showLogFragment( $user, $wgOut );
158159 }
159160
160161 /**
@@ -376,5 +377,26 @@
377378 }
378379 return $groups;
379380 }
380 -} // end class UserrightsForm
381 -
 381+
 382+ /**
 383+ * Show a rights log fragment for the specified user
 384+ *
 385+ * @param User $user User to show log for
 386+ * @param OutputPage $output OutputPage to use
 387+ */
 388+ protected function showLogFragment( $user, $output ) {
 389+ $viewer = new LogViewer(
 390+ new LogReader(
 391+ new FauxRequest(
 392+ array(
 393+ 'type' => 'rights',
 394+ 'page' => $user->getUserPage()->getPrefixedUrl(),
 395+ )
 396+ )
 397+ )
 398+ );
 399+ $output->addHtml( "<h2>" . htmlspecialchars( LogPage::logName( 'rights' ) ) . "</h2>\n" );
 400+ $viewer->showList( $output );
 401+ }
 402+
 403+}
\ No newline at end of file
Index: trunk/phase3/RELEASE-NOTES
@@ -113,6 +113,7 @@
114114 * (bug 10387) Detect and handle '.php5' extension environments at install time
115115 Patch by Edward Z. Yang.
116116 * Introduce 'ShowRawCssJs' hook; see docs/hooks.txt for more information
 117+* (bug 10404) Show rights log fragment for the selected user in Special:Userrights
117118
118119 == Bugfixes since 1.10 ==
119120

Follow-up revisions

RevisionCommit summaryAuthorDate
r23581Merged revisions 23406-23580 via svnmerge from...david04:50, 30 June 2007

Status & tagging log