r51943 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51942‎ | r51943 | r51944 >
Date:00:14, 16 June 2009
Author:tstarling
Status:deferred
Tags:
Comment:
* Add $wgAvailableRights for rights defined in r51870
* Fix class name in callback
Modified paths:
  • /trunk/extensions/Collection/Collection.body.php (modified) (history)
  • /trunk/extensions/Collection/Collection.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Collection/Collection.php
@@ -130,6 +130,9 @@
131131 $wgHooks['SkinBuildSidebar'][] = 'CollectionHooks::buildSidebar';
132132 $wgHooks['OutputPageCheckLastModified'][] = 'CollectionHooks::checkLastModified';
133133
 134+$wgAvailableRights[] = 'collectionsaveasuserpage';
 135+$wgAvailableRights[] = 'collectionsaveascommunitypage';
 136+
134137 # register global Ajax functions:
135138
136139 function wfAjaxGetCollection() {
Index: trunk/extensions/Collection/Collection.body.php
@@ -293,14 +293,14 @@
294294 $new_items = array();
295295 foreach ( $collection['items'] as $item ) {
296296 if ( $item['type'] == 'chapter' ) {
297 - usort( $articles, array( self, 'title_cmp' ) );
 297+ usort( $articles, array( __CLASS__, 'title_cmp' ) );
298298 $new_items = array_merge( $new_items, $articles, array( $item ) );
299299 $articles = array();
300300 } elseif ( $item['type'] == 'article' ) {
301301 $articles[] = $item;
302302 }
303303 }
304 - usort( $articles, array( self, 'title_cmp' ) );
 304+ usort( $articles, array( __CLASS__, 'title_cmp' ) );
305305 $collection['items'] = array_merge( $new_items, $articles );
306306 $_SESSION['wsCollection'] = $collection;
307307 CollectionSession::touchSession();

Follow-up revisions

RevisionCommit summaryAuthorDate
r52180Follow-up r51870, r51943: remove now-bogus bits in README about removed varia...brion22:07, 19 June 2009
r52208Follow-up r51943: Add description messages for new rightsraymond18:32, 20 June 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r51870use hardcoded rights collectionsaveas{user|community}page.jojo09:40, 15 June 2009

Status & tagging log