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/business/AccountConfirmSubmission.php b/ConfirmAccount/business/AccountConfirmSubmission.php index f0af483..231ba45 100644 --- a/ConfirmAccount/business/AccountConfirmSubmission.php +++ b/ConfirmAccount/business/AccountConfirmSubmission.php @@ -294,10 +294,10 @@ class AccountConfirmSubmission { } # Actually send out the email (@TODO: rollback on failure including $wgAuth) - $result = $user->sendMail( + /*$result = $user->sendMail( $context->msg( 'confirmaccount-email-subj' )->inContentLanguage()->text(), $ebody - ); + );*/ # Update user count $ssUpdate = new SiteStatsUpdate( 0, 0, 0, 0, 1 ); diff --git a/ConfirmAccount/business/AccountRequestSubmission.php b/ConfirmAccount/business/AccountRequestSubmission.php index e0452cd..e4194a6 100644 --- a/ConfirmAccount/business/AccountRequestSubmission.php +++ b/ConfirmAccount/business/AccountRequestSubmission.php @@ -112,7 +112,7 @@ class AccountRequestSubmission { return; } $success = false; - preg_match_all('%
\'\'\'$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) diff --git a/ConfirmAccount/frontend/specialpages/actions/ConfirmAccount_body.php b/ConfirmAccount/frontend/specialpages/actions/ConfirmAccount_body.php index 696e4c4..026d539 100644 --- a/ConfirmAccount/frontend/specialpages/actions/ConfirmAccount_body.php +++ b/ConfirmAccount/frontend/specialpages/actions/ConfirmAccount_body.php @@ -421,6 +421,20 @@ class ConfirmAccountsPage extends SpecialPage { } $form .= ''; } + + //search for possible alt accounts + $ip = $accountReq->getIP(); + $alts = $this->getUsersFromIP($ip); + if (!empty($alts)) { + foreach ($alts as &$user) { + + } + $form .= ''; + } $form .= '