r39418 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r39417‎ | r39418 | r39419 >
Date:17:59, 15 August 2008
Author:siebrand
Status:old
Tags:
Comment:
* remove dependency on ExtensionFunctions.php
* add $wgExtensionAliasesFiles and support in Translate
* use author array in extension credits
* method renamed for consistency with other extensions
* delayed message loading
Modified paths:
  • /trunk/extensions/InspectCache/InspectCache.alias.php (added) (history)
  • /trunk/extensions/InspectCache/InspectCache.php (modified) (history)
  • /trunk/extensions/InspectCache/InspectCache_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/InspectCache/InspectCache.php
@@ -11,9 +11,9 @@
1212 }
1313
1414 $wgExtensionCredits['specialpage'][] = array(
15 - 'version' => '0.2',
 15+ 'version' => '0.3',
1616 'name' => 'InspectCache',
17 - 'author' => 'Tim Starling, Brion Vibber',
 17+ 'author' => array( 'Tim Starling', 'Brion Vibber' ),
1818 'url' => 'http://www.mediawiki.org/wiki/Extension:InspectCache',
1919 'description' => 'A simple debugging tool to inspect the contents of the shared cache',
2020 'descriptionmsg' => 'inspectcache-desc',
@@ -21,5 +21,6 @@
2222
2323 $dir = dirname(__FILE__) . '/';
2424 $wgExtensionMessagesFiles['InspectCache'] = $dir . 'InspectCache.i18n.php';
25 -require_once( $dir . '../ExtensionFunctions.php' );
26 -extAddSpecialPage( $dir . 'InspectCache_body.php', 'InspectCache', 'InspectCache' );
 25+$wgExtensionAliasesFiles['InspectCache'] = $dir . 'InspectCache.alias.php';
 26+$wgAutoloadClasses['SpecialInspectCache'] = $dir . 'InspectCache_body.php';
 27+$wgSpecialPages['InspectCache'] = 'SpecialInspectCache';
Index: trunk/extensions/InspectCache/InspectCache.alias.php
@@ -0,0 +1,11 @@
 2+<?php
 3+/**
 4+ * Aliases for special pages
 5+ *
 6+ */
 7+
 8+$aliases = array();
 9+
 10+$aliases['en'] = array(
 11+ 'InspectCache' => array( 'InspectCache' ),
 12+);
Property changes on: trunk/extensions/InspectCache/InspectCache.alias.php
___________________________________________________________________
Added: svn:eol-style
113 + native
Added: svn:keywords
214 + Id
Index: trunk/extensions/InspectCache/InspectCache_body.php
@@ -5,15 +5,17 @@
66 exit(1);
77 }
88
9 -class InspectCache extends SpecialPage
 9+class SpecialInspectCache extends SpecialPage
1010 {
11 - function InspectCache() {
12 - wfLoadExtensionMessages( 'InspectCache' );
13 - SpecialPage::SpecialPage("InspectCache");
 11+ function __construct() {
 12+ SpecialPage::SpecialPage( 'InspectCache' );
1413 }
1514
1615 function execute( $par ) {
1716 global $wgRequest, $wgOut, $wgTitle, $inspectcacheget, $inspectcachedelete;
 17+
 18+ wfLoadExtensionMessages( 'InspectCache' );
 19+
1820 $inspectcacheget = wfMsgHtml('inspectcache-get');
1921 $inspectcachedelete = wfMsgHtml('inspectcache-delete');
2022 $inspectcachelist = wfMsgHtml('inspectcache-list');

Status & tagging log