Florianschmidtwelzow has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/212571

Change subject: Mobe QuestyCaptcha to it's own place
......................................................................

Mobe QuestyCaptcha to it's own place

Bug: T88047
Change-Id: I8c8f97d49dc39445dbba9c12909b81898838a253
---
D QuestyCaptcha.i18n.php
M QuestyCaptcha.php
R QuestyCaptcha/QuestyCaptcha.class.php
A QuestyCaptcha/QuestyCaptcha.php
4 files changed, 48 insertions(+), 82 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ConfirmEdit 
refs/changes/71/212571/1

diff --git a/QuestyCaptcha.i18n.php b/QuestyCaptcha.i18n.php
deleted file mode 100644
index 4088d04..0000000
--- a/QuestyCaptcha.i18n.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-/**
- * This is a backwards-compatibility shim, generated by:
- * 
https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
- *
- * Beginning with MediaWiki 1.23, translation strings are stored in json files,
- * and the EXTENSION.i18n.php file only exists to provide compatibility with
- * older releases of MediaWiki. For more information about this migration, see:
- * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format
- *
- * This shim maintains compatibility back to MediaWiki 1.17.
- */
-$messages = array();
-if ( !function_exists( 'wfJsonI18nShim0619ec35d45138ac' ) ) {
-       function wfJsonI18nShim0619ec35d45138ac( $cache, $code, &$cachedData ) {
-               $codeSequence = array_merge( array( $code ), 
$cachedData['fallbackSequence'] );
-               foreach ( $codeSequence as $csCode ) {
-                       $fileName = dirname( __FILE__ ) . 
"/i18n/questy/$csCode.json";
-                       if ( is_readable( $fileName ) ) {
-                               $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
-                               foreach ( array_keys( $data ) as $key ) {
-                                       if ( $key === '' || $key[0] === '@' ) {
-                                               unset( $data[$key] );
-                                       }
-                               }
-                               $cachedData['messages'] = array_merge( $data, 
$cachedData['messages'] );
-                       }
-
-                       $cachedData['deps'][] = new FileDependency( $fileName );
-               }
-               return true;
-       }
-
-       $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 
'wfJsonI18nShim0619ec35d45138ac';
-}
diff --git a/QuestyCaptcha.php b/QuestyCaptcha.php
index 1951ac6..e51266b 100644
--- a/QuestyCaptcha.php
+++ b/QuestyCaptcha.php
@@ -1,48 +1,2 @@
 <?php
-/**
- * A question-based captcha plugin.
- *
- * Copyright (C) 2009 Benjamin Lees <emufarm...@gmail.com>
- * http://www.mediawiki.org/
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * 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
- * 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.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Extensions
- */
-
-if ( !defined( 'MEDIAWIKI' ) ) {
-       exit;
-}
-
-require_once __DIR__ . '/ConfirmEdit.php';
-$wgCaptchaClass = 'QuestyCaptcha';
-
-global $wgCaptchaQuestions;
-$wgCaptchaQuestions = array();
-
-/* Add your questions in LocalSettings.php using this format
-$wgCaptchaQuestions = array(
-       'A question?' => 'An answer!',
-       'What is the capital of France?' => 'Paris', //Answers are normalized 
to lowercase: Paris and paris are the same
-       'What is this wiki's name?' => $wgSitename,
-       '2 + 2 ?' => array( '4', 'four' ), //Questions may have many answers
-);
-*/
-
-$wgMessagesDirs['QuestyCaptcha'] = __DIR__ . '/QuestyCaptcha/i18n';
-$wgExtensionMessagesFiles['QuestyCaptcha'] = __DIR__ . 
'/QuestyCaptcha.i18n.php';
-$wgAutoloadClasses['QuestyCaptcha'] = __DIR__ . '/QuestyCaptcha.class.php';
+require_once __DIR__ . "/QuestyCaptcha/QuestyCaptcha.php";
diff --git a/QuestyCaptcha.class.php b/QuestyCaptcha/QuestyCaptcha.class.php
similarity index 100%
rename from QuestyCaptcha.class.php
rename to QuestyCaptcha/QuestyCaptcha.class.php
diff --git a/QuestyCaptcha/QuestyCaptcha.php b/QuestyCaptcha/QuestyCaptcha.php
new file mode 100644
index 0000000..c9cd28d
--- /dev/null
+++ b/QuestyCaptcha/QuestyCaptcha.php
@@ -0,0 +1,47 @@
+<?php
+/**
+ * A question-based captcha plugin.
+ *
+ * Copyright (C) 2009 Benjamin Lees <emufarm...@gmail.com>
+ * http://www.mediawiki.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * 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
+ * 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Extensions
+ */
+
+if ( !defined( 'MEDIAWIKI' ) ) {
+       exit;
+}
+
+require_once dirname( __DIR__ ) . '/ConfirmEdit.php';
+$wgCaptchaClass = 'QuestyCaptcha';
+
+global $wgCaptchaQuestions;
+$wgCaptchaQuestions = array();
+
+/* Add your questions in LocalSettings.php using this format
+$wgCaptchaQuestions = array(
+       'A question?' => 'An answer!',
+       'What is the capital of France?' => 'Paris', //Answers are normalized 
to lowercase: Paris and paris are the same
+       'What is this wiki's name?' => $wgSitename,
+       '2 + 2 ?' => array( '4', 'four' ), //Questions may have many answers
+);
+*/
+
+$wgMessagesDirs['QuestyCaptcha'] = __DIR__ . '/i18n';
+$wgAutoloadClasses['QuestyCaptcha'] = __DIR__ . '/QuestyCaptcha.class.php';

-- 
To view, visit https://gerrit.wikimedia.org/r/212571
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8c8f97d49dc39445dbba9c12909b81898838a253
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ConfirmEdit
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <florian.schmidt.wel...@t-online.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to