Revert 15644; extensions need to remain self-contained
[toast/cookiecaptcha.git] / ConfirmEdit.php
index 3d4c23a0f9e15fc5368b506b71189decf4235c6e..46b99e8be90f061c6d70b2c4110548ad2c2d1ece 100644 (file)
@@ -34,9 +34,6 @@ global $wgExtensionFunctions, $wgGroupPermissions;
 $wgExtensionFunctions[] = 'ceSetup';
 
 # Internationalisation file
-if ( !function_exists( 'extAddMessages' ) ) {
-       require( dirname(__FILE__) . '/../ExtensionFunctions.php' );
-}
 require_once( 'ConfirmEdit.i18n.php' );
 
 /**
@@ -110,8 +107,10 @@ $wgSpecialPages['Captcha'] = array( /*class*/ 'SpecialPage', /*name*/'Captcha',
  */
 function ceSetup() {
        # Add messages
-       global $wgConfirmEditMessages;
-       extAddMessages( $wgConfirmEditMessages );
+       global $wgMessageCache, $wgConfirmEditMessages;
+       foreach( $wgConfirmEditMessages as $key => $value ) {
+               $wgMessageCache->addMessages( $wgConfirmEditMessages[$key], $key );
+       }
        
        global $wgHooks, $wgCaptcha, $wgCaptchaClass, $wgSpecialPages;
        $wgCaptcha = new $wgCaptchaClass();