r99449 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99448‎ | r99449 | r99450 >
Date:23:54, 10 October 2011
Author:kaldari
Status:deferred (Comments)
Tags:
Comment:
first version of PageTriage!
Modified paths:
  • /trunk/extensions/PageTriage/PageTriage.php (added) (history)

Diff [purge]

Index: trunk/extensions/PageTriage/PageTriage.php
@@ -0,0 +1,28 @@
 2+<?php
 3+
 4+# Alert the user that this is not a valid entry point to MediaWiki if they try to access the special pages file directly.
 5+if ( !defined( 'MEDIAWIKI' ) ) {
 6+ echo <<<EOT
 7+To install this extension, put the following line in LocalSettings.php:
 8+require_once( "\$IP/extensions/PageTriage/PageTriage.php" );
 9+EOT;
 10+ exit( 1 );
 11+}
 12+
 13+// Extension credits that will show up on Special:Version
 14+$wgExtensionCredits['specialpage'][] = array(
 15+ 'path' => __FILE__,
 16+ 'name' => 'PageTriage',
 17+ 'version' => '0.1',
 18+ 'url' => 'http://www.mediawiki.org/wiki/Extension:PageTriage',
 19+ 'author' => '',
 20+ 'descriptionmsg' => 'pagetriage-desc',
 21+);
 22+
 23+$dir = dirname( __FILE__ ) . '/';
 24+
 25+$wgAutoloadClasses['SpecialPageTriage'] = $dir . 'SpecialPageTriage.php';
 26+$wgExtensionMessagesFiles['PageTriage'] = $dir . 'PageTriage.i18n.php';
 27+$wgExtensionAliasesFiles['PageTriage'] = $dir . 'PageTriage.alias.php';
 28+$wgSpecialPages['PageTriage'] = 'SpecialPageTriage';
 29+$wgSpecialPageGroups['PageTriage'] = 'changes';

Comments

#Comment by Reedy (talk | contribs)   23:55, 10 October 2011

You need to svn add all your pages ;)

#Comment by Reedy (talk | contribs)   00:44, 11 October 2011

Still missing SpecialPageTriage.php

#Comment by Reedy (talk | contribs)   00:46, 11 October 2011

Also, you need a message for "+$wgSpecialPageGroups['PageTriage'] = 'changes';"

#Comment by Kaldari (talk | contribs)   18:21, 11 October 2011

Can you clarify this one? I didn't know you needed to define messages for wgSpecialPageGroups. Do you need to do this even if it's one of the default groups?

#Comment by Kaldari (talk | contribs)   19:55, 11 October 2011

Oh sorry I thought you meant define a message for 'changes'. I guess you just mean define the special page title message which was done in the subsequent rev.

Status & tagging log