mirror of
https://github.com/scratchfoundation/swiki-confirmaccount.git
synced 2024-12-04 21:01:02 -05:00
fixed an installation glitch
This commit is contained in:
parent
8768a7ae96
commit
60576cf843
2 changed files with 100 additions and 81 deletions
|
@ -1,81 +1,91 @@
|
||||||
<?php
|
<?php
|
||||||
/*
|
|
||||||
(c) Aaron Schulz 2007, GPL
|
/*
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
(c) Aaron Schulz 2007, GPL
|
||||||
it under the terms of the GNU General Public License as published by
|
This program is free software; you can redistribute it and/or modify
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
it under the terms of the GNU General Public License as published by
|
||||||
(at your option) any later version.
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
This program is distributed in the hope that it will be useful,
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
GNU General Public License for more details.
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
You should have received a copy of the GNU General Public License along
|
|
||||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
You should have received a copy of the GNU General Public License along
|
||||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
http://www.gnu.org/copyleft/gpl.html
|
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
http://www.gnu.org/copyleft/gpl.html
|
||||||
|
|
||||||
if ( !defined( 'MEDIAWIKI' ) ) {
|
*/
|
||||||
echo "ConfirmAccount extension\n";
|
|
||||||
exit( 1 ) ;
|
if ( !defined( 'MEDIAWIKI' ) ) {
|
||||||
}
|
echo "ConfirmAccount extension\n";
|
||||||
|
exit( 1 ) ;
|
||||||
$wgExtensionCredits['specialpage'][] = array(
|
}
|
||||||
'path' => __FILE__,
|
|
||||||
'name' => 'Confirm User Accounts',
|
$wgExtensionCredits['specialpage'][] = array(
|
||||||
'descriptionmsg' => 'confirmedit-desc',
|
'path' => __FILE__,
|
||||||
'author' => 'Aaron Schulz and Jacob G.',
|
'name' => 'Confirm User Accounts',
|
||||||
'url' => 'https://www.mediawiki.org/wiki/Extension:ConfirmAccount',
|
'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' );
|
|
||||||
|
# Load default config variables
|
||||||
# Define were PHP files and i18n files are located
|
require( dirname( __FILE__ ) . '/ConfirmAccount.config.php' );
|
||||||
require( dirname( __FILE__ ) . '/ConfirmAccount.setup.php' );
|
|
||||||
ConfirmAccountSetup::defineSourcePaths( $wgAutoloadClasses, $wgExtensionMessagesFiles );
|
# Define were PHP files and i18n files are located
|
||||||
|
require( dirname( __FILE__ ) . '/ConfirmAccount.setup.php' );
|
||||||
# Define JS/CSS modules and file locations
|
|
||||||
ConfirmAccountUISetup::defineResourceModules( $wgResourceModules );
|
ConfirmAccountSetup::defineSourcePaths( $wgAutoloadClasses, $wgExtensionMessagesFiles );
|
||||||
|
|
||||||
# Let some users confirm account requests and view credentials for created accounts
|
# Define JS/CSS modules and file locations
|
||||||
$wgAvailableRights[] = 'confirmaccount'; // user can confirm account requests
|
require( dirname( __FILE__ ) . '/frontend/ConfirmAccountUI.setup.php' );
|
||||||
$wgAvailableRights[] = 'requestips'; // user can see IPs in request queue
|
ConfirmAccountUISetup::defineResourceModules( $wgResourceModules );
|
||||||
$wgAvailableRights[] = 'lookupcredentials'; // user can lookup info on confirmed users
|
|
||||||
|
# Let some users confirm account requests and view credentials for created accounts
|
||||||
# Actually register special pages
|
$wgAvailableRights[] = 'confirmaccount'; // user can confirm account requests
|
||||||
ConfirmAccountUISetup::defineSpecialPages( $wgSpecialPages, $wgSpecialPageGroups );
|
$wgAvailableRights[] = 'requestips'; // user can see IPs in request queue
|
||||||
|
$wgAvailableRights[] = 'lookupcredentials'; // user can lookup info on confirmed users
|
||||||
# ####### HOOK CALLBACK FUNCTIONS #########
|
|
||||||
|
# Actually register special pages
|
||||||
# UI-related hook handlers
|
ConfirmAccountUISetup::defineSpecialPages( $wgSpecialPages, $wgSpecialPageGroups );
|
||||||
ConfirmAccountUISetup::defineHookHandlers( $wgHooks );
|
|
||||||
|
# ####### HOOK CALLBACK FUNCTIONS #########
|
||||||
# Check for account name collisions
|
|
||||||
$wgHooks['AbortNewAccount'][] = 'ConfirmAccountUIHooks::checkIfAccountNameIsPending';
|
# UI-related hook handlers
|
||||||
|
ConfirmAccountUISetup::defineHookHandlers( $wgHooks );
|
||||||
# Schema changes
|
|
||||||
$wgHooks['LoadExtensionSchemaUpdates'][] = 'ConfirmAccountUpdaterHooks::addSchemaUpdates';
|
# Check for account name collisions
|
||||||
|
$wgHooks['AbortNewAccount'][] = 'ConfirmAccountUIHooks::checkIfAccountNameIsPending';
|
||||||
# ####### END HOOK CALLBACK FUNCTIONS #########
|
|
||||||
|
# Schema changes
|
||||||
# Load the extension after setup is finished
|
$wgHooks['LoadExtensionSchemaUpdates'][] = 'ConfirmAccountUpdaterHooks::addSchemaUpdates';
|
||||||
$wgExtensionFunctions[] = 'efLoadConfirmAccount';
|
|
||||||
|
# ####### END HOOK CALLBACK FUNCTIONS #########
|
||||||
/**
|
|
||||||
* This function is for setup that has to happen in Setup.php
|
# Load the extension after setup is finished
|
||||||
* when the functions in $wgExtensionFunctions get executed.
|
$wgExtensionFunctions[] = 'efLoadConfirmAccount';
|
||||||
* @return void
|
|
||||||
*/
|
/**
|
||||||
function efLoadConfirmAccount() {
|
|
||||||
global $wgEnableEmail;
|
* This function is for setup that has to happen in Setup.php
|
||||||
# This extension needs email enabled!
|
* when the functions in $wgExtensionFunctions get executed.
|
||||||
# Otherwise users can't get their passwords...
|
* @return void
|
||||||
if ( !$wgEnableEmail ) {
|
|
||||||
echo "ConfirmAccount extension requires \$wgEnableEmail set to true.\n";
|
*/
|
||||||
exit( 1 ) ;
|
|
||||||
}
|
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 ) ;
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -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".',
|
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}}.
|
'acct_request_throttle_hit' => 'Perdón, ya has solicitado {{PLURAL:$1|1 cuenta|$1 cuentas}}.
|
||||||
No puedes hacer ninguna otra solicitud.',
|
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:<br />\'\'\'$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)
|
/** Estonian (eesti)
|
||||||
|
|
Loading…
Reference in a new issue