r53477 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53476‎ | r53477 | r53478 >
Date:15:13, 19 July 2009
Author:siebrand
Status:deferred
Tags:
Comment:
* Update messages for QuestyCaptcha
* stylize.php and trailing whitespace removed for ConfirmEdit
* add support for QuestyCaptcha to Translate
* svn execute bits removed
Modified paths:
  • /trunk/extensions/ConfirmEdit/ConfirmEdit.i18n.php (modified) (history)
  • /trunk/extensions/ConfirmEdit/ConfirmEdit.php (modified) (history)
  • /trunk/extensions/ConfirmEdit/ConfirmEdit_body.php (modified) (history)
  • /trunk/extensions/ConfirmEdit/FancyCaptcha.class.php (modified) (history)
  • /trunk/extensions/ConfirmEdit/FancyCaptcha.i18n.php (modified) (history)
  • /trunk/extensions/ConfirmEdit/FancyCaptcha.php (modified) (history)
  • /trunk/extensions/ConfirmEdit/MathCaptcha (modified) (history)
  • /trunk/extensions/ConfirmEdit/MathCaptcha.class.php (modified) (history)
  • /trunk/extensions/ConfirmEdit/MathCaptcha.php (modified) (history)
  • /trunk/extensions/ConfirmEdit/QuestyCaptcha.class.php (modified) (history)
  • /trunk/extensions/ConfirmEdit/QuestyCaptcha.i18n.php (modified) (history)
  • /trunk/extensions/ConfirmEdit/QuestyCaptcha.php (modified) (history)
  • /trunk/extensions/Translate/groups/mediawiki-defines.txt (modified) (history)

Diff [purge]

Index: trunk/extensions/ConfirmEdit/QuestyCaptcha.i18n.php
@@ -9,20 +9,20 @@
1010
1111 /** English */
1212 $messages['en'] = array(
13 - 'questycaptcha-desc' => 'Questy captcha generator for Confirm Edit',
14 - 'questycaptcha-addurl' => 'Your edit includes new external links.
 13+ 'questycaptcha-desc' => 'Questy captcha generator for Confirm Edit',
 14+ 'questycaptcha-addurl' => 'Your edit includes new external links.
1515 To help protect against automated spam, please answer the question that appears below ([[Special:Captcha/help|more info]]):',
16 - 'questycaptcha-badlogin' => 'To help protect against automated password cracking, please answer the question that appears below ([[Special:Captcha/help|more info]]):',
 16+ 'questycaptcha-badlogin' => 'To help protect against automated password cracking, please answer the question that appears below ([[Special:Captcha/help|more info]]):',
1717 'questycaptcha-createaccount' => 'To help protect against automated account creation, please answer the question that appears below ([[Special:Captcha/help|more info]]):',
18 - 'questycaptcha-create' => 'To create the page, please answer the question that appears below ([[Special:Captcha/help|more info]]):',
19 - 'questycaptcha-edit' => 'To edit this page, please answer the question that appears below ([[Special:Captcha/help|more info]]):',
20 - 'questycaptchahelp-text' => "Web sites that accept postings from the public, like this wiki, are often abused by spammers who use automated tools to post their links to many sites.
 18+ 'questycaptcha-create' => 'To create the page, please answer the question that appears below ([[Special:Captcha/help|more info]]):',
 19+ 'questycaptcha-edit' => 'To edit this page, please answer the question that appears below ([[Special:Captcha/help|more info]]):',
 20+ 'questycaptchahelp-text' => "Web sites that accept contributions from the public, like this wiki, are often abused by spammers who use automated tools to add their links to many sites.
2121 While these spam links can be removed, they are a significant nuisance.
2222
2323 Sometimes, especially when adding new web links to a page, the wiki may ask you to answer a question.
24 -Since this is a task that's hard to automate, it will allow most real humans to make their posts while stopping most spammers and other robotic attackers.
 24+Since this is a task that is hard to automate, it will allow most real humans to make their contributions while stopping most spammers and other robotic attackers.
2525
26 -Please contact the [[{{MediaWiki:Grouppage-sysop}}|site administrators]] for assistance if this is unexpectedly preventing you from making legitimate posts.
 26+Please contact the [[{{MediaWiki:Grouppage-sysop}}|site administrators]] for assistance if this is unexpectedly preventing you from making legitimate contributions.
2727
28 -Hit the 'back' button in your browser to return to the page editor.",
29 -);
\ No newline at end of file
 28+Click the 'back' button in your browser to return to the page editor.",
 29+);
Property changes on: trunk/extensions/ConfirmEdit/QuestyCaptcha.i18n.php
___________________________________________________________________
Name: svn:executable
3030 - *
Index: trunk/extensions/ConfirmEdit/MathCaptcha.php
@@ -10,9 +10,9 @@
1111 * @licence GNU General Public Licence 2.0
1212 */
1313
14 -if( !defined( 'MEDIAWIKI' ) ) {
 14+if ( !defined( 'MEDIAWIKI' ) ) {
1515 echo( "This file is an extension to the MediaWiki software and cannot be used standalone.\n" );
1616 die( 1 );
1717 }
 18+
1819 $wgAutoloadClasses['MathCaptcha'] = dirname( __FILE__ ) . '/MathCaptcha.class.php';
19 -
Index: trunk/extensions/ConfirmEdit/QuestyCaptcha.php
@@ -29,11 +29,10 @@
3030
3131 global $wgCaptchaQuestions;
3232 $wgCaptchaQuestions = array();
33 -//$wgCaptchaQuestions[] = array( 'question' => "A question?", 'answer' => "An answer!" );
34 -//$wgCaptchaQuestions[] = array( 'question' => 'How much wood would a woodchuck chuck if a woodchuck could chuck wood?', 'answer' => 'as much wood as...' );
35 -//$wgCaptchaQuestions[] = array( 'question' => "What is this wiki's name?", 'answer' => "$wgSitename" );
36 -//add your questions in LocalSettings.php using this format
 33+// $wgCaptchaQuestions[] = array( 'question' => "A question?", 'answer' => "An answer!" );
 34+// $wgCaptchaQuestions[] = array( 'question' => 'How much wood would a woodchuck chuck if a woodchuck could chuck wood?', 'answer' => 'as much wood as...' );
 35+// $wgCaptchaQuestions[] = array( 'question' => "What is this wiki's name?", 'answer' => "$wgSitename" );
 36+// add your questions in LocalSettings.php using this format
3737
38 -$wgExtensionMessagesFiles['QuestyCaptcha'] = dirname(__FILE__).'/QuestyCaptcha.i18n.php';
 38+$wgExtensionMessagesFiles['QuestyCaptcha'] = dirname( __FILE__ ) . '/QuestyCaptcha.i18n.php';
3939 $wgAutoloadClasses['QuestyCaptcha'] = dirname( __FILE__ ) . '/QuestyCaptcha.class.php';
40 -
Property changes on: trunk/extensions/ConfirmEdit/QuestyCaptcha.php
___________________________________________________________________
Name: svn:executable
4140 - *
Index: trunk/extensions/ConfirmEdit/ConfirmEdit_body.php
@@ -22,7 +22,7 @@
2323 static function confirmEditMerged( $editPage, $newtext ) {
2424 return self::getInstance()->confirmEditMerged( $editPage, $newtext );
2525 }
26 -
 26+
2727 static function confirmEditAPI( &$editPage, $newtext, &$resultArr ) {
2828 return self::getInstance()->confirmEditAPI( $editPage, $newtext, $resultArr );
2929 }
@@ -54,7 +54,7 @@
5555 $instance = ConfirmEditHooks::getInstance();
5656 switch( $par ) {
5757 case "image":
58 - if( method_exists($instance,'showImage') )
 58+ if ( method_exists( $instance, 'showImage' ) )
5959 return $instance->showImage();
6060 case "help":
6161 default:
@@ -63,24 +63,23 @@
6464 }
6565 }
6666
67 -
6867 class SimpleCaptcha {
6968 function SimpleCaptcha() {
7069 global $wgCaptchaStorageClass;
7170 $this->storage = new $wgCaptchaStorageClass;
7271 }
73 -
 72+
7473 function getCaptcha() {
75 - $a = mt_rand(0, 100);
76 - $b = mt_rand(0, 10);
77 - $op = mt_rand(0, 1) ? '+' : '-';
 74+ $a = mt_rand( 0, 100 );
 75+ $b = mt_rand( 0, 10 );
 76+ $op = mt_rand( 0, 1 ) ? '+' : '-';
7877
7978 $test = "$a $op $b";
80 - $answer = ($op == '+') ? ($a + $b) : ($a - $b);
81 - return array('question' => $test, 'answer' => $answer);
 79+ $answer = ( $op == '+' ) ? ( $a + $b ) : ( $a - $b );
 80+ return array( 'question' => $test, 'answer' => $answer );
8281 }
83 -
84 - function addCaptchaAPI(&$resultArr) {
 82+
 83+ function addCaptchaAPI( &$resultArr ) {
8584 $captcha = $this->getCaptcha();
8685 $index = $this->storeCaptcha( $captcha );
8786 $resultArr['captcha']['type'] = 'simple';
@@ -88,7 +87,7 @@
8988 $resultArr['captcha']['id'] = $index;
9089 $resultArr['captcha']['question'] = $captcha['question'];
9190 }
92 -
 91+
9392 /**
9493 * Insert a captcha prompt into the edit form.
9594 * This sample implementation generates a simple arithmetic operation;
@@ -147,8 +146,8 @@
148147 */
149148 function injectUserCreate( &$template ) {
150149 global $wgCaptchaTriggers, $wgOut, $wgUser;
151 - if( $wgCaptchaTriggers['createaccount'] ) {
152 - if( $wgUser->isAllowed( 'skipcaptcha' ) ) {
 150+ if ( $wgCaptchaTriggers['createaccount'] ) {
 151+ if ( $wgUser->isAllowed( 'skipcaptcha' ) ) {
153152 wfDebug( "ConfirmEdit: user group allows skipping captcha on account creation\n" );
154153 return true;
155154 }
@@ -169,7 +168,7 @@
170169 * @return bool true to keep running callbacks
171170 */
172171 function injectUserLogin( &$template ) {
173 - if( $this->isBadLoginTriggered() ) {
 172+ if ( $this->isBadLoginTriggered() ) {
174173 global $wgOut;
175174 $template->set( 'header',
176175 "<div class='captcha'>" .
@@ -179,7 +178,7 @@
180179 }
181180 return true;
182181 }
183 -
 182+
184183 /**
185184 * When a bad login attempt is made, increment an expiring counter
186185 * in the memcache cloud. Later checks for this may trigger a
@@ -191,17 +190,17 @@
192191 */
193192 function triggerUserLogin( $user, $password, $retval ) {
194193 global $wgCaptchaTriggers, $wgCaptchaBadLoginExpiration, $wgMemc;
195 - if( $retval == LoginForm::WRONG_PASS && $wgCaptchaTriggers['badlogin'] ) {
 194+ if ( $retval == LoginForm::WRONG_PASS && $wgCaptchaTriggers['badlogin'] ) {
196195 $key = $this->badLoginKey();
197196 $count = $wgMemc->get( $key );
198 - if( !$count ) {
 197+ if ( !$count ) {
199198 $wgMemc->add( $key, 0, $wgCaptchaBadLoginExpiration );
200199 }
201200 $count = $wgMemc->incr( $key );
202201 }
203202 return true;
204203 }
205 -
 204+
206205 /**
207206 * Check if a bad login has already been registered for this
208207 * IP address. If so, require a captcha.
@@ -212,13 +211,13 @@
213212 global $wgMemc, $wgCaptchaBadLoginAttempts;
214213 return intval( $wgMemc->get( $this->badLoginKey() ) ) >= $wgCaptchaBadLoginAttempts;
215214 }
216 -
 215+
217216 /**
218217 * Check if the IP is allowed to skip captchas
219218 */
220219 function isIPWhitelisted() {
221220 global $wgCaptchaWhitelistIP;
222 - if( $wgCaptchaWhitelistIP ) {
 221+ if ( $wgCaptchaWhitelistIP ) {
223222 $ip = wfGetIp();
224223 foreach ( $wgCaptchaWhitelistIP as $range ) {
225224 if ( IP::isInRange( $ip, $range ) ) {
@@ -228,7 +227,7 @@
229228 }
230229 return false;
231230 }
232 -
 231+
233232 /**
234233 * Internal cache key for badlogin checks.
235234 * @return string
@@ -237,7 +236,7 @@
238237 function badLoginKey() {
239238 return wfMemcKey( 'captcha', 'badlogin', 'ip', wfGetIP() );
240239 }
241 -
 240+
242241 /**
243242 * Check if the submitted form matches the captcha session data provided
244243 * by the plugin when the form was generated.
@@ -259,16 +258,15 @@
260259 * @param string $action (edit/create/addurl...)
261260 * @return bool true if action triggers captcha on editPage's namespace
262261 */
263 - function captchaTriggers( &$editPage, $action) {
264 - global $wgCaptchaTriggers, $wgCaptchaTriggersOnNamespace;
265 - //Special config for this NS?
266 - if (isset( $wgCaptchaTriggersOnNamespace[$editPage->mTitle->getNamespace()][$action] ) )
 262+ function captchaTriggers( &$editPage, $action ) {
 263+ global $wgCaptchaTriggers, $wgCaptchaTriggersOnNamespace;
 264+ // Special config for this NS?
 265+ if ( isset( $wgCaptchaTriggersOnNamespace[$editPage->mTitle->getNamespace()][$action] ) )
267266 return $wgCaptchaTriggersOnNamespace[$editPage->mTitle->getNamespace()][$action];
268267
269 - return ( !empty( $wgCaptchaTriggers[$action] ) ); //Default
 268+ return ( !empty( $wgCaptchaTriggers[$action] ) ); // Default
270269 }
271270
272 -
273271 /**
274272 * @param EditPage $editPage
275273 * @param string $newtext
@@ -280,22 +278,22 @@
281279 $title = $editPage->mArticle->getTitle();
282280
283281 global $wgUser;
284 - if( $wgUser->isAllowed( 'skipcaptcha' ) ) {
 282+ if ( $wgUser->isAllowed( 'skipcaptcha' ) ) {
285283 wfDebug( "ConfirmEdit: user group allows skipping captcha\n" );
286284 return false;
287285 }
288 - if( $this->isIPWhitelisted() )
 286+ if ( $this->isIPWhitelisted() )
289287 return false;
290288
291289
292290 global $wgEmailAuthentication, $ceAllowConfirmedEmail;
293 - if( $wgEmailAuthentication && $ceAllowConfirmedEmail &&
 291+ if ( $wgEmailAuthentication && $ceAllowConfirmedEmail &&
294292 $wgUser->isEmailConfirmed() ) {
295293 wfDebug( "ConfirmEdit: user has confirmed mail, skipping captcha\n" );
296294 return false;
297295 }
298296
299 - if( $this->captchaTriggers( $editPage, 'edit' ) ) {
 297+ if ( $this->captchaTriggers( $editPage, 'edit' ) ) {
300298 // Check on all edits
301299 global $wgUser;
302300 $this->trigger = sprintf( "edit trigger by '%s' at [[%s]]",
@@ -306,8 +304,8 @@
307305 return true;
308306 }
309307
310 - if( $this->captchaTriggers( $editPage, 'create' ) && !$editPage->mTitle->exists() ) {
311 - //Check if creating a page
 308+ if ( $this->captchaTriggers( $editPage, 'create' ) && !$editPage->mTitle->exists() ) {
 309+ // Check if creating a page
312310 global $wgUser;
313311 $this->trigger = sprintf( "Create trigger by '%s' at [[%s]]",
314312 $wgUser->getName(),
@@ -317,7 +315,7 @@
318316 return true;
319317 }
320318
321 - if( $this->captchaTriggers( $editPage, 'addurl' ) ) {
 319+ if ( $this->captchaTriggers( $editPage, 'addurl' ) ) {
322320 // Only check edits that add URLs
323321 if ( $merged ) {
324322 // Get links from the database
@@ -336,7 +334,7 @@
337335 $addedLinks = array_diff( $unknownLinks, $oldLinks );
338336 $numLinks = count( $addedLinks );
339337
340 - if( $numLinks > 0 ) {
 338+ if ( $numLinks > 0 ) {
341339 global $wgUser;
342340 $this->trigger = sprintf( "%dx url trigger by '%s' at [[%s]]: %s",
343341 $numLinks,
@@ -349,20 +347,20 @@
350348 }
351349
352350 global $wgCaptchaRegexes;
353 - if( $wgCaptchaRegexes ) {
 351+ if ( $wgCaptchaRegexes ) {
354352 // Custom regex checks
355353 $oldtext = $this->loadText( $editPage, $section );
356354
357 - foreach( $wgCaptchaRegexes as $regex ) {
 355+ foreach ( $wgCaptchaRegexes as $regex ) {
358356 $newMatches = array();
359 - if( preg_match_all( $regex, $newtext, $newMatches ) ) {
 357+ if ( preg_match_all( $regex, $newtext, $newMatches ) ) {
360358 $oldMatches = array();
361359 preg_match_all( $regex, $oldtext, $oldMatches );
362360
363361 $addedMatches = array_diff( $newMatches[0], $oldMatches[0] );
364362
365363 $numHits = count( $addedMatches );
366 - if( $numHits > 0 ) {
 364+ if ( $numHits > 0 ) {
367365 global $wgUser;
368366 $this->trigger = sprintf( "%dx %s at [[%s]]: %s",
369367 $numHits,
@@ -390,7 +388,7 @@
391389 global $wgCaptchaWhitelist;
392390 $source = wfMsgForContent( 'captcha-addurl-whitelist' );
393391
394 - $whitelist = wfEmptyMsg( 'captcha-addurl-whitelist', $source )
 392+ $whitelist = wfEmptyMsg( 'captcha-addurl-whitelist', $source )
395393 ? false
396394 : $this->buildRegexes( explode( "\n", $source ) );
397395
@@ -419,29 +417,29 @@
420418 } else {
421419 # Make regex
422420 # It's faster using the S modifier even though it will usually only be run once
423 - //$regex = 'http://+[a-z0-9_\-.]*(' . implode( '|', $lines ) . ')';
424 - //return '/' . str_replace( '/', '\/', preg_replace('|\\\*/|', '/', $regex) ) . '/Si';
 421+ // $regex = 'http://+[a-z0-9_\-.]*(' . implode( '|', $lines ) . ')';
 422+ // return '/' . str_replace( '/', '\/', preg_replace('|\\\*/|', '/', $regex) ) . '/Si';
425423 $regexes = '';
426424 $regexStart = '/^https?:\/\/+[a-z0-9_\-.]*(';
427425 $regexEnd = ')/Si';
428426 $regexMax = 4096;
429427 $build = false;
430 - foreach( $lines as $line ) {
 428+ foreach ( $lines as $line ) {
431429 // FIXME: not very robust size check, but should work. :)
432 - if( $build === false ) {
 430+ if ( $build === false ) {
433431 $build = $line;
434 - } elseif( strlen( $build ) + strlen( $line ) > $regexMax ) {
 432+ } elseif ( strlen( $build ) + strlen( $line ) > $regexMax ) {
435433 $regexes .= $regexStart .
436 - str_replace( '/', '\/', preg_replace('|\\\*/|', '/', $build) ) .
 434+ str_replace( '/', '\/', preg_replace( '|\\\*/|', '/', $build ) ) .
437435 $regexEnd;
438436 $build = $line;
439437 } else {
440438 $build .= '|' . $line;
441439 }
442440 }
443 - if( $build !== false ) {
 441+ if ( $build !== false ) {
444442 $regexes .= $regexStart .
445 - str_replace( '/', '\/', preg_replace('|\\\*/|', '/', $build) ) .
 443+ str_replace( '/', '\/', preg_replace( '|\\\*/|', '/', $build ) ) .
446444 $regexEnd;
447445 }
448446 return $regexes;
@@ -454,7 +452,7 @@
455453 function getLinksFromTracker( $title ) {
456454 $dbr =& wfGetDB( DB_SLAVE );
457455 $id = $title->getArticleId(); // should be zero queries
458 - $res = $dbr->select( 'externallinks', array( 'el_to' ),
 456+ $res = $dbr->select( 'externallinks', array( 'el_to' ),
459457 array( 'el_from' => $id ), __METHOD__ );
460458 $links = array();
461459 while ( $row = $dbr->fetchObject( $res ) ) {
@@ -462,14 +460,14 @@
463461 }
464462 return $links;
465463 }
466 -
 464+
467465 /**
468466 * Backend function for confirmEdit() and confirmEditAPI()
469467 * @return bool false if the CAPTCHA is rejected, true otherwise
470468 */
471469 private function doConfirmEdit( $editPage, $newtext, $section, $merged = false ) {
472 - if( $this->shouldCheck( $editPage, $newtext, $section, $merged ) ) {
473 - if( $this->passCaptcha() ) {
 470+ if ( $this->shouldCheck( $editPage, $newtext, $section, $merged ) ) {
 471+ if ( $this->passCaptcha() ) {
474472 return true;
475473 } else {
476474 return false;
@@ -489,12 +487,12 @@
490488 * @return bool true to continue saving, false to abort and show a captcha form
491489 */
492490 function confirmEdit( $editPage, $newtext, $section, $merged = false ) {
493 - if( defined('MW_API') ) {
 491+ if ( defined( 'MW_API' ) ) {
494492 # API mode
495 - # The CAPTCHA was already checked and approved
 493+ # The CAPTCHA was already checked and approved
496494 return true;
497495 }
498 - if( !$this->doConfirmEdit( $editPage, $newtext, $section, $merged ) ) {
 496+ if ( !$this->doConfirmEdit( $editPage, $newtext, $section, $merged ) ) {
499497 $editPage->showEditForm( array( &$this, 'editCallback' ) );
500498 return false;
501499 }
@@ -509,11 +507,11 @@
510508 function confirmEditMerged( $editPage, $newtext ) {
511509 return $this->confirmEdit( $editPage, $newtext, false, true );
512510 }
513 -
514 -
515 - function confirmEditAPI( &$editPage, $newtext, &$resultArr) {
516 - if( !$this->doConfirmEdit( $editPage, $newtext, false, false ) ) {
517 - $this->addCaptchaAPI($resultArr);
 511+
 512+
 513+ function confirmEditAPI( &$editPage, $newtext, &$resultArr ) {
 514+ if ( !$this->doConfirmEdit( $editPage, $newtext, false, false ) ) {
 515+ $this->addCaptchaAPI( $resultArr );
518516 return false;
519517 }
520518 return true;
@@ -527,23 +525,23 @@
528526 */
529527 function confirmUserCreate( $u, &$message ) {
530528 global $wgCaptchaTriggers, $wgUser;
531 - if( $wgCaptchaTriggers['createaccount'] ) {
532 - if( $wgUser->isAllowed( 'skipcaptcha' ) ) {
 529+ if ( $wgCaptchaTriggers['createaccount'] ) {
 530+ if ( $wgUser->isAllowed( 'skipcaptcha' ) ) {
533531 wfDebug( "ConfirmEdit: user group allows skipping captcha on account creation\n" );
534532 return true;
535533 }
536 - if( $this->isIPWhitelisted() )
 534+ if ( $this->isIPWhitelisted() )
537535 return true;
538 -
 536+
539537 $this->trigger = "new account '" . $u->getName() . "'";
540 - if( !$this->passCaptcha() ) {
 538+ if ( !$this->passCaptcha() ) {
541539 $message = wfMsg( 'captcha-createaccount-fail' );
542540 return false;
543541 }
544542 }
545543 return true;
546544 }
547 -
 545+
548546 /**
549547 * Hook for user login form submissions.
550548 * @param User $u
@@ -551,12 +549,12 @@
552550 * @return bool true to continue, false to abort user creation
553551 */
554552 function confirmUserLogin( $u, $pass, &$retval ) {
555 - if( $this->isBadLoginTriggered() ) {
556 - if( $this->isIPWhitelisted() )
 553+ if ( $this->isBadLoginTriggered() ) {
 554+ if ( $this->isIPWhitelisted() )
557555 return true;
558 -
 556+
559557 $this->trigger = "post-badlogin login '" . $u->getName() . "'";
560 - if( !$this->passCaptcha() ) {
 558+ if ( !$this->passCaptcha() ) {
561559 $message = wfMsg( 'captcha-badlogin-fail' );
562560 // Emulate a bad-password return to confuse the shit out of attackers
563561 $retval = LoginForm::WRONG_PASS;
@@ -573,9 +571,9 @@
574572 */
575573 function passCaptcha() {
576574 $info = $this->retrieveCaptcha();
577 - if( $info ) {
 575+ if ( $info ) {
578576 global $wgRequest;
579 - if( $this->keyMatch( $wgRequest->getVal('wpCaptchaWord'), $info ) ) {
 577+ if ( $this->keyMatch( $wgRequest->getVal( 'wpCaptchaWord' ), $info ) ) {
580578 $this->log( "passed" );
581579 $this->clearCaptcha( $info );
582580 return true;
@@ -610,7 +608,7 @@
611609 * @return string captcha ID key
612610 */
613611 function storeCaptcha( $info ) {
614 - if( !isset( $info['index'] ) ) {
 612+ if ( !isset( $info['index'] ) ) {
615613 // Assign random index if we're not udpating
616614 $info['index'] = strval( mt_rand() );
617615 }
@@ -645,11 +643,11 @@
646644 */
647645 function loadText( $editPage, $section ) {
648646 $rev = Revision::newFromTitle( $editPage->mTitle );
649 - if( is_null( $rev ) ) {
 647+ if ( is_null( $rev ) ) {
650648 return "";
651649 } else {
652650 $text = $rev->getText();
653 - if( $section != '' ) {
 651+ if ( $section != '' ) {
654652 return Article::getSection( $text, $section );
655653 } else {
656654 return $text;
@@ -683,22 +681,21 @@
684682 $wgOut->addWikiText( wfMsg( 'captchahelp-cookies-needed' ) );
685683 }
686684 }
687 -
688685 }
689686
690687 class CaptchaSessionStore {
691688 function store( $index, $info ) {
692689 $_SESSION['captcha' . $info['index']] = $info;
693690 }
694 -
 691+
695692 function retrieve( $index ) {
696 - if( isset( $_SESSION['captcha' . $index] ) ) {
 693+ if ( isset( $_SESSION['captcha' . $index] ) ) {
697694 return $_SESSION['captcha' . $index];
698695 } else {
699696 return false;
700697 }
701698 }
702 -
 699+
703700 function clear( $index ) {
704701 unset( $_SESSION['captcha' . $index] );
705702 }
@@ -718,13 +715,13 @@
719716 function retrieve( $index ) {
720717 global $wgMemc;
721718 $info = $wgMemc->get( wfMemcKey( 'captcha', $index ) );
722 - if( $info ) {
 719+ if ( $info ) {
723720 return $info;
724721 } else {
725722 return false;
726723 }
727724 }
728 -
 725+
729726 function clear( $index ) {
730727 global $wgMemc;
731728 $wgMemc->delete( wfMemcKey( 'captcha', $index ) );
@@ -734,4 +731,3 @@
735732 return false;
736733 }
737734 }
738 -
Index: trunk/extensions/ConfirmEdit/ConfirmEdit.i18n.php
@@ -209,7 +209,7 @@
210210 'captcha-create' => 'এই পৃষ্ঠাটো তৈয়াৰ কৰিবলৈ, তলৰ সহজ অংকটো কৰি উত্তৰতো বাকছৰ ভিতৰত লিখক
211211 ([[Special:Captcha/help|অধিক তথ্য]]):',
212212 'captchahelp-cookies-needed' => 'এই কামতো সম্পন্ন কৰিবলৈ, আপোনাৰ ব্রাউজাৰত কুকী সক্রীয় থাকিব লাগিব',
213 - 'captchahelp-text' => "যিবোৰ ৱেবচাইটত জনতাই পাঠ্য ভৰাব পাৰে, যেনে এই ৱিকি, সেইবোৰক প্রায়ে দুস্ক্রিতিকাৰি স্পেমাৰবোৰে স্বয়ংক্রীয় আহিলাৰ দ্বাৰা তেওলোকৰ চাইটলৈ সংযোগ ভৰাই আক্রমন কৰে।
 213+ 'captchahelp-text' => "যিবোৰ ৱেবচাইটত জনতাই পাঠ্য ভৰাব পাৰে, যেনে এই ৱিকি, সেইবোৰক প্রায়ে দুস্ক্রিতিকাৰি স্পেমাৰবোৰে স্বয়ংক্রীয় আহিলাৰ দ্বাৰা তেওলোকৰ চাইটলৈ সংযোগ ভৰাই আক্রমন কৰে।
214214 যদিও তেনে স্পাম সংযোগ গুচাব পাৰি, পিছে এয়া এক ডাঙৰ উপদ্রৱ।
215215
216216 কেতিয়াবা, সাধাৰণতে যেতিয়া কোনো পৃষ্ঠালৈ নতুন সংযোগ সৃষ্টি কৰা হয়, তেতিয়া ৱিকিয়ে এটা ৰঙীন বা বিকৃত চবি দেখুৱাই তাত থকা শব্দখিনি আপোনাক টাইপ কৰিব কব পাৰে।
@@ -410,7 +410,7 @@
411411 'captcha-addurl-whitelist' => " #<!-- laoskit al linenn-mañ tre evel m'emañ --> <pre>
412412 # Setu penaos emañ an ereadur :
413413 # * Kement tra war-lerc'h an arouezenn \"#\" zo un urzhiad, betek penn all al linenn
414 -# * Kement linenn n'eo ket goullo zo ur c'hod regex a vo implijet e diabarzh al liammoù gourdskrid hepken
 414+# * Kement linenn n'eo ket goullo zo ur c'hod regex a vo implijet e diabarzh al liammoù gourdskrid hepken
415415 #</pre> <!-- laoskit al linenn-mañ tre evel m'emañ -->",
416416 'right-skipcaptcha' => 'Lañsañ a ra an oberoù captcha hep bezañ rediet da dremen drezañ',
417417 );
@@ -542,20 +542,20 @@
543543 'captcha-create' => "Er mwyn gallu creu'r dudalen, gwnewch y swm isod a gosodwch y canlyniad yn y blwch ([[Special:Captcha/help|rhagor o wybodaeth]]):",
544544 'captchahelp-title' => 'Cymorth "captcha"',
545545 'captchahelp-cookies-needed' => "Er mwyn i hyn weithio mae'n rhaid bod cookies wedi eu galluogi ar eich gwe-lywiwr.",
546 - 'captchahelp-text' => "Yn anffodus, mae safleoedd gwe fel y wici hon, sy'n caniatau i'r cyhoedd ysgrifennu iddi, yn darged beunyddiol i sbamwyr sy'n defnyddio rhaglenni arbennig i bostio eu cysylltiadau ar wefannau lu. Gellir dileu'r dolenni o'r tudalennau, ond byddai hynny'n waith trafferthus.
 546+ 'captchahelp-text' => "Yn anffodus, mae safleoedd gwe fel y wici hon, sy'n caniatau i'r cyhoedd ysgrifennu iddi, yn darged beunyddiol i sbamwyr sy'n defnyddio rhaglenni arbennig i bostio eu cysylltiadau ar wefannau lu. Gellir dileu'r dolenni o'r tudalennau, ond byddai hynny'n waith trafferthus.
547547
548 -O dro i dro, yn enwedig wrth ychwanegu dolenni at safleoedd gwe eraill, fe fydd y safle hon yn dangos delwedd o destun, ac fe fydd yn rhaid i chi deipio'r geiriau a ddangosir. Mae hyn yn dasg anodd iawn i raglenni cyfrifiadurol, felly dylai'r rhan fwyaf o olygwyr go iawn gyflawni'r dasg yn ddi-drafferth, yn wahanol i'r rhaglenni sbam.
 548+O dro i dro, yn enwedig wrth ychwanegu dolenni at safleoedd gwe eraill, fe fydd y safle hon yn dangos delwedd o destun, ac fe fydd yn rhaid i chi deipio'r geiriau a ddangosir. Mae hyn yn dasg anodd iawn i raglenni cyfrifiadurol, felly dylai'r rhan fwyaf o olygwyr go iawn gyflawni'r dasg yn ddi-drafferth, yn wahanol i'r rhaglenni sbam.
549549
550 -Yn anffodus, mae hyn yn creu trafferthion i'r rhai sydd yn defnyddio porwyr testun neu borwyr sain, neu sydd yn colli eu golwg.
551 -Ar hyn o bryd nid oes fersiwn sain ar gael.
552 -Cysylltwch â [[{{MediaWiki:Grouppage-sysop}}|gweinyddwyr y safle]] os ydi'r nodwedd hon yn eich rhwystro rhag ychwanegu golygiadau dilys.
 550+Yn anffodus, mae hyn yn creu trafferthion i'r rhai sydd yn defnyddio porwyr testun neu borwyr sain, neu sydd yn colli eu golwg.
 551+Ar hyn o bryd nid oes fersiwn sain ar gael.
 552+Cysylltwch â [[{{MediaWiki:Grouppage-sysop}}|gweinyddwyr y safle]] os ydi'r nodwedd hon yn eich rhwystro rhag ychwanegu golygiadau dilys.
553553
554554 Gwasgwch botwm 'nôl' eich porwr er mwyn dychwelyd at y dudalen golygu.",
555555 'captcha-addurl-whitelist' => '#<!-- leave this line exactly as it is --> <pre>
556556 #
557557 # Dyma\'r gystrawen:
558558 # * Mae popeth o nod "#" hyd at ddiwedd y llinell yn sylwad
559 -# * Mae pob llinell nad yw\'n wag yn ddarn regex sydd ddim ond yn cydweddu
 559+# * Mae pob llinell nad yw\'n wag yn ddarn regex sydd ddim ond yn cydweddu
560560 # * gwesteiwyr tu mewn i gyfeiriadau URL
561561
562562 #</pre> <!-- leave this line exactly as it is -->',
@@ -626,8 +626,8 @@
627627 */
628628 $messages['de-formal'] = array(
629629 'captcha-edit' => 'Zur Bearbeitung der Seite lösen Sie die nachfolgende Rechenaufgabe und tragen Sie das Ergebnis in das Feld unten ein [[Special:Captcha/help|(Fragen oder Probleme?)]].',
630 - 'captcha-addurl' => 'Ihre Bearbeitung enthält neue externe Links.
631 -Zum Schutz vor automatisiertem Spamming lösen Sie die nachfolgende Rechenaufgabe und tragen Sie das Ergebnis in das Feld unten ein.
 630+ 'captcha-addurl' => 'Ihre Bearbeitung enthält neue externe Links.
 631+Zum Schutz vor automatisiertem Spamming lösen Sie die nachfolgende Rechenaufgabe und tragen Sie das Ergebnis in das Feld unten ein.
632632 Klicken Sie dann erneut auf „Seite speichern“ [[Special:Captcha/help|(Fragen oder Probleme?)]].',
633633 'captcha-badlogin' => 'Zum Schutz vor einer Kompromittierung Ihres Benutzerkontos lösen Sie die nachfolgende Rechenaufgabe und tragen Sie das Ergebnis in das Feld unten ein [[Special:Captcha/help|(Fragen oder Probleme?)]]:',
634634 'captcha-createaccount' => 'Zum Schutz vor automatisierter Anlage von Benutzerkonten lösen Sie die nachfolgende Rechenaufgabe und tragen Sie das Ergebnis in das Feld unten ein [[Special:Captcha/help|(Fragen oder Probleme?)]].',
@@ -702,8 +702,8 @@
703703 Πατήστε το κουμπί 'πίσω' στη μηχανή αναζήτησης σας για να επιστρέψετε στο συντάκτη σελίδων.",
704704 'captcha-addurl-whitelist' => ' #<!-- αφήστε αυτή την γραμμή ακριβώς όπως είναι --> <pre>
705705 # Η σύνταξη είναι όπως παρακάτω:
706 -# * Οτιδήποτε από ένα χαρακτήρα "#" ως το τέλος της γραμμής είναι ένα σχόλιο
707 -# * Κάθε μη κενή γραμμή είναι μια έκφραση regex που θα ταιριάζει μόνο hosts μέσα σε URL
 706+# * Οτιδήποτε από ένα χαρακτήρα "#" ως το τέλος της γραμμής είναι ένα σχόλιο
 707+# * Κάθε μη κενή γραμμή είναι μια έκφραση regex που θα ταιριάζει μόνο hosts μέσα σε URL
708708 #</pre> <!-- αφήστε αυτή την γραμμή ακριβώς όπως είναι -->',
709709 'right-skipcaptcha' => 'Πραγματοποίηση ενεργειών που ενεργοποιούν captcha χωρίς να χρειάζεται πέρασμα από το captcha',
710710 );
@@ -792,11 +792,11 @@
793793 'captcha-create' => 'Teie muudatuses on uusi linke; kaitseks spämmi vastu peate sisestama järgneval pildil olevad sõnad:<br /> ([[Special:Captcha/help|Mis see on?]])',
794794 'captchahelp-title' => 'Mis on Captcha?',
795795 'captchahelp-cookies-needed' => 'Selle toimimiseks peab veebibrauser lubama küpsiseid.',
796 - 'captchahelp-text' => 'Internetisaite, mis lubavad külastajatel sisu muuta (nagu ka see Viki), kasutavad sageli spämmerid ära, postitades reklaamlinke — spämmi. Kuigi neid linke saab alati ära võtta, on nad ikkagi üpris tülikad.
 796+ 'captchahelp-text' => 'Internetisaite, mis lubavad külastajatel sisu muuta (nagu ka see Viki), kasutavad sageli spämmerid ära, postitades reklaamlinke — spämmi. Kuigi neid linke saab alati ära võtta, on nad ikkagi üpris tülikad.
797797
798 -Omale kasutajakontot registreerides või mõnele lehele uusi internetiaadresse postitades näidatakse teile moonutatud tekstiga pilti ning palutakse teil sisestada seal näidatud sõnad. Kuna selliselt pildilt on arvutil raske teksti välja lugeda, on see efektiivseks kaitseks spämmirobotite vastu, samas lubades tavainimestel oma muudatusi rahus teha.
 798+Omale kasutajakontot registreerides või mõnele lehele uusi internetiaadresse postitades näidatakse teile moonutatud tekstiga pilti ning palutakse teil sisestada seal näidatud sõnad. Kuna selliselt pildilt on arvutil raske teksti välja lugeda, on see efektiivseks kaitseks spämmirobotite vastu, samas lubades tavainimestel oma muudatusi rahus teha.
799799
800 -Kahjuks võib see tekitada ebamugavusi nägemisraskustega inimestele või neile, kes kasutavad kõnesüntesaatorit või tekstipõhist brauserit. Hetkel pole meil helipõhist alternatiivi. Kui teil tekib ootamatult raskusi oma muudatuste tegemisel, siis võtke ühendust selle saidi administraatoritega.
 800+Kahjuks võib see tekitada ebamugavusi nägemisraskustega inimestele või neile, kes kasutavad kõnesüntesaatorit või tekstipõhist brauserit. Hetkel pole meil helipõhist alternatiivi. Kui teil tekib ootamatult raskusi oma muudatuste tegemisel, siis võtke ühendust selle saidi administraatoritega.
801801
802802 Konto registreerimise lehele või lehe redigeerimisele tagasi jõudmiseks vajutage oma brauseri tagasi-nuppu.',
803803 );
@@ -816,12 +816,12 @@
817817 'captcha-create' => 'Orrialde hau sortzeko, mesedez, beheko batuketa erraz hau ebatzi eta erantzuna kutxan idatzi ([[Special:Captcha/help|argibide gehiago]]):',
818818 'captchahelp-title' => 'Captcha laguntza',
819819 'captchahelp-cookies-needed' => 'Beharrezkoa da nabigatzailean cookieak gaituta izatea honek funtzionatzeko.',
820 - 'captchahelp-text' => "Publikoki aldaketak egiteko aukerak dituzten webguneetan, wiki honetan bezalaxe, spam testuak gehitzen dira sarritan tresna automatikoak erabiliz.
 820+ 'captchahelp-text' => "Publikoki aldaketak egiteko aukerak dituzten webguneetan, wiki honetan bezalaxe, spam testuak gehitzen dira sarritan tresna automatikoak erabiliz.
821821 Lotura horiek ezabatu egin daitezkeen arren, traba dira.
822822
823 -Batzuetan, eta bereziki webgune berri bateko loturak gehitzen dituzunean, hitz batzuk dituen irudi bat agertuko zaizu, eta bertan ageri den testua idazteko eskatuko zaizu. Lan hori automatizatzeko zaila da, eta pertsonei ezer kostatzen ez zaigunez, spam testuak saihesteko lagungarria da.
 823+Batzuetan, eta bereziki webgune berri bateko loturak gehitzen dituzunean, hitz batzuk dituen irudi bat agertuko zaizu, eta bertan ageri den testua idazteko eskatuko zaizu. Lan hori automatizatzeko zaila da, eta pertsonei ezer kostatzen ez zaigunez, spam testuak saihesteko lagungarria da.
824824
825 -Zoritxarrez, ikusmen mugatua edo testu bidezko nabigatzaileak erabiltzen dituzten erabiltzeek arazoak izan ditzakete. Horrelako zerbait gertatzen bazaizu, mesedez, jarri [[{{MediaWiki:Grouppage-sysop}}|administratzaileekin]] harremanetan.
 825+Zoritxarrez, ikusmen mugatua edo testu bidezko nabigatzaileak erabiltzen dituzten erabiltzeek arazoak izan ditzakete. Horrelako zerbait gertatzen bazaizu, mesedez, jarri [[{{MediaWiki:Grouppage-sysop}}|administratzaileekin]] harremanetan.
826826
827827 Zure nabigatzaileko 'atzera' lotura erabili aldaketen orrialdera itzultzeko.",
828828 );
@@ -983,11 +983,11 @@
984984 'captcha-createaccount-fail' => 'It antwurd op de som kloppet net.',
985985 'captcha-create' => 'Om de side oan te meitsjen wurdt jo frege it antwurd op de ûndersteande som te jaan ([[Special:Captcha/help|meer ynformaasje]]).',
986986 'captchahelp-title' => 'Lettertoets-help',
987 - 'captchahelp-text' => "Websteeën dêr't it publyk op skriuwe kin, lykas dizze {{SITENAME}}-wiki, kinne lêst hawwe fan lju dy't automatysk keppelings oan de websiden tafoegje. Op dizze wiki kinne sokke feroarings maklik weromset wurde, mar dat nimt al tiid dy't ek oars brûkt wurde kin.
 987+ 'captchahelp-text' => "Websteeën dêr't it publyk op skriuwe kin, lykas dizze {{SITENAME}}-wiki, kinne lêst hawwe fan lju dy't automatysk keppelings oan de websiden tafoegje. Op dizze wiki kinne sokke feroarings maklik weromset wurde, mar dat nimt al tiid dy't ek oars brûkt wurde kin.
988988
989 -By it oanmelden as meidogger, en fierders benammen at jo keppelings om utens oan in side tafoegje, kinne jo fan de wiki in lettertoets krije. De wiki lit dan kleurde of ferwrongen letters sjen, en jo wurdt frege dy oer te tikken. Om't dit net maklik automatisearre wurde kin, hâldt dit it automatysk tafoegjen tsjin. It spitegernôch ek in lytse lêst foar de meidoggers.
 989+By it oanmelden as meidogger, en fierders benammen at jo keppelings om utens oan in side tafoegje, kinne jo fan de wiki in lettertoets krije. De wiki lit dan kleurde of ferwrongen letters sjen, en jo wurdt frege dy oer te tikken. Om't dit net maklik automatisearre wurde kin, hâldt dit it automatysk tafoegjen tsjin. It spitegernôch ek in lytse lêst foar de meidoggers.
990990
991 -In probleem dêr't noch gjin oplossing foar is it dat it in tûkelteam is foar minsken dy't net goed sjen kinne of dy't in tekst-blêder of lûd-blêder brûke. Hjir soe in lûd-ferzje foar komme moatte, mar dy is der noch net. Oerlis mei in behearder at dit foar jo problemen jout.
 991+In probleem dêr't noch gjin oplossing foar is it dat it in tûkelteam is foar minsken dy't net goed sjen kinne of dy't in tekst-blêder of lûd-blêder brûke. Hjir soe in lûd-ferzje foar komme moatte, mar dy is der noch net. Oerlis mei in behearder at dit foar jo problemen jout.
992992
993993 Gean tebek mei de tebek-knop fan jo blêder.",
994994 );
@@ -1056,9 +1056,9 @@
10571057 'captcha-create' => 'Zum d Syten aalege lees die Rächenufgab un trag s Ergebnis in s Fäld unten yy. [[Special:Captcha/help|(Frogen oder Probläm?)]]',
10581058 'captchahelp-title' => 'Captcha-Hilf',
10591059 'captchahelp-cookies-needed' => "'''Wichtiger Hiiwyys:''' Im Browser mien Cookiers erlaubt syy.",
1060 - 'captchahelp-text' => 'Internetaagebot, wu uf sin fir Byytreg vu jedem, wie z. B. des Wiki, wäre vyylmol vu Spammer missbruucht, wu ihri Gleicher automatisch uf vyylene Netzsyte platziere. Die Spam-Gleicher cha mer wider useneh, si stere aber zimli un nämme Arbetszyt in Aaspruch.
 1060+ 'captchahelp-text' => 'Internetaagebot, wu uf sin fir Byytreg vu jedem, wie z. B. des Wiki, wäre vyylmol vu Spammer missbruucht, wu ihri Gleicher automatisch uf vyylene Netzsyte platziere. Die Spam-Gleicher cha mer wider useneh, si stere aber zimli un nämme Arbetszyt in Aaspruch.
10611061
1062 -In e Teil Fäll, v. a. wänn neiji Netzgleicher in e Syte dryygfiegt wäre, cha s syy, ass des Wiki derno ne Bild mit eme farbige un verzerrte Täxt aazeigt un dezue ufforderet, di aazeigte Werte yyzgee. Wel sonigi Ufgabe nit automatische chenne usgfiert wäre, cha mer eso di meischte Spammer, wu mit automatische Wärchzyyg schaffe, ufhalte, aber normali Benutzer chenne ihri Byytreg einewäg yygee.
 1062+In e Teil Fäll, v. a. wänn neiji Netzgleicher in e Syte dryygfiegt wäre, cha s syy, ass des Wiki derno ne Bild mit eme farbige un verzerrte Täxt aazeigt un dezue ufforderet, di aazeigte Werte yyzgee. Wel sonigi Ufgabe nit automatische chenne usgfiert wäre, cha mer eso di meischte Spammer, wu mit automatische Wärchzyyg schaffe, ufhalte, aber normali Benutzer chenne ihri Byytreg einewäg yygee.
10631063
10641064 Leider cha des derzue fiere, ass Lyt Probläm iberchemme, wu ne yygschränkti Sähfähigkeit oder e Browser bruche, wu täxt- oder sprochbasiert isch.
10651065 Im Momänt hän mir kei Audioalternative z Verfiegig.
@@ -1096,7 +1096,7 @@
10971097
10981098 લેખમા ફેરફાર કરવાના પાના ઉપર પાછા ફરવા માટે આપના બ્રાઉઝરના 'બેક' બટન ઉપર ક્લિક કરો.",
10991099 'captcha-addurl-whitelist' => ' #<!-- આ લીટીને જેમ છે તેમ જ રહેવા દો --> <pre>
1100 -# સીન્ટેક્સ (Syntax) આ પ્રમાણે છે :
 1100+# સીન્ટેક્સ (Syntax) આ પ્રમાણે છે :
11011101 # * "#" સંજ્ઞાથી શરૂ કરીને લીટીના અંત સુધીનું વર્ણન એક ટીપ્પણી છે
11021102 # * ખાલી ન હોય તેવી દરેક લીટી રેજેક્સનો ભાગ છે, જે ફક્ત URLsમાંના હોસ્ટ સાથે જ મેળ ખાશે
11031103 #</pre> <!-- આ લીટીને જેમ છે તેમ જ રહેવા દો -->',
@@ -1190,7 +1190,7 @@
11911191 Ponekad se dogodi da wiki prikaže sliku čudnog tekstualnog sadržaja uz koju morate unijeti prikazana slova.
11921192 Budući da je takvu radnju teško automatizirati, većina se napadača obeshrabri, a pravi suradnici bez većih smetnji nastavljaju pridonositi.
11931193
1194 -Na žalost, ovo može biti nepristupačno za suradnike koji koriste tekstualne klijene ili one glasovno bazirane. Trenutačno nemamo glasovnu podršku za ovo.
 1194+Na žalost, ovo može biti nepristupačno za suradnike koji koriste tekstualne klijene ili one glasovno bazirane. Trenutačno nemamo glasovnu podršku za ovo.
11951195 Molimo da se obratite administratorima, ukoliko vas ovo ometa pri dodavanju važećih sadržaja.
11961196
11971197 Pritisnite u svom pregledniku 'nazad' kako bi se vratili na stranicu.",
@@ -1693,7 +1693,7 @@
16941694
16951695 Heiandsdo, besonnesch wann nei Internet-Linkën op eng Säit derbäigesat ginn, weist dës Wiki iech e Bild mat farwegëm oder verzerrtëm Text a freet iech fir déi gewise Wierder anzetipppen. Well dëst eng Aufgab ass déi schwéier ze automatiséieren ass, erlaabt dëst dat Mënschen hir Ännerunge kënnen agi wärend déi meescht Spammer an aner Roboter-Attacken kënnen ofgewiert ginn.
16961696
1697 -Leider kann dëst zu Schwierigkeete féiere fir Persounen déi net esou gutt gesinn oder déi text-baséiert oder sprooch-baséiert Browser benotzen.
 1697+Leider kann dëst zu Schwierigkeete féiere fir Persounen déi net esou gutt gesinn oder déi text-baséiert oder sprooch-baséiert Browser benotzen.
16981698 Zu dësem Zäitpunkt hu mir leider keng audio-Alternativ zu eiser Verfügung.
16991699 Kontaktéiert w.e.g. [[{{MediaWiki:Grouppage-sysop}}|een Administrateur]] fir Hëllef wann dëst iech onerwarter Wäis vu legitimen Editen ofhält.
17001700
@@ -1808,7 +1808,7 @@
18091809 हे काम संगणकाकरवी करून घेण्यास अवघड असल्याने, फक्त खरी माणसेच संपादने करू शकतील व स्पॅमर्सना आळा बसू शकेल.
18101810
18111811 पण खेदाची गोष्ट अशी की ह्यामुळे अर्धांध व्यक्ती तसेच ज्या व्यक्ती फक्त मजकूर दाखविणारा न्याहाळक वापरतात, अशांना असुविधा होऊ शकते.
1812 -सध्या आमच्याकडे आवाज ऐकण्याची सुविधा नाही.
 1812+सध्या आमच्याकडे आवाज ऐकण्याची सुविधा नाही.
18131813 कृपया विकिवरील प्रबंधकांशी या बाबतीत संपर्क करावा.
18141814
18151815 पृष्ठ संपादनाकडे परत जाण्यासाठी आपल्या ब्राउझरची ’Back' ही कळ दाबा.",
@@ -1913,11 +1913,11 @@
19141914 'captcha-badlogin' => "Los disse eenvoudige rekensomme op en voer 't antwoord in bie 't invoervienster in ter bescharming tegen 't autematisch kraken van wachwoorden ([[Special:Captcha/help|meer infermasie]]):",
19151915 'captcha-createaccount' => "Voer ter bescharming tegen autematische ongewunste reclame 't antwoord op disse eenvoudige rekensomme in bie invoervienster ([[Special:Captcha/help|meer informatie]]):",
19161916 'captcha-createaccount-fail' => 'Verkeerde of ontbrekende bevestigingscode.',
1917 - 'captcha-create' => "Je bin een nieje pagina an 't maken.
 1917+ 'captcha-create' => "Je bin een nieje pagina an 't maken.
19181918 Voer 't antwoord van disse eenvoudige rekensomme in bie 't invoervienster
19191919 ([[Special:Captcha/help|meer infermasie]]).",
1920 - 'captcha-addurl-whitelist' => ' #<!-- laot disse regel zoas e is --> <pre>
1921 -# De syntaxis is as volg:
 1920+ 'captcha-addurl-whitelist' => ' #<!-- laot disse regel zoas e is --> <pre>
 1921+# De syntaxis is as volg:
19221922 # * Alle tekse vanof \'t kerakter "#" tot \'t einde van de regels wonnen ezien as opmarking
19231923 # * Alle regels dee neet leeg bin, wonnen ezien as een regeliere uutdrokking dee veur delen van de domein staon.
19241924 #</pre> <!-- laot disse regel zoas e is -->',
@@ -1951,8 +1951,8 @@
19521952 Vraag assistentie van de [[{{MediaWiki:Grouppage-sysop}}|sitebeheerders]] als dit proces u verhindert een nuttige bijdrage te leveren.
19531953
19541954 Klik op de knop 'terug' in uw browser om terug te gaan naar het tekstbewerkingsscherm.",
1955 - 'captcha-addurl-whitelist' => ' #<!-- laat deze regel zoals hij is --> <pre>
1956 -# De syntaxis is als volgt:
 1955+ 'captcha-addurl-whitelist' => ' #<!-- laat deze regel zoals hij is --> <pre>
 1956+# De syntaxis is als volgt:
19571957 # * Alle tekst vanaf het karakter "#" tot het einde van de regels wordt gezien als opmerking
19581958 # * Iedere niet-lege regel is een fragment van een reguliere uitdrukking die alleen van toepassing is op hosts binnen URL\'s
19591959 #</pre> <!-- laat deze regel zoals hij is -->',
@@ -2108,7 +2108,7 @@
21092109 * @author Bèrto 'd Sèra
21102110 */
21112111 $messages['pms'] = array(
2112 - 'captcha-edit' => "Për fe-ie dle modìfiche ansima a st'artìcol-sì, për piasì ch'a fasa ël total ambelessì sota
 2112+ 'captcha-edit' => "Për fe-ie dle modìfiche ansima a st'artìcol-sì, për piasì ch'a fasa ël total ambelessì sota
21132113 e ch'a buta l'arzulta ant ël quadrèt ([[Special:Captcha/help|për savejne dë pì]]):",
21142114 'captcha-addurl' => "Soa modìfica a la gionta dj'anliure esterne. Për giutene a vardesse da la reclam aotomatisà, për piasì ch'a fasa ël total ambelessì sota e ch'a buta l'arzultà ant ël quadrèt ([[Special:Captcha/help|për savejne dë pì]]):",
21152115 'captcha-badlogin' => "Për giutene a vardesse da 'nt ij programa ch'a fan ciav fàosse n'aotomàtich, për piasì ch'a fasa ël total ambelessì sota e ch'a buta l'arzultà ant ël quadrèt ([[Special:Captcha/help|për savejne dë pì]]):",
@@ -2189,13 +2189,13 @@
21902190 'captcha-create' => 'Para criar a página, por favor resolva a simples soma abaixo e entre com a resposta no respectivo campo ([[Special:Captcha/help|o que é isto?]])',
21912191 'captchahelp-title' => 'Ajuda com o Captcha',
21922192 'captchahelp-cookies-needed' => 'Você precisa ter cookies habilitados em seu navegador para que possa funcionar',
2193 - 'captchahelp-text' => "Sítios abertos a inserções públicas, como é o caso deste wiki, são vulneráveis a abusos por spammers que utilizam ferramentas automatizadas para inserir seus links em diversos locais.
 2193+ 'captchahelp-text' => "Sítios abertos a inserções públicas, como é o caso deste wiki, são vulneráveis a abusos por spammers que utilizam ferramentas automatizadas para inserir seus links em diversos locais.
21942194 Apesar de remover tais links posteriormente ser possível, eles são um significativo incômodo.
21952195
2196 -Algumas vezes, especialmente ao adicionar novos links externos em uma página, o sistema exibirá uma imagem com uma imagem de um texto colorido ou distorcido e pedirá que você digite as palavras exibidas.
 2196+Algumas vezes, especialmente ao adicionar novos links externos em uma página, o sistema exibirá uma imagem com uma imagem de um texto colorido ou distorcido e pedirá que você digite as palavras exibidas.
21972197 Uma vez que essa é uma tarefa um tanto difícil de ser automatizada, ela possibilita que vários humanos façam as suas inserções ao mesmo tempo que inibe as que forem feitas por spammers e mecanismos automatizados.
21982198
2199 -Infelizmente, isso pode ser dificultoso a utilizadores com limitações visuais ou que naveguem através de mecanismos baseados em texto ou baseados em voz. No momento não há uma alternativa em áudio.
 2199+Infelizmente, isso pode ser dificultoso a utilizadores com limitações visuais ou que naveguem através de mecanismos baseados em texto ou baseados em voz. No momento não há uma alternativa em áudio.
22002200 Por gentileza, contacte os administradores do sítio em casos que seja necessária a assistência de alguém para que você possa fazer as suas inserções legítimas.
22012201
22022202 Pressione o botão 'voltar' de seu navegador para retornar à página de edição.",
@@ -2234,7 +2234,7 @@
22352235
22362236 Uneori, mai ales la adăugarea de legături web noi într-o pagină, situl wiki vă poate arăta o imagine cu un text colorat sau distorsionat şi veţi fi rugat să introduceţi cuvintele indicate. Deoarece aceasta este o sarcină greu de automatizat, ea permite majorităţii persoanelor reale să posteze şi va opri majoritatea atacatorilor.
22372237
2238 -Din nefericire, această metodă îi poate deranja pe utilizatorii cu probleme vizuale sau care folosesc browsere bazate pe text sau sunet. În acest moment nu avem o alternativă audio disponibilă.
 2238+Din nefericire, această metodă îi poate deranja pe utilizatorii cu probleme vizuale sau care folosesc browsere bazate pe text sau sunet. În acest moment nu avem o alternativă audio disponibilă.
22392239 Vă rugăm, contactaţi [[{{MediaWiki:Grouppage-sysop}}|administratorii sitului]] pentru asistenţă dacă metoda vă opreşte de la a face postări legitime.
22402240
22412241 Apasă butonul 'Înapoi' al browserului pentru a te reîntoarce la pagina de editare.",
@@ -2259,14 +2259,14 @@
22602260 'captcha-create' => 'Чтобы создать страницу, решите простой пример и введите ответ в текстовое поле ([[Special:Captcha/help|что это?]]):',
22612261 'captchahelp-title' => 'Справка о CAPTCHA',
22622262 'captchahelp-cookies-needed' => 'Вам нужно включить куки в браузере, чтобы эта функция заработала.',
2263 - 'captchahelp-text' => 'Веб-сайты, позволяющие добавлять и изменять своё содержимое, в том числе эта вики, часто становятся целью спамеров, использующих программы для автоматического добавления ссылок на многие сайты.
 2263+ 'captchahelp-text' => 'Веб-сайты, позволяющие добавлять и изменять своё содержимое, в том числе эта вики, часто становятся целью спамеров, использующих программы для автоматического добавления ссылок на многие сайты.
22642264 Хотя такие ссылки могут быть впоследствии удалены, они являются существенной помехой.
22652265
2266 -При некоторых действиях — например, при добавлении на страницу новой веб-ссылки — вы можете увидеть специальную картинку с цветным или искажённым текстом, и вам будет предложено ввести этот искажённый текст.
 2266+При некоторых действиях — например, при добавлении на страницу новой веб-ссылки — вы можете увидеть специальную картинку с цветным или искажённым текстом, и вам будет предложено ввести этот искажённый текст.
22672267 Так как распознавание искажённого текста является сложной задачей для программ, то большинство спамерских и вандальных программ не могут с ней справиться, в то время как люди справляются легко.
22682268
2269 -К сожалению, подобная защита может причинить неудобства людям с ограничениями по зрению или тем, кто использует текстовые или читающие браузеры.
2270 -В настоящее время у нас нет звуковой альтернативы данной проверке.
 2269+К сожалению, подобная защита может причинить неудобства людям с ограничениями по зрению или тем, кто использует текстовые или читающие браузеры.
 2270+В настоящее время у нас нет звуковой альтернативы данной проверке.
22712271 Пожалуйста, обратитесь за помощью к [[{{MediaWiki:Grouppage-sysop}}|администраторам]], если подобная проверка мешает вам добросовестно работать с сайтом.
22722272
22732273 Нажмите кнопку «Назад» в вашем браузере, чтобы вернуться к редактированию.',
@@ -2591,7 +2591,7 @@
25922592 కొన్నిసార్లు, ముఖ్యంగా ఏదైనా పేజీ నుండి బయటకు లింకులు ఇచ్చేటపుడు, వంకర్లు తిరిగిపోయి ఉన్న పదాల బొమ్మను చూపించి ఆ పదాన్ని టైపు చెయ్యమని వికీ మిమ్మల్ని అడగవచ్చు. దీన్ని ఆటోమాటిక్ టూల్సుతో చెయ్యడం చాలా కష్టం కాబట్టి, స్పాము జిత్తులు చెల్లవు; మనుష్యులు మాత్రం మామూలుగానే చెయ్యగలరు.
25932593
25942594 దురదృష్టవశాత్తూ, చూపు సరిగా లేనివారికి, టెక్స్టు బ్రౌజర్లు మాత్రమే వాడేవారికి ఇది అసౌకర్యం కలిగిస్తుంది. ప్రస్తుతానికి శబ్దం వినిపించే వెసులుబాటు మాకు లేదు. మీరు రచనలు చెయ్యకుండా ఇది అడ్డుపడుతుంటే, సహాయం కోసం సైటు నిర్వాహకుణ్ణి సంప్రదించండి.
2595 -మీరు చెసే విలువయిన, సమ్మతమయిన వ్యాస మార్పులు భద్రపరచటము కుదరకపొతె, దయచేసి [[{{MediaWiki:Grouppage-sysop}}|సైటు నిర్వహణాధికారి]]కి లేఖ రాయండి
 2595+మీరు చెసే విలువయిన, సమ్మతమయిన వ్యాస మార్పులు భద్రపరచటము కుదరకపొతె, దయచేసి [[{{MediaWiki:Grouppage-sysop}}|సైటు నిర్వహణాధికారి]]కి లేఖ రాయండి
25962596 మీ బ్రౌజర్లోని బ్యాక్(back) మీటను నొక్కి ఇంతకు ముందరి పేజీకి వెళ్ళండి.',
25972597 'captcha-addurl-whitelist' => ' #<!-- ఈ వాఖ్యాన్ని మొత్తం ఉన్నదున్నట్లు ఇలాగే వదిలేయండి --> <pre>
25982598 # ఇక్కడ రాయాల్సిన విధానం ఇదీ:
@@ -2618,7 +2618,7 @@
26192619
26202620 Дар пораи аз маворид, ба вижа замоне, ки як пайванди интернетии ҷадид ба саҳифа изофа мешавад, вики метавонад, як тасвир аз ҳуруфи рангӣ ё матни бенурро ба шумо нишон бидиҳад ва аз шумо ворид кардани калимаи нишондодашударо пурсон мешавад. Ба хотири ин ки анҷоми ин кор ба шакли худкор душвор аст, ин амал ба аксари инсонҳое иҷозат медиҳад, ки ба ирсоли матолиб бипардозанд, дар ҳоле ки бештар роботҳои ҳамлакунанда ва ҳаразнигорҳоро мутавақиф мекунад.
26212621
2622 -Мутассифона ин равиш мумкин аст, корбароне, ки қувваи босираашон суст ё аз мурургарҳои матнӣ ё овозӣ истифода мекунанд, дучори маҳдудиятҳое бикунад. Дар ҳоли ҳозир ҳеҷ чойгузини савтӣ барои ин равиш мавҷуд нест. Чунончи ин масъала шуморо дучори маҳдудияте дур аз интизор дар ирсоли навиштаҳои миҷоз мекунад, бо мудирони сомона оиди кӯмак тамос бигиред.
 2622+Мутассифона ин равиш мумкин аст, корбароне, ки қувваи босираашон суст ё аз мурургарҳои матнӣ ё овозӣ истифода мекунанд, дучори маҳдудиятҳое бикунад. Дар ҳоли ҳозир ҳеҷ чойгузини савтӣ барои ин равиш мавҷуд нест. Чунончи ин масъала шуморо дучори маҳдудияте дур аз интизор дар ирсоли навиштаҳои миҷоз мекунад, бо мудирони сомона оиди кӯмак тамос бигиред.
26232623
26242624 Дар муругаратон тугмаи 'бозгашт'-ро бо пахш кардан ба саҳифаи вироишгар баргардед.",
26252625 'captcha-addurl-whitelist' => ' #<!—ин сатрро ҳамон гуна, ки ҳаст раҳо кунед --> <pre>
@@ -2788,7 +2788,7 @@
27892789 'captchahelp-text' => 'Những website cho phép bất kỳ ai cũng có thể gửi thông tin, như wiki này, thường bị các tay spam dùng công cụ tự động để gửi các liên kết của họ tới rất nhiều trang.
27902790 Tuy chúng ta có thể xóa các liên kết này khỏi trang, chúng vẫn gây nhiều phiền toái.
27912791
2792 -Đôi khi, nhất là khi bạn bổ sung liên kết mới vào trang, wiki có thể hiển thị một hình có chữ dạng màu mè và méo mó rồi yêu cầu bạn gõ lại các chữ trong hình này.
 2792+Đôi khi, nhất là khi bạn bổ sung liên kết mới vào trang, wiki có thể hiển thị một hình có chữ dạng màu mè và méo mó rồi yêu cầu bạn gõ lại các chữ trong hình này.
27932793 Do các phần mềm tự động khó đọc những hình này, nên mọi người bình thường có thể tiếp tục gửi thông tin, mà vẫn chặn được các spam và robot phá hoại.
27942794
27952795 Tuy vậy, tính năng này có thể bất tiện đối với những độc giả có thị giác yếu hay đang sử dụng trình duyệt bằng văn bản thuần hay trình duyệt bằng tiếng nói.
Index: trunk/extensions/ConfirmEdit/MathCaptcha.class.php
@@ -7,26 +7,26 @@
88 return (int)$answer == (int)$info['answer'];
99 }
1010
11 - function addCaptchaAPI(&$resultArr) {
 11+ function addCaptchaAPI( &$resultArr ) {
1212 list( $sum, $answer ) = $this->pickSum();
13 - $index = $this->storeCaptcha( array('answer' => $answer ) );
 13+ $index = $this->storeCaptcha( array( 'answer' => $answer ) );
1414 $resultArr['captcha']['type'] = 'math';
1515 $resultArr['captcha']['mime'] = 'text/tex';
1616 $resultArr['captcha']['id'] = $index;
1717 $resultArr['captcha']['question'] = $sum;
1818 }
19 -
 19+
2020 /** Produce a nice little form */
2121 function getForm() {
2222 list( $sum, $answer ) = $this->pickSum();
2323 $index = $this->storeCaptcha( array( 'answer' => $answer ) );
24 -
 24+
2525 $form = '<table><tr><td>' . $this->fetchMath( $sum ) . '</td>';
2626 $form .= '<td>' . Xml::input( 'wpCaptchaWord', false, false, array( 'tabindex' => '1' ) ) . '</td></tr></table>';
2727 $form .= Xml::hidden( 'wpCaptchaId', $index );
2828 return $form;
2929 }
30 -
 30+
3131 /** Pick a random sum */
3232 function pickSum() {
3333 $a = mt_rand( 0, 100 );
@@ -36,7 +36,7 @@
3737 $ans = $op == '+' ? ( $a + $b ) : ( $a - $b );
3838 return array( $sum, $ans );
3939 }
40 -
 40+
4141 /** Fetch the math */
4242 function fetchMath( $sum ) {
4343 $math = new MathRenderer( $sum );
@@ -44,6 +44,4 @@
4545 $html = $math->render();
4646 return preg_replace( '/alt=".*?"/', '', $html );
4747 }
48 -
4948 }
50 -?>
Index: trunk/extensions/ConfirmEdit/FancyCaptcha.i18n.php
@@ -536,7 +536,7 @@
537537 * @author Atabek
538538 */
539539 $messages['kaa'] = array(
540 - 'fancycaptcha-createaccount' => "Jan'a akkauntlardın' avtomatik jaratılıwının' aldın alıw ushın, to'mendegi
 540+ 'fancycaptcha-createaccount' => "Jan'a akkauntlardın' avtomatik jaratılıwının' aldın alıw ushın, to'mendegi
541541 ko'rsetilgen so'zlerdi kiritin'([[{{ns:special}}:Captcha/help|ko'birek mag'lıwmat]]):",
542542 );
543543
Index: trunk/extensions/ConfirmEdit/QuestyCaptcha.class.php
@@ -14,7 +14,7 @@
1515 return strtolower( $answer ) == strtolower( $info['answer'] );
1616 }
1717
18 - function addCaptchaAPI(&$resultArr) {
 18+ function addCaptchaAPI( &$resultArr ) {
1919 $captcha = $this->getCaptcha();
2020 $index = $this->storeCaptcha( $captcha );
2121 $resultArr['captcha']['type'] = 'question';
@@ -22,15 +22,15 @@
2323 $resultArr['captcha']['id'] = $index;
2424 $resultArr['captcha']['question'] = $captcha['question'];
2525 }
26 -
 26+
2727 function getCaptcha() {
2828 global $wgCaptchaQuestions;
29 - return $wgCaptchaQuestions[mt_rand( 0, count( $wgCaptchaQuestions )-1 )]; //pick a question, any question
 29+ return $wgCaptchaQuestions[mt_rand( 0, count( $wgCaptchaQuestions ) - 1 )]; // pick a question, any question
3030 }
31 -
 31+
3232 function getForm() {
3333 $captcha = $this->getCaptcha();
34 - if(!$captcha) {
 34+ if ( !$captcha ) {
3535 die( "No questions found; set some in LocalSettings.php using the format from QuestyCaptcha.php." );
3636 }
3737 $index = $this->storeCaptcha( $captcha );
@@ -46,7 +46,7 @@
4747 'id' => 'wpCaptchaId',
4848 'value' => $index ) );
4949 }
50 -
 50+
5151 function getMessage( $action ) {
5252 $name = 'questycaptcha-' . $action;
5353 $text = wfMsg( $name );
@@ -54,7 +54,7 @@
5555 # the default for edits
5656 return wfEmptyMsg( $name, $text ) ? wfMsg( 'questycaptcha-edit' ) : $text;
5757 }
58 -
 58+
5959 function showHelp() {
6060 global $wgOut, $ceAllowConfirmedEmail;
6161 $wgOut->setPageTitle( wfMsg( 'captchahelp-title' ) );
@@ -63,5 +63,4 @@
6464 $wgOut->addWikiText( wfMsg( 'captchahelp-cookies-needed' ) );
6565 }
6666 }
67 -
68 -}
\ No newline at end of file
 67+}
Property changes on: trunk/extensions/ConfirmEdit/QuestyCaptcha.class.php
___________________________________________________________________
Name: svn:executable
6968 - *
Index: trunk/extensions/ConfirmEdit/ConfirmEdit.php
@@ -95,7 +95,7 @@
9696
9797 /**
9898 * You may wish to apply special rules for captcha triggering on some namespaces.
99 - * $wgCaptchaTriggersOnNamespace[<namespace id>][<trigger>] forces an always on /
 99+ * $wgCaptchaTriggersOnNamespace[<namespace id>][<trigger>] forces an always on /
100100 * always off configuration with that trigger for the given namespace.
101101 * Leave unset to use the global options ($wgCaptchaTriggers).
102102 *
@@ -103,9 +103,9 @@
104104 */
105105 $wgCaptchaTriggersOnNamespace = array();
106106
107 -#Example:
108 -#$wgCaptchaTriggersOnNamespace[NS_TALK]['create'] = false; //Allow creation of talk pages without captchas.
109 -#$wgCaptchaTriggersOnNamespace[NS_PROJECT]['edit'] = true; //Show captcha whenever editing Project pages.
 107+# Example:
 108+# $wgCaptchaTriggersOnNamespace[NS_TALK]['create'] = false; //Allow creation of talk pages without captchas.
 109+# $wgCaptchaTriggersOnNamespace[NS_PROJECT]['edit'] = true; //Show captcha whenever editing Project pages.
110110
111111 /**
112112 * Indicate how to store per-session data required to match up the
@@ -148,7 +148,7 @@
149149 global $ceAllowConfirmedEmail;
150150 $ceAllowConfirmedEmail = false;
151151
152 -/**
 152+/**
153153 * Number of bad login attempts before triggering the captcha. 0 means the
154154 * captcha is presented on the first login.
155155 */
@@ -194,8 +194,8 @@
195195 # Register API hook
196196 $wgHooks['APIEditBeforeSave'][] = 'ConfirmEditHooks::confirmEditAPI';
197197
198 -$wgAutoloadClasses['ConfirmEditHooks']
199 - = $wgAutoloadClasses['SimpleCaptcha']
 198+$wgAutoloadClasses['ConfirmEditHooks']
 199+ = $wgAutoloadClasses['SimpleCaptcha']
200200 = $wgAutoloadClasses['CaptchaSessionStore']
201201 = $wgAutoloadClasses['CaptchaCacheStore']
202202 = $wgAutoloadClasses['CaptchaSpecialPage']
@@ -206,7 +206,7 @@
207207 */
208208 function confirmEditSetup() {
209209 global $wgGroupPermissions, $wgCaptchaTriggers;
210 - if( !$wgGroupPermissions['*']['read'] && $wgCaptchaTriggers['badlogin'] ) {
 210+ if ( !$wgGroupPermissions['*']['read'] && $wgCaptchaTriggers['badlogin'] ) {
211211 // We need to ensure that the captcha interface is accessible
212212 // so that unauthenticated users can actually get in after a
213213 // mistaken password typing.
@@ -217,5 +217,3 @@
218218 $wgWhitelistRead[] = $help->getPrefixedText();
219219 }
220220 }
221 -
222 -
Index: trunk/extensions/ConfirmEdit/FancyCaptcha.php
@@ -37,6 +37,5 @@
3838 global $wgCaptchaSecret;
3939 $wgCaptchaSecret = "CHANGE_THIS_SECRET!";
4040
41 -$wgExtensionMessagesFiles['FancyCaptcha'] = dirname(__FILE__).'/FancyCaptcha.i18n.php';
 41+$wgExtensionMessagesFiles['FancyCaptcha'] = dirname( __FILE__ ) . '/FancyCaptcha.i18n.php';
4242 $wgAutoloadClasses['FancyCaptcha'] = dirname( __FILE__ ) . '/FancyCaptcha.class.php';
43 -
Index: trunk/extensions/ConfirmEdit/MathCaptcha
@@ -39,7 +39,7 @@
4040 require_once( 'extensions/ConfirmEdit.php' );
4141 require_once( 'extensions/MathCaptcha.php' );
4242 $wgCaptchaClass = 'MathCaptcha';
43 -
 43+
4444 This installs ConfirmEdit and instructs it to use the MathCaptcha plugin.
4545 The default settings for ConfirmEdit are used. At this point, no further
4646 action is required to have the plugin work for user registration or edits
@@ -73,4 +73,4 @@
7474 i. http://en.wikipedia.org/wiki/Captcha
7575 ii. http://meta.wikimedia.org/wiki/ConfirmEdit
7676 iii. http://meta.wikimedia.org/wiki/Enable_TeX
77 -iv. http://www.mediawiki.org/wiki/Subversion
\ No newline at end of file
 77+iv. http://www.mediawiki.org/wiki/Subversion
Index: trunk/extensions/ConfirmEdit/FancyCaptcha.class.php
@@ -15,7 +15,7 @@
1616 $digest = $wgCaptchaSecret . $info['salt'] . $answer . $wgCaptchaSecret . $info['salt'];
1717 $answerHash = substr( md5( $digest ), 0, 16 );
1818
19 - if( $answerHash == $info['hash'] ) {
 19+ if ( $answerHash == $info['hash'] ) {
2020 wfDebug( "FancyCaptcha: answer hash matches expected {$info['hash']}\n" );
2121 return true;
2222 } else {
@@ -24,9 +24,9 @@
2525 }
2626 }
2727
28 - function addCaptchaAPI(&$resultArr) {
 28+ function addCaptchaAPI( &$resultArr ) {
2929 $info = $this->pickImage();
30 - if( !$info ) {
 30+ if ( !$info ) {
3131 $resultArr['captcha']['error'] = 'Out of images';
3232 return;
3333 }
@@ -35,7 +35,7 @@
3636 $resultArr['captcha']['type'] = 'image';
3737 $resultArr['captcha']['mime'] = 'image/png';
3838 $resultArr['captcha']['id'] = $index;
39 - $resultArr['captcha']['url'] = $title->getLocalUrl( 'wpCaptchaId=' . urlencode( $index ) );
 39+ $resultArr['captcha']['url'] = $title->getLocalUrl( 'wpCaptchaId=' . urlencode( $index ) );
4040 }
4141
4242 /**
@@ -43,7 +43,7 @@
4444 */
4545 function getForm() {
4646 $info = $this->pickImage();
47 - if( !$info ) {
 47+ if ( !$info ) {
4848 die( "out of captcha images; this shouldn't happen" );
4949 }
5050
@@ -87,27 +87,27 @@
8888 $wgCaptchaDirectory,
8989 $wgCaptchaDirectoryLevels );
9090 }
91 -
 91+
9292 function pickImageDir( $directory, $levels ) {
93 - if( $levels ) {
 93+ if ( $levels ) {
9494 $dirs = array();
95 -
 95+
9696 // Check which subdirs are actually present...
9797 $dir = opendir( $directory );
98 - while( false !== ($entry = readdir( $dir ) ) ) {
99 - if( ctype_xdigit( $entry ) && strlen( $entry ) == 1 ) {
 98+ while ( false !== ( $entry = readdir( $dir ) ) ) {
 99+ if ( ctype_xdigit( $entry ) && strlen( $entry ) == 1 ) {
100100 $dirs[] = $entry;
101101 }
102102 }
103103 closedir( $dir );
104 -
 104+
105105 $place = mt_rand( 0, count( $dirs ) - 1 );
106106 // In case all dirs are not filled,
107107 // cycle through next digits...
108 - for( $j = 0; $j < count( $dirs ); $j++ ) {
109 - $char = $dirs[($place + $j) % count( $dirs )];
 108+ for ( $j = 0; $j < count( $dirs ); $j++ ) {
 109+ $char = $dirs[( $place + $j ) % count( $dirs )];
110110 $return = $this->pickImageDir( "$directory/$char", $levels - 1 );
111 - if( $return ) {
 111+ if ( $return ) {
112112 return $return;
113113 }
114114 }
@@ -117,9 +117,9 @@
118118 return $this->pickImageFromDir( $directory );
119119 }
120120 }
121 -
 121+
122122 function pickImageFromDir( $directory ) {
123 - if( !is_dir( $directory ) ) {
 123+ if ( !is_dir( $directory ) ) {
124124 return false;
125125 }
126126 $n = mt_rand( 0, $this->countFiles( $directory ) - 1 );
@@ -129,9 +129,9 @@
130130
131131 $entry = readdir( $dir );
132132 $pick = false;
133 - while( false !== $entry ) {
 133+ while ( false !== $entry ) {
134134 $entry = readdir( $dir );
135 - if( preg_match( '/^image_([0-9a-f]+)_([0-9a-f]+)\\.png$/', $entry, $matches ) ) {
 135+ if ( preg_match( '/^image_([0-9a-f]+)_([0-9a-f]+)\\.png$/', $entry, $matches ) ) {
136136 $size = getimagesize( "$directory/$entry" );
137137 $pick = array(
138138 'salt' => $matches[1],
@@ -140,7 +140,7 @@
141141 'height' => $size[1],
142142 'viewed' => false,
143143 );
144 - if( $count++ == $n ) {
 144+ if ( $count++ == $n ) {
145145 break;
146146 }
147147 }
@@ -156,8 +156,8 @@
157157 function countFiles( $dirname ) {
158158 $dir = opendir( $dirname );
159159 $count = 0;
160 - while( false !== ($entry = readdir( $dir ) ) ) {
161 - if( $entry != '.' && $entry != '..' ) {
 160+ while ( false !== ( $entry = readdir( $dir ) ) ) {
 161+ if ( $entry != '.' && $entry != '..' ) {
162162 $count++;
163163 }
164164 }
@@ -171,7 +171,7 @@
172172 $wgOut->disable();
173173
174174 $info = $this->retrieveCaptcha();
175 - if( $info ) {
 175+ if ( $info ) {
176176 /*
177177 // Be a little less restrictive for now; in at least some circumstances,
178178 // Konqueror tries to reload the image even if you haven't navigated
@@ -189,7 +189,7 @@
190190 $hash = $info['hash'];
191191 $file = $this->imagePath( $salt, $hash );
192192
193 - if( file_exists( $file ) ) {
 193+ if ( file_exists( $file ) ) {
194194 global $IP;
195195 require_once "$IP/includes/StreamFile.php";
196196 header( "Cache-Control: private, s-maxage=0, max-age=3600" );
@@ -200,13 +200,13 @@
201201 wfHttpError( 500, 'Internal Error', 'Requested bogus captcha image' );
202202 return false;
203203 }
204 -
 204+
205205 function imagePath( $salt, $hash ) {
206206 global $wgCaptchaDirectory, $wgCaptchaDirectoryLevels;
207207 $file = $wgCaptchaDirectory;
208208 $file .= DIRECTORY_SEPARATOR;
209 - for( $i = 0; $i < $wgCaptchaDirectoryLevels; $i++ ) {
210 - $file .= $hash{$i};
 209+ for ( $i = 0; $i < $wgCaptchaDirectoryLevels; $i++ ) {
 210+ $file .= $hash { $i } ;
211211 $file .= DIRECTORY_SEPARATOR;
212212 }
213213 $file .= "image_{$salt}_{$hash}.png";
@@ -227,5 +227,4 @@
228228 # the default for edits
229229 return wfEmptyMsg( $name, $text ) ? wfMsg( 'fancycaptcha-edit' ) : $text;
230230 }
231 -
232231 }
Index: trunk/extensions/Translate/groups/mediawiki-defines.txt
@@ -191,6 +191,11 @@
192192 descmsg = fancycaptcha-desc
193193 optional = fancycaptcha-desc
194194
 195+ConfirmEdit Questy Captcha
 196+file = ConfirmEdit/QuestyCaptcha.i18n.php
 197+descmsg = questycaptcha-desc
 198+optional = questycaptcha-desc
 199+
195200 Contact Page
196201
197202 Contribution Reporting

Status & tagging log