From 888eab1a076a287bddd84fdf9dd9c57154c91e3f Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 27 Nov 2014 06:08:05 +0100 Subject: Update to MediaWiki 1.22.14 --- extensions/ConfirmEdit/Asirra.class.php | 55 --------------------------------- 1 file changed, 55 deletions(-) delete mode 100644 extensions/ConfirmEdit/Asirra.class.php (limited to 'extensions/ConfirmEdit/Asirra.class.php') diff --git a/extensions/ConfirmEdit/Asirra.class.php b/extensions/ConfirmEdit/Asirra.class.php deleted file mode 100644 index ae1178a1..00000000 --- a/extensions/ConfirmEdit/Asirra.class.php +++ /dev/null @@ -1,55 +0,0 @@ -asirra_localpath = "$wgExtensionAssetsPath/ConfirmEdit"; - } - - function getForm() { - global $wgOut; - - $wgOut->addModules( 'ext.confirmEdit.asirra' ); - $js = Html::linkedScript( $this->asirra_clientscript ); - - $message = Xml::encodeJsVar( wfMessage( 'asirra-createaccount-fail' )->plain() ); - $js .= Html::inlineScript( <<parse() . ''; - return $js; - } - - function getMessage( $action ) { - $name = 'asirra-' . $action; - $text = wfMessage( $name )->text(); - # Obtain a more tailored message, if possible, otherwise, fall - # back to the default for edits - return wfMessage( $name, $text )->isDisabled() ? wfMessage( 'asirra-edit' )->text() : $text; - } - - function passCaptcha() { - global $wgRequest; - - $ticket = $wgRequest->getVal( 'Asirra_Ticket' ); - $api = 'http://challenge.asirra.com/cgi/Asirra?'; - $params = array( - 'action' => 'ValidateTicket', - 'ticket' => $ticket, - ); - - $response = Http::get( $api . wfArrayToCgi( $params ) ); - $xml = simplexml_load_string( $response ); - $result = $xml->xpath( '/AsirraValidation/Result' ); - return strval( $result[0] ) === 'Pass'; - } -} -- cgit v1.2.2