r96471 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96470‎ | r96471 | r96472 >
Date:19:13, 7 September 2011
Author:nikerabbit
Status:ok
Tags:
Comment:
Renamed LogEntry class to SpecialLogEntry to avoid conflict with core interface
Small untested fixes to the code while looking at it.
Modified paths:
  • /trunk/extensions/LogEntry/LogEntry.i18n.php (modified) (history)
  • /trunk/extensions/LogEntry/LogEntry.page.php (modified) (history)
  • /trunk/extensions/LogEntry/LogEntry.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LogEntry/LogEntry.page.php
@@ -7,7 +7,7 @@
88 */
99
1010 // LogEntry special page
11 -class LogEntry extends UnlistedSpecialPage {
 11+class SpecialLogEntry extends UnlistedSpecialPage {
1212
1313 /* Functions */
1414
@@ -43,7 +43,7 @@
4444 if( $title && $title->userCan( 'edit', $page ) )
4545 {
4646 // Get article
47 - $article = new Article( $title );
 47+ $article = new Article( $title, 0 );
4848
4949 // Build new line
5050 $newLine = '*';
@@ -130,6 +130,6 @@
131131 }
132132 }
133133 // Alert of invalid page
134 - $wgOut->addHTML( wfMsgHtml( 'logentry-invalidpage' ) . ": {$page}" );
 134+ $wgOut->addWikiMsg( 'logentry-invalidpage', $page );
135135 }
136136 }
Index: trunk/extensions/LogEntry/LogEntry.i18n.php
@@ -16,7 +16,7 @@
1717 'logentry-parserhook-desc' => 'This tag extension provides a form for appending/prepending to log pages',
1818 'logentry-specialpage-desc' => 'This tag extension provides processing for appending to log pages',
1919 'logentry' => 'LogEntry',
20 - 'logentry-invalidpage' => 'Invalid page',
 20+ 'logentry-invalidpage' => 'Invalid page: $1',
2121 'logentry-invalidtoken' => 'Invalid token',
2222 );
2323
Index: trunk/extensions/LogEntry/LogEntry.php
@@ -54,10 +54,10 @@
5555
5656 // Register auto load for the special page class
5757 $wgAutoloadClasses['LogEntryHooks'] = $dir . 'LogEntry.hooks.php';
58 -$wgAutoloadClasses['LogEntry'] = $dir . 'LogEntry.page.php';
 58+$wgAutoloadClasses['SpecialLogEntry'] = $dir . 'LogEntry.page.php';
5959
6060 // Register parser hook
6161 $wgHooks['ParserFirstCallInit'][] = 'LogEntryHooks::register';
6262
6363 // Register the LogEntry special page
64 -$wgSpecialPages['LogEntry'] = 'LogEntry';
 64+$wgSpecialPages['LogEntry'] = 'SpecialLogEntry';

Status & tagging log