mirror of
https://github.com/scratchfoundation/swiki-confirmaccount.git
synced 2024-12-04 21:01:02 -05:00
This commit is contained in:
parent
e34ad0912e
commit
9cd536b43a
4 changed files with 24 additions and 5 deletions
|
@ -46,6 +46,8 @@ class AccountConfirmSubmission {
|
|||
return $this->holdRequest( $context );
|
||||
} elseif ( $this->action === 'accept' ) {
|
||||
return $this->acceptRequest( $context );
|
||||
} elseif ($this->action === 'delete') {
|
||||
return $this->deleteRequest($context);
|
||||
} else {
|
||||
return array( 'accountconf_bad_action', $context->msg( 'confirmaccount-badaction' )->escaped() );
|
||||
}
|
||||
|
@ -65,6 +67,17 @@ class AccountConfirmSubmission {
|
|||
return array( true, null );
|
||||
}
|
||||
|
||||
protected function deleteRequest( IContextSource $context ) {
|
||||
$dbw = wfGetDB( DB_MASTER );
|
||||
$dbw->begin();
|
||||
|
||||
$ok = $this->accountReq->remove();
|
||||
ConfirmAccount::clearAccountRequestCountCache();
|
||||
|
||||
$dbw->commit();
|
||||
return array( true, null );
|
||||
}
|
||||
|
||||
protected function rejectRequest( IContextSource $context ) {
|
||||
$dbw = wfGetDB( DB_MASTER );
|
||||
$dbw->begin();
|
||||
|
|
|
@ -104,7 +104,7 @@ class AccountRequestSubmission {
|
|||
foreach ($matches[2] as $key => $val) {
|
||||
$user = $matches[1][$key];
|
||||
$comment = trim($val);
|
||||
if (strtolower($user) == strtolower($this->userName) && $comment == $code) {
|
||||
if (strtolower($user) == strtolower(htmlspecialchars($this->userName)) && strstr($comment, $code)) {
|
||||
$success = true;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -139,6 +139,7 @@ There may be contact lists on site that you can use if you want to know more abo
|
|||
$2
|
||||
|
||||
There may be contact lists on site that you can use if you want to know more about user account policy.',
|
||||
|
||||
);
|
||||
|
||||
/** Message documentation (Message documentation)
|
||||
|
@ -5726,7 +5727,7 @@ $2
|
|||
Aquò permet d’èsser sus la tièra dels contactes del site, se ne desiratz saber mai sus las règlas que concernisson los comptes.',
|
||||
);
|
||||
|
||||
/** Oriya (ଓଡ଼ିଆ)
|
||||
/** Oriya (ଓଡ଼ିଆ)
|
||||
* @author Odisha1
|
||||
*/
|
||||
$messages['or'] = array(
|
||||
|
|
|
@ -435,9 +435,14 @@ class ConfirmAccountsPage extends SpecialPage {
|
|||
$form .= "<td>" . Xml::radio( 'wpSubmitType', 'hold', $this->submitType == 'hold',
|
||||
array( 'id' => 'submitHold', 'onclick' => 'document.getElementById("wpComment").style.display="block"' ) );
|
||||
$form .= ' ' . Xml::label( $this->msg( 'confirmaccount-hold' )->text(), 'submitHold' ) . "</td>\n";
|
||||
$form .= "<td>" . Xml::radio( 'wpSubmitType', 'spam', $this->submitType == 'spam',
|
||||
array( 'id' => 'submitSpam', 'onclick' => 'document.getElementById("wpComment").style.display="none"' ) );
|
||||
$form .= ' ' . Xml::label( $this->msg( 'confirmaccount-spam' )->text(), 'submitSpam' ) . "</td>\n";
|
||||
if ($rejectTimestamp || $heldTimestamp) {
|
||||
$form .= "<td>" . Xml::radio( 'wpSubmitType', 'delete', $this->submitType == 'delete',
|
||||
array( 'id' => 'submitDelete', 'onclick' => 'document.getElementById("wpComment").style.display="block"' ) );
|
||||
$form .= ' ' . Xml::label( $this->msg( 'delete' )->text(), 'submitDelete' ) . "</td>\n";
|
||||
}
|
||||
//$form .= "<td>" . Xml::radio( 'wpSubmitType', 'spam', $this->submitType == 'spam',
|
||||
// array( 'id' => 'submitSpam', 'onclick' => 'document.getElementById("wpComment").style.display="none"' ) );
|
||||
//$form .= ' ' . Xml::label( $this->msg( 'confirmaccount-spam' )->text(), 'submitSpam' ) . "</td>\n";
|
||||
$form .= "</tr></table>";
|
||||
$form .= "<div id='wpComment'><p>" . $this->msg( 'confirmaccount-reason' )->escaped() . "</p>\n";
|
||||
$form .= "<p><textarea name='wpReason' id='wpReason' rows='3' cols='80' style='width:80%; display=block;'>" .
|
||||
|
|
Loading…
Reference in a new issue