Go to file
Thiemo Kreuz (WMDE) 5401fcd190 Revert a part of "Add missing test cases for follow="…""
This partly reverts commit 8e42a6ecdf.

The variabe $k as created by the foreach() loop is not necessarily
numeric, because the $this->mRef structure contains data both for
named and unnamed <ref>s. The array key is a (non-numeric) string for
named, and an integer for unnamed <ref>s.

array_splice() requires a position, not an array key.

Note that both implementations are wrong. The foreach() might return a
string $k, which makes array_splice() complain and do unwanted things.
The for() loop assumes there are count() array elements with integer
keys, which might not be true. Luckily this was not a problem, because
the isset() check would stop the (to long) loop eary enough.

A better rewrite as well as a test case for this will be added with
I3bdf26f.

Change-Id: I5568d3084197f1861f9dc8983d8b606a961e201f
2019-11-23 22:11:17 +01:00
.phan build: Upgrade mediawiki/mediawiki-phan-config from 0.5.0 to 0.6.0 2019-05-19 11:26:43 +00:00
i18n Merge "Move bad dir="…" error reporting down to the renderer" 2019-11-22 13:46:44 +00:00
modules Localisation updates from https://translatewiki.net. 2019-11-22 09:13:52 +01:00
src Revert a part of "Add missing test cases for follow="…"" 2019-11-23 22:11:17 +01:00
tests Sync up with Parsoid citeParserTests.txt 2019-11-22 18:44:22 +00:00
.eslintrc.json build: Update linters 2019-11-15 16:27:21 +00:00
.gitignore build: Upgrade eslint-config-wikimedia from 0.10.1 to 0.11.0 2019-04-03 22:58:56 +00:00
.gitreview Whoops, track not trace 2016-10-24 17:02:15 -07:00
.phpcs.xml Fix all PHPCS issues and add missing array type hints 2019-10-17 09:23:20 +02:00
.stylelintrc.json Use json extension for .stylelintrc 2017-08-19 09:39:19 +02:00
AUTHORS.txt Fix expected remove data to match actual remove data exactly 2017-08-13 11:41:30 -04:00
CODE_OF_CONDUCT.md build: Updating mediawiki/mediawiki-codesniffer to 22.0.0 2018-09-02 23:29:58 +00:00
composer.json build: Updating mediawiki/mediawiki-phan-config to 0.8.0 2019-11-01 23:50:43 +01:00
COPYING.txt Add license details and give credit to more authors (based on git shortlog) 2014-07-26 16:16:47 -07:00
extension.json Move all code to PSR-4 compatible namespaces 2019-11-20 17:00:13 +01:00
Gruntfile.js build: Update linters 2019-11-15 16:27:21 +00:00
MIT-LICENSE.txt doc: Bump copyright year 2018-01-02 17:05:50 -08:00
package-lock.json build: Update linters 2019-11-15 16:27:21 +00:00
package.json build: Update linters 2019-11-15 16:27:21 +00:00
README.md Fix bad settings name CiteCacheReferencesDataOnParse 2019-11-19 16:13:07 +01:00

Cite

The Cite extension provides a way for users to create references as footnotes to articles.

See https://www.mediawiki.org/wiki/Extension:Cite for detailed documentation.

Configuration

  • $wgCiteStoreReferencesData: If set to true, references are saved in the database so that other extensions can retrieve them independently of the main article content.
  • $wgCiteCacheRawReferencesOnParse: ($wgCiteStoreReferencesData required) By default, references are cached only on database access. If set to true, references are also cached whenever pages are parsed.