Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344185 )

Change subject: Drop the pointless "AllowCiteGroups" config setting
......................................................................

Drop the pointless "AllowCiteGroups" config setting

Bug: T161144
Change-Id: Ie1454926b8bfa108a62d088991e66b6dae9c9f10
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M includes/Cite.php
M tests/parser/citeParserTests.txt
5 files changed, 5 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cite 
refs/changes/85/344185/1

diff --git a/extension.json b/extension.json
index ac9cd43..fe11a5a 100644
--- a/extension.json
+++ b/extension.json
@@ -90,7 +90,6 @@
                "cite": "GlobalVarConfig::newInstance"
        },
        "config": {
-               "AllowCiteGroups": true,
                "CiteCacheReferences": false,
                "CiteStoreReferencesData": false,
                "CiteCacheReferencesDataOnParse": false,
diff --git a/i18n/en.json b/i18n/en.json
index fb497a3..10e5dce 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -25,8 +25,7 @@
        "cite_error_ref_too_many_keys": "Invalid <code>&lt;ref&gt;</code> 
tag;\ninvalid names, e.g. too many",
        "cite_error_ref_no_input": "Invalid <code>&lt;ref&gt;</code> tag;\nrefs 
with no name must have content",
        "cite_error_references_duplicate_key": "Invalid 
<code>&lt;ref&gt;</code> tag; name \"$1\" defined multiple times with different 
content",
-       "cite_error_references_invalid_parameters": "Invalid 
<code>&lt;references&gt;</code> tag;\nno parameters are allowed.\nUse 
<code>&lt;references /&gt;</code>",
-       "cite_error_references_invalid_parameters_group": "Invalid parameter in 
<code>&lt;references&gt;</code> tag",
+       "cite_error_references_invalid_parameters": "Invalid parameter in 
<code>&lt;references&gt;</code> tag",
        "cite_error_references_no_backlink_label": "Ran out of custom backlink 
labels.\nDefine more in the <nowiki>[[MediaWiki:Cite references link many 
format backlink labels]]</nowiki> message.",
        "cite_error_no_link_label_group": "Ran out of custom link labels for 
group \"$1\".\nDefine more in the <nowiki>[[MediaWiki:$2]]</nowiki> message.",
        "cite_error_references_no_text": "Invalid <code>&lt;ref&gt;</code> 
tag;\nno text was provided for refs named <code>$1</code>",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 230a5e2..1b7b4b1 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -26,7 +26,6 @@
        "cite_error_ref_no_input": "Cite extension. Error message shown when 
ref tags without names have no content. An example that cause this error is 
<code><nowiki><ref></ref></nowiki></code>",
        "cite_error_references_duplicate_key": "Cite extension. Error message 
shown when multiple refs with same name exist but with different content",
        "cite_error_references_invalid_parameters": "Cite extension. Error 
message shown when parmeters are used in the references tag. An example that 
cause this error is <code><nowiki><references someparameter=\"value\" 
/></nowiki></code>",
-       "cite_error_references_invalid_parameters_group": "Cite extension. 
Error message shown when unknown parameters are used in the references tag. An 
example that cause this error is <samp><nowiki><references 
someparameter=\"value\" /></nowiki></samp>",
        "cite_error_references_no_backlink_label": "Cite extension. Error 
message shown in the references tag when the same name is used for too many ref 
tags. Too many in this case is more than there are backlink labels defined in 
[[MediaWiki:Cite references link many format backlink labels]].\n\nIt is not 
possible to make a clickable link to this message. \"nowiki\" is mandatory 
around [[MediaWiki:Cite references link many format backlink labels]].",
        "cite_error_no_link_label_group": "*'''$1''' is the name of a reference 
group.\n*'''$2''' is <code>cite_link_label_group-<i>groupname</i></code>.",
        "cite_error_references_no_text": "Cite extension. This error occurs 
when the tag <code><nowiki><ref name=\"something\" /></nowiki></code> is used 
with the name-option specified and no other tag specifies a cite-text for this 
name.\n\nParameters:\n* $1 - key of the ref",
diff --git a/includes/Cite.php b/includes/Cite.php
index eca6a57..e44fd50 100644
--- a/includes/Cite.php
+++ b/includes/Cite.php
@@ -388,7 +388,6 @@
         *               input and null on no input
         */
        private function refArg( array $argv ) {
-               global $wgAllowCiteGroups;
                $cnt = count( $argv );
                $group = null;
                $key = null;
@@ -415,10 +414,6 @@
                                --$cnt;
                        }
                        if ( isset( $argv['group'] ) ) {
-                               if ( !$wgAllowCiteGroups ) {
-                                       // remove when groups are fully tested.
-                                       return [ false ];
-                               }
                                // Group given.
                                $group = $argv['group'];
                                unset( $argv['group'] );
@@ -650,11 +645,11 @@
                Parser $parser,
                $group = self::DEFAULT_GROUP
        ) {
-               global $wgAllowCiteGroups, $wgCiteResponsiveReferences;
+               global $wgCiteResponsiveReferences;
 
                $this->mParser = $parser;
 
-               if ( isset( $argv['group'] ) && $wgAllowCiteGroups ) {
+               if ( isset( $argv['group'] ) ) {
                        $group = $argv['group'];
                        unset( $argv['group'] );
                }
@@ -715,11 +710,7 @@
 
                // There are remaining parameters we don't recognise
                if ( $argv ) {
-                       if ( $wgAllowCiteGroups ) {
-                               return $this->error( 
'cite_error_references_invalid_parameters_group' );
-                       } else {
-                               return $this->error( 
'cite_error_references_invalid_parameters' );
-                       }
+                       return $this->error( 
'cite_error_references_invalid_parameters' );
                }
 
                $s = $this->referencesFormat( $group, $responsive );
diff --git a/tests/parser/citeParserTests.txt b/tests/parser/citeParserTests.txt
index 6e7f038..593a101 100644
--- a/tests/parser/citeParserTests.txt
+++ b/tests/parser/citeParserTests.txt
@@ -288,9 +288,7 @@
 </p><p><span class="error mw-ext-cite-error" lang="en" dir="ltr">Cite error: 
The opening <code>&lt;ref&gt;</code> tag is malformed or has a bad name</span>
 </p><p><sup id="cite_ref-bar_2-0" class="reference"><a 
href="#cite_note-bar-2">&#91;2&#93;</a></sup>
 </p><p><sup id="cite_ref-blankwithnoreference_3-0" class="reference"><a 
href="#cite_note-blankwithnoreference-3">&#91;3&#93;</a></sup>
-</p><p><span class="error mw-ext-cite-error" lang="en" dir="ltr">Cite error: 
Invalid <code>&lt;references&gt;</code> tag;
-parameter "group" is allowed only.
-Use <code>&lt;references /&gt;</code>, or <code>&lt;references group="..." 
/&gt;</code></span>
+</p><p><span class="error mw-ext-cite-error" lang="en" dir="ltr">Invalid 
parameter in <code>&lt;references&gt;</code> tag</span>
 </p>
 <div class="mw-references-wrap"><ol class="references">
 <li id="cite_note-1"><span class="mw-cite-backlink"><a 
href="#cite_ref-1">↑</a></span> <span class="reference-text">Also zero, but 
differently! (Normal ref)</span>

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie1454926b8bfa108a62d088991e66b6dae9c9f10
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cite
Gerrit-Branch: master
Gerrit-Owner: Jforrester <jforres...@wikimedia.org>

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

Reply via email to