Commit graph

22 commits

Author SHA1 Message Date
Umherirrender 43058c38a2 Use ParserOptions::newFromContext on special page
ParserOptions::newFromUser would use/unstub the global $wgLang,
avoid this when already have a context source available

Change-Id: I7ba7f83742837c1ef5ee7c5e5d2a8728de851d4b
2023-02-23 21:59:01 +01:00
Reedy ac71e9260d SpecialCiteThisPage: Fix string interpolation
Bug: T314096
Change-Id: I591032e07cdffff5b78b6f16a2bc478c4c643a4c
2022-11-04 16:17:09 -06:00
Jon Robson 9f6aa6910a CiteThisPage should use Html:errorBox
Bug: T300306
Change-Id: I6531ad0543a9ccaeecd13c3dee8bc86bb651e6f7
2022-03-23 16:45:26 -07:00
Timo Tijhof 5dd1963eee docs: Fix typo in 'wgCiteThisPageAdditionalNamespaces' reference
Follows-up I2523bd9124ab8998a.

Change-Id: I712fab429cf3bce04ef08e52ef187fb16eead84e
2021-12-06 19:10:05 +01:00
Kosta Harlan 73f8a0dacc Hooks: Handle null case for title/config
Bug: T297103
Change-Id: I72d873d05c376c3a04ebf6b670f6b90c1585b4fe
2021-12-06 13:33:02 +01:00
Umherirrender 1d712736ab Use HookHandlers for core hooks
Bug: T271012
Change-Id: I8fb93e4989d04dfc20cfda15ae5703267b53ddf1
2021-04-15 18:50:57 +00:00
zoranzoki21 9ed81f5199 Fix all PHPCS excludes
Change-Id: If454a4ef9145ba74dd950b249ee8a0bd6ffb621a
2021-03-31 14:10:38 +00:00
Umherirrender 885db8b85b Inject services into SpecialCiteThisPage
MW1.36 needed for SpecialPage::getContentLanguage

Bug: T259960
Change-Id: Ie0c8711c50fb732b16846fe0015d8fd571a02e3e
2021-03-12 21:25:22 +01:00
Umherirrender ab31a3741e Special:CiteThisPage only works on existing pages
This avoids the error message citethispage-badrevision
with "revision 0" text

Change-Id: Ifab27624d70d65f07c2eff11c883701e1192c26d
2021-03-06 21:51:09 +01:00
Reedy 6887a33dcc Namespace extension
Change-Id: I6aeea25c6ed616194fb3b5793428f481dca9806b
2021-02-11 02:03:06 +00:00
Ammar Abdulhamid ec54775b9d Ensure hook callback does not abort SidebarBeforeOutput
SidebarBeforeOutput must not be aborted with false return
value at all.

Bug: T255444
Change-Id: Icccac3e450b2b067cd1185ef7b5d26a2dffcb8dc
2020-06-17 01:41:53 +01:00
Ammar Abdulhamid b9bdc3fc19 Use SidebarBeforeOutput hook to add 'cite this page' sidebar link.
* Remove usage of BaseTemplateToolbox in favor of SidebarBeforeOutput hook
* Also remove SkinTemplateBuildNavUrlsNav_urlsAfterPermalink hook, since SidebarBeforeOutput can provide functionalities of both.

Bug: T253687
Depens-On: Ie10a59048cdf882bad811d3c8fae386d90e93867
Change-Id: Ibe989364b9e500497759e79b789667d0a3430828
2020-05-30 04:49:18 +01:00
C. Scott Ananian 11c8e67661 Avoid using deprecated $wgParserConf configuration variable
Modern code should use the Parser or ParserFactory service.
See I787f22ea9bf59a049b13631ba6974866a1300988.

Bug: T236811
Change-Id: Idf59cd54146d31c1c32883f4318e6a0bf60e1a8a
2020-04-16 15:56:52 -04:00
C. Scott Ananian 742d94e7f4 Remove ParserOptions::setTidy(false), deprecated in MW 1.33
Disabling tidy has been deprecated since MW 1.33 and has no effect
in MW 1.35.  What is actually wanted is Parser::stripOuterParagraph(),
which is what OutputPage::parseInline* does.

Follow up to I821ef3b8f59b272d983583d407b2f0794fe1e791.

Bug: T250307
Change-Id: If227cdd27392fe09b6dfa2364fcbf43194f71200
2020-04-15 18:00:03 -04:00
DannyS712 0bec087364 Remove use of Revision::newFromTitle
Bug: T249183
Change-Id: I00f8e71f2c6e16b220300303c25a41f52331f671
2020-04-07 00:44:35 +00:00
Timo Tijhof 11b28c468f Replace $wgContLanguageCode with $wgLanguageCode
$wgContLanguageCode has been an unconfigurable copy of $wgLanguageCode
since 2006 (MW 1.8).

Bug: T247674
Change-Id: I1d2ec1e63320086fdf9ab7c6321f949c99c1ab2a
2020-03-14 19:33:57 +00:00
Sohom Datta ca97c3fb06 Add setFormIdentifier to prevent validation errors
Used the setFormIdentifier to add a additional
parameter to the url, allowing prefilled requests
to be distinguished and thus preventing validation
errors. Also, updated the url parameters at
CiteThisPageHooks.php.

Bug: T238467
Change-Id: Ic1d0612bb4d4a40bc1ce0588c65782e33c09c3ca
2019-11-18 18:24:46 +05:30
Umherirrender b23e478056 Restore prefix search for subpages on Special:CiteThisPage
Simplify SpecialCiteThisPage::prefixSearchSubpages by
useing the default implementation for SpecialPage with prefixSearchString

It was broken due to static call of non-static SearchEngine::completionSearch()

Bug: T237184
Change-Id: Ie22f11e2bab331f169262dcd6f8d2f343c3023e0
2019-11-03 11:30:45 +00:00
Derick Alangi d60de7d63a Avoid usage of deprecated $wgContLang global (dep in 1.32)
Change-Id: I3c5413392871d11cf363db6f88ee80ac030daabb
2019-09-02 10:33:19 +01:00
DannyS712 412f1ed66e Add help links to extension's special pages
Bug: T230520
Change-Id: Id5b50b9c5486c4c26fba8e99ad85a13dadfad0b4
2019-08-15 01:46:23 +00:00
Aaron Schulz 687af3d4a4 Make SpecialCiteThisPage use setInterfaceMessage() option for parse() calls
Change-Id: I1809354055513a5b9d9589e2d6acda7579af76e2
2019-03-09 10:48:54 -08:00
Kunal Mehta 14c37dd760 Move classes into includes/
Change-Id: I1aa22e05f5968d7e099bdc738ce54ec0d12c31d1
2018-02-09 18:37:58 +00:00