r26696 - Code Review

From MediaWiki.org

Jump to: navigation, search
Repository:MediaWiki
Revision:r26695 | r26696 (on ViewVC) | r26697 >
Date:11:38, 13 October 2007
Author:daniel
Status:ok
Tags:
Comment:ContactPage now supports LoadAllMessages hook
Modified paths:

Diff [purge]

Index: trunk/extensions/ContactPage/ContactPage.php
===================================================================
--- trunk/extensions/ContactPage/ContactPage.php	(revision 26695)
+++ trunk/extensions/ContactPage/ContactPage.php	(revision 26696)
@@ -25,6 +25,8 @@
 $wgAutoloadClasses['SpecialContact'] = dirname( __FILE__ ) . '/SpecialContact.php';
 $wgSpecialPages['Contact'] = 'SpecialContact';
 
+$wgHooks['LoadAllMessages'][] = 'loadContactPageI18n';
+
 $wgContactUser = NULL;
 $wgContactSender = 'apache@' . $wgServerName;
 $wgContactSenderName = 'Contact Form on ' . $wgSitename;
@@ -37,7 +39,7 @@
 
 	static $initialized = false;
 
-	if ( $initialized ) return;
+	if ( $initialized ) return true;
 
 	$messages= array();
 	
@@ -49,5 +51,7 @@
 	
 	$initialized = true;
 	$wgMessageCache->addMessages( $messages );
+
+	return true;
 }
 
Views
Toolbox