Commit graph

22 commits

Author SHA1 Message Date
jenkins-bot 2cf6d26f5a Merge "Use 'unwrap' post-cache transform instead of setWrapOutputClass( false )" 2018-02-01 22:51:49 +00:00
Phantom42 1f103ccb8c Add phan configuration for static analysis
Bug: T179554
Change-Id: I9f099e07e5873c1125b4b75839f0089f59b4fa8b
2017-12-25 18:06:24 +02:00
Brad Jorsch 588618e9e2 Use 'unwrap' post-cache transform instead of setWrapOutputClass( false )
To reduce parser cache fragmentation, core is deprecating
$parserOptions->setWrapOutputClass( false ) in favor of
$parserOutput->getText( [ 'unwrap' => true ] );

Depends-On: Iba16e78c41be992467101e7d83e9c3134765b101
Change-Id: Ie5d6c5ce34c05b8fe2353d3bb36b2a3a4166ec4b
2017-12-22 13:42:36 -05:00
Brad Jorsch e214fe2493 Use ParserOutput stateless transforms
Depends-On: I78b62ec33fcb8273acb9b3b4e9012215442be94c
Change-Id: I30f162aa43c7f513df1153e0884a4339e4279aeb
2017-11-22 17:36:05 -05:00
Bartosz Dziewoński 61fad3f69d Suppress wrapping <div class="mw-parser-output"> around our <citation> tags
This wrapping and the ability to disable it was introduced in MW 1.30.

Bug: T171389
Change-Id: Id2eeda5602c75cafea293abd125989c29d3fc314
2017-10-13 23:17:40 +02:00
Umherirrender 9b6bbc99d0 Improve some parameter docs
Change-Id: Ib81e443362b506772d6b7df1815baaa9f94fa5a6
2017-10-06 21:29:48 +02:00
Kunal Mehta e65849bdbf build: Updating mediawiki/mediawiki-codesniffer to 0.9.0
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.MissingParamComment
* MediaWiki.Commenting.FunctionComment.MissingParamName
* MediaWiki.Commenting.FunctionComment.MissingParamTag
* MediaWiki.Commenting.FunctionComment.ParamNameNoMatch
* MediaWiki.FunctionComment.Missing.Protected
* MediaWiki.FunctionComment.Missing.Public
* MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName

Change-Id: I45ddf6c4adfd3ac81c1da5b3159f1af267b2dad8
2017-06-19 19:32:37 -07:00
Kunal Mehta 2c65135c62 Don't require write access for Special:CiteThisPage
If the database is locked/read-only, this page will still function.

Change-Id: I4f942a173a8a319218f755f27d8b2a3c60ca54d0
2016-11-15 11:55:41 -08:00
Kunal Mehta 5eb4059dc9 Allow blocked users to use Special:CiteThisPage
Bug: T150791
Change-Id: Ie9c2e54e47f387a03e2490edaf5052826dafc4ce
2016-11-15 11:35:17 -08:00
Kunal Mehta 29141dd983 Fix fatal on Special:CiteThisPage
If the form was just viewed, the empty string would bypass validation
and be passed to onSubmit, and $this->title would end up as null. Avoid
that by specially checking for the empty string, and harden in execute()
by checking for an instanceof Title rather than !== false.

Change-Id: Ib43c6ff4a64f6a1d9ad5fc0390d7bc6fe5b07cb4
2016-10-25 12:43:35 -07:00
harej 2f5e43b490 Convert Special:CiteThisPage to use FormSpecialPage
I also changed the style of the output to make it more consistent with the OOjs UI theme.

Bug: T147046
Depends-On: I9bc930e5dca557571b4658444fea6aec59c5797a
Change-Id: I0a2aaf7b94c37b1408311b2244c308a3f76a33eb
2016-10-20 20:59:27 +00:00
Kunal Mehta 096f6e91fc Rewrite to avoid messing with global state
The main goal of this rewrite is to not use or mess with any global
state.

The ParserGetVariableValueTs and ParserGetVariableValueVarCache hooks
were replaced with setting the timestamp via
ParserOptions::setTimestamp(). This also means that {{#time:...}} from
ParserFunctions extension will correctly use the page's timestamp
instead of the current one.

Disabling tidy is also done using ParserOptions instead of changing
global state.

Change-Id: Ib2810aa5891c57831380a1a4718656cc09932b96
2016-09-19 16:29:14 -07:00
Kunal Mehta 3e9bbe6b6d Remove pre-1.24 compat code
Extension already requires 1.25+.

Change-Id: I3f8453606b92e1a3147af01dee928804a8b910bf
2016-09-19 14:20:12 -07:00
Kunal Mehta a7fc55d07d build: Updating mediawiki/mediawiki-codesniffer to 0.7.1
Also added "composer fix" command.

Change-Id: Ib4160f107ae6ac2bea84ee3e1ccaf6de47372c2b
2016-05-09 16:36:56 -07:00
Umherirrender 52f3c0ac29 Allow auto suggestion for subpages of Special:CiteThisPage
The autocomplete search allows special pages to define the list of
subpages to be excepted. Fill up the function to show auto suggestion
for subpages of Special:CiteThisPage

Change-Id: I2426f21358644d2e6212fb239b2a3ad56fb1398f
2016-01-30 21:08:53 +01:00
Paladox f403a8d42e Add php code sniffer
Change-Id: I95b39047cf07694b276728d2831bc811ee9e329d
2016-01-16 12:52:10 +00:00
umherirrender 9198c04a02 Replace deprecated $wgSpecialPageGroups
$wgSpecialPageGroups is deprecated since 1.21
override SpecialPage::getGroupName instead

Change-Id: I34c23170b839ac876bcdf5b384d4a14a9c5f7f02
2015-05-15 22:00:37 +02:00
umherirrender 835d48b753 MW_DATE_DEFAULT -> 'default'
Replaced global const by the value, because it is the only use found in
all extensions.

Change-Id: I2b3efe143b7daad300c0b2eb4a6292f7db5e70b4
2015-01-24 17:43:35 +01:00
Kunal Mehta a66bf85ce2 Fix styles not showing up, and use addModuleStyles since it's only CSS
Change-Id: Ia624e85c265740d39830e5095565f56ceeac2285
2014-10-07 19:32:29 +00:00
Kunal Mehta 80bbb353b1 Set visiblity for functions on SpecialCiteThisPage
Change-Id: I9bedaba9f9aa72af4ef4405617b14aa656fbfe1b
2014-10-07 20:31:00 +01:00
Kunal Mehta b3d1abea63 Remove CiteThisPageForm, fold into SpecialCiteThisPage
Change-Id: I46cc6cd167d478fa2e28894eb3f6a4f2a80a4060
2014-09-22 09:53:11 -07:00
James D. Forrester 7c705dbac3 Rename to "CiteThisPage", make Special:CiteThisPage the primary location
Also remove vestiges of the Cite extension from when this used to live in
the same repo.

Change-Id: I17dfad706d46afb452e8ff29140834174470b398
2014-08-30 15:29:33 -07:00
Renamed from SpecialCite_body.php (Browse further)