r39161 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r39160‎ | r39161 | r39162 >
Date:18:06, 11 August 2008
Author:ashley
Status:old
Tags:
Comment:
(bug 11493) Replace extAddSpecialPage with normal $wgSpecialPages and $wgAutoloadClasses usage. Based on the patch in bug 11493 by Victor Vasiliev.
Modified paths:
  • /trunk/extensions/ExpandTemplates/ExpandTemplates.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ExpandTemplates/ExpandTemplates.php
@@ -4,9 +4,6 @@
55 <p>This is the ExpandTemplates extension. To enable it, put </p>
66 <pre>require_once("$IP/extensions/ExpandTemplates/ExpandTemplates.php");</pre>
77 <p>at the bottom of your LocalSettings.php.</p>
8 -<p>This extension also requires
9 -<tt><a href="http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/ExtensionFunctions.php">
10 -ExtensionFunctions.php</a></tt>.</p>
118 <?php
129 exit(1);
1310 }
@@ -21,11 +18,9 @@
2219 'descriptionmsg' => 'expandtemplates-desc',
2320 );
2421
25 -$wgExtensionMessagesFiles['ExpandTemplates'] = dirname(__FILE__) . '/ExpandTemplates.i18n.php';
26 -$wgExtensionAliasesFiles['ExpandTemplates'] = dirname(__FILE__) . '/ExpandTemplates.alias.php';
27 -$wgSpecialPageGroups['ExpandTemplates'] = 'wiki';
28 -
29 -if ( !function_exists( 'extAddSpecialPage' ) ) {
30 - require( dirname(__FILE__) . '/../ExtensionFunctions.php' );
31 -}
32 -extAddSpecialPage( dirname(__FILE__) . '/ExpandTemplates_body.php', 'ExpandTemplates', 'ExpandTemplates' );
 22+$dir = dirname(__FILE__) . '/';
 23+$wgAutoloadClasses['ExpandTemplates'] = $dir . 'ExpandTemplates_body.php'
 24+$wgExtensionMessagesFiles['ExpandTemplates'] = $dir . 'ExpandTemplates.i18n.php';
 25+$wgExtensionAliasesFiles['ExpandTemplates'] = $dir . 'ExpandTemplates.alias.php';
 26+$wgSpecialPages['ExpandTemplates'] = 'ExpandTemplates';
 27+$wgSpecialPageGroups['ExpandTemplates'] = 'wiki';
\ No newline at end of file

Follow-up revisions

RevisionCommit summaryAuthorDate
r39164Fix syntax error from r39161siebrand18:19, 11 August 2008

Status & tagging log