From 60576cf84305b519556d75db77bcaf7e919f549c Mon Sep 17 00:00:00 2001 From: Jacob G Date: Mon, 28 Dec 2015 18:39:35 -0500 Subject: [PATCH] fixed an installation glitch --- ConfirmAccount/ConfirmAccount.php | 172 +++++++++--------- .../language/RequestAccountPage.i18n.php | 9 + 2 files changed, 100 insertions(+), 81 deletions(-) diff --git a/ConfirmAccount/ConfirmAccount.php b/ConfirmAccount/ConfirmAccount.php index c511663..4ce5de9 100644 --- a/ConfirmAccount/ConfirmAccount.php +++ b/ConfirmAccount/ConfirmAccount.php @@ -1,81 +1,91 @@ - __FILE__, - 'name' => 'Confirm User Accounts', - 'descriptionmsg' => 'confirmedit-desc', - 'author' => 'Aaron Schulz and Jacob G.', - 'url' => 'https://www.mediawiki.org/wiki/Extension:ConfirmAccount', -); - -# Load default config variables -require( dirname( __FILE__ ) . '/ConfirmAccount.config.php' ); - -# Define were PHP files and i18n files are located -require( dirname( __FILE__ ) . '/ConfirmAccount.setup.php' ); -ConfirmAccountSetup::defineSourcePaths( $wgAutoloadClasses, $wgExtensionMessagesFiles ); - -# Define JS/CSS modules and file locations -ConfirmAccountUISetup::defineResourceModules( $wgResourceModules ); - -# Let some users confirm account requests and view credentials for created accounts -$wgAvailableRights[] = 'confirmaccount'; // user can confirm account requests -$wgAvailableRights[] = 'requestips'; // user can see IPs in request queue -$wgAvailableRights[] = 'lookupcredentials'; // user can lookup info on confirmed users - -# Actually register special pages -ConfirmAccountUISetup::defineSpecialPages( $wgSpecialPages, $wgSpecialPageGroups ); - -# ####### HOOK CALLBACK FUNCTIONS ######### - -# UI-related hook handlers -ConfirmAccountUISetup::defineHookHandlers( $wgHooks ); - -# Check for account name collisions -$wgHooks['AbortNewAccount'][] = 'ConfirmAccountUIHooks::checkIfAccountNameIsPending'; - -# Schema changes -$wgHooks['LoadExtensionSchemaUpdates'][] = 'ConfirmAccountUpdaterHooks::addSchemaUpdates'; - -# ####### END HOOK CALLBACK FUNCTIONS ######### - -# Load the extension after setup is finished -$wgExtensionFunctions[] = 'efLoadConfirmAccount'; - -/** - * This function is for setup that has to happen in Setup.php - * when the functions in $wgExtensionFunctions get executed. - * @return void - */ -function efLoadConfirmAccount() { - global $wgEnableEmail; - # This extension needs email enabled! - # Otherwise users can't get their passwords... - if ( !$wgEnableEmail ) { - echo "ConfirmAccount extension requires \$wgEnableEmail set to true.\n"; - exit( 1 ) ; - } -} + __FILE__, + 'name' => 'Confirm User Accounts', + 'descriptionmsg' => 'confirmedit-desc', + 'author' => 'Aaron Schulz and Jacob G.', + 'url' => 'https://www.mediawiki.org/wiki/Extension:ConfirmAccount', +); + +# Load default config variables +require( dirname( __FILE__ ) . '/ConfirmAccount.config.php' ); + +# Define were PHP files and i18n files are located +require( dirname( __FILE__ ) . '/ConfirmAccount.setup.php' ); + +ConfirmAccountSetup::defineSourcePaths( $wgAutoloadClasses, $wgExtensionMessagesFiles ); + +# Define JS/CSS modules and file locations +require( dirname( __FILE__ ) . '/frontend/ConfirmAccountUI.setup.php' ); +ConfirmAccountUISetup::defineResourceModules( $wgResourceModules ); + +# Let some users confirm account requests and view credentials for created accounts +$wgAvailableRights[] = 'confirmaccount'; // user can confirm account requests +$wgAvailableRights[] = 'requestips'; // user can see IPs in request queue +$wgAvailableRights[] = 'lookupcredentials'; // user can lookup info on confirmed users + +# Actually register special pages +ConfirmAccountUISetup::defineSpecialPages( $wgSpecialPages, $wgSpecialPageGroups ); + +# ####### HOOK CALLBACK FUNCTIONS ######### + +# UI-related hook handlers +ConfirmAccountUISetup::defineHookHandlers( $wgHooks ); + +# Check for account name collisions +$wgHooks['AbortNewAccount'][] = 'ConfirmAccountUIHooks::checkIfAccountNameIsPending'; + +# Schema changes +$wgHooks['LoadExtensionSchemaUpdates'][] = 'ConfirmAccountUpdaterHooks::addSchemaUpdates'; + +# ####### END HOOK CALLBACK FUNCTIONS ######### + +# Load the extension after setup is finished +$wgExtensionFunctions[] = 'efLoadConfirmAccount'; + +/** + + * This function is for setup that has to happen in Setup.php + * when the functions in $wgExtensionFunctions get executed. + * @return void + + */ + +function efLoadConfirmAccount() { + global $wgEnableEmail; + + # This extension needs email enabled! + # Otherwise users can't get their passwords... + + /*if ( !$wgEnableEmail ) { + echo "ConfirmAccount extension requires \$wgEnableEmail set to true.\n"; + exit( 1 ) ; + }*/ +} + diff --git a/ConfirmAccount/frontend/language/RequestAccountPage.i18n.php b/ConfirmAccount/frontend/language/RequestAccountPage.i18n.php index 2c3adf9..2fa354e 100644 --- a/ConfirmAccount/frontend/language/RequestAccountPage.i18n.php +++ b/ConfirmAccount/frontend/language/RequestAccountPage.i18n.php @@ -1123,6 +1123,15 @@ Este código de confirmación caducará el $4.', La dirección de correo electrónico ha sido confirmada. Puedes confirmar la solicitud aquí "$2".', 'acct_request_throttle_hit' => 'Perdón, ya has solicitado {{PLURAL:$1|1 cuenta|$1 cuentas}}. No puedes hacer ninguna otra solicitud.', + +//Scratch-specific stuff + 'requestaccount-user-verification' => 'Verificion de usuario', + 'requestaccount-code-troubleshoot' => '\'\'\'Aviso:\'\'\' Si tienes problemas con el sistema de verificacion, por favor lee la [[Scratch_Wiki:Become a contributor/Verification code troubleshooting|pagina de soluciones]].', + 'requestaccount-set-pwd' => 'Decide la contrasena', + 'requestaccount-project-info' => 'Por favor ve al [$1 proyecto de verificacion] y comenta el codigo siguiente:
\'\'\'$2\'\'\'', + 'requestaccount-project-link' => 'http://scratch.mit.edu/projects/10135908/', + 'requestaccount-nocomment-error' => 'No aparece como hayas comentado el codigo.', + 'requestaccount-api-failed' => 'Estamos teniendo problemas con el servidor. Por favor trata de registrarte otra vez en un tiempo diferente.', ); /** Estonian (eesti)