Commit graph

153 commits

Author SHA1 Message Date
Luqgreg f309ecdb89 Fix AllInfoboxes ApiQuery module 2018-08-05 13:06:26 +02:00
Luqgreg 4673bb1743 Remove render service for mobile devices 2018-08-01 18:06:09 +02:00
Luqgreg 3f636acedd Change of default values 2018-07-31 12:34:51 +02:00
Luqgreg 98d9e4d555 Nirvana cleanup 2018-07-28 08:04:18 +02:00
Luqgreg d9a05afdb1 $parser->uniqPrefix -> Parser::MARKER_PREFIX 2018-07-25 12:45:31 +02:00
Máté Szabó 2847b70b11 SUS-2178: &$this should not be passed by reference (#13444)
* SUS-2178: Normalize hook handling in Answers

* SUS-2178: Normalize hook handling in Achievements

* SUS-2178: Normalize hook handling in AppPromoLanding

* SUS-2178: Normalize hook handling in ArticleComments

* SUS-2178: Normalize hook handling in ArchiveWikiForum

* SUS-2178: Normalize hook handling in ArticleAsJson

* SUS-2178: Normalize hook handling in ArticleMetaDescription

* SUS-2178: Normalize hook handling in AutoMainpageFixer

* SUS-2178: Normalize hook handling AutomaticWikiAdoptionHelper

* SUS-2178: Normalize hook handling in BannerNotifications

* SUS-2178: Normalize hook handling in Blogs

* SUS-2178: Normalize hook handling in CanonicalHref

* SUS-2178: Normalize hook handling in Category*

* SUS-2178: Normalize hook handling in Chat

* SUS-2178: Normalize hook handling in CloseMyAccount

* SUS-2178: Normalize hook handling in CommunityMessages

* SUS-2178: Normalize hook handling in Comteam

* SUS-2178: Normalize hook handling in ContentFeeds

* SUS-2178: Normalize hook handling in ContentWarning

* SUS-2178: Normalize hook handling in CreatePage

* SUS-2178: Normalize hook handling in Discussions

* SUS-2178: Normalize hook handling in EditPageLayout

* SUS-2178: Normalize hook handling in EditTagging

* SUS-2178: Normalize hook handling in EditorPreference

* SUS-2178: Normalize hook handling in FlowTracking

* SUS-2178: Normalize hook handling in Follow

* SUS-2178: Normalize hook handling in Forum

* SUS-2178: Normalize hook handling in FounderProgressBar

* SUS-2178: Normalize hook handling in HAWelcome

* SUS-2178: Normalize hook handling in ImageLazyLoad

* SUS-2178: Normalize hook handling in ImageServing

* SUS-2178: Normalize hook handling in ImageSizeInfoFunctions

* SUS-2178: Normalize hook handling in IndexingPipeline

* SUS-2178: Normalize hook handling inInfoboxBuilder

* SUS-2178: Normalize hook handling in InterwikiDispatcher

* SUS-2178: Normalize hook handling in LatestPhotos

* SUS-2178: Normalize hook handling in LinkSuggest

* SUS-2178: Normalize hook handling in MainPageTag

* SUS-2178: Normalize hook handling in MobileContent

* SUS-2178: Normalize hook handling in MyHome

* SUS-2178: Normalize hook handling in YouTube

* SUS-2178: Normalize hook handling in Phalanx

* SUS-2178: Normalize hook handling in Piggyback

* SUS-2178: Normalize hook handling in Places

* SUS-2178: Normalize hook handling in xbox

* SUS-2178: Normalize hook handling in PortableInfobox

* SUS-2178: Normalize hook handling in Qualaroo

* SUS-2178: Normalize hook handling in RTE

* SUS-2178: Normalize hook handling in SEOTweaks

* SUS-2178: Normalize hook handling in Scribe

* SUS-2178: Normalize hook handling in SharedHelp

* SUS-2178: Normalize hook handling in SiteWideMessages

* SUS-2178: Normalize hook handling in StaffSig

* SUS-2178: Normalize hook handling in UserLogin

* SUS-2178: Normalize hook handling in Profile

* SUS-2178: Normalize hook handling in Video

* SUS-2178: Normalize hook handling in Wall

* sus-2178: Normalize hook handling in WAMPage

* SUS-2178: Normalize hook Handling in WallNotifications

* SUS-2178: Normalize hook handling in WidgetTag

* SUS-2178: Normalize hook handling in WikiAnswers

* SUS-2178: Normalize hook handling in WikiFactory

* SUS-2178: Normalize hook handling in WikiaApi

* SUS-2178: Normalize hook handling in WMU

* SUS-2178: Normalize hook handling in WikiaMobile

* SUS-2178: Normalize hook handling in WikiaPhotoGallery

* SUS-2178: Normalize hook handling in WikiaNewtalk

* SUS-2178: Normalize hook handling in WikiaWhiteList

* SUS-2178: Normalize hook handling in skins

* SUS-2178: Normalize hook handling in VisualEditor, remove dead code

* SUS-2178: Normalize hooks handling in AbuseFilter

* SUS-2178: Normalize hook handling in Variables

* SUS-2178: Normalize hooks handling in AntiSpoof

* SUS-2178: Normalize hook handling in Arrays

* SUS-2178: Normalize hooks handling in Loops

* SUS-2178: Normalize hooks handling in Autoincrement

* SUS-2178: Normalize hooks handling in CharInsert

* SUS-2178: Normalize hooks handling in CharInsert

* SUS-2178: Normalize hook handling in ImageMap

* SUS-2178: Normalize hooks handling in ConfirmEdit

* SUS-2178: Normalize hooks handling in DPLforu

* SUS-2178: Normalize hooks handling in Scribunto

* SUS-2178: Normalize hooks handling in InputBox

* SUS-2178: Normalize hooks handling in MultiUpload

* SUS-2178: Normalize hooks handling in OGM

* SUS-2178: Normalize hooks handling in Poem

* SUS-2178: Normalize hooks handling in RandomImage

* SUS-2178: Normalize hooks handling in RegexFu

* SUS-2178: Normalize hooks handling in Semantic*

* SUS-2178: Normalize hook handling in SpamBlacklist

* SUS-2178: Normalize hooks handling in GeSHi

* SUS-2178: Normalize hooks handling in TitleBlacklist

* SUS-2178: Normalize hooks handling in TorBlock

* SUS-2178: Normalize hooks handling in timeline

* SUS-2178: Normalize hook handling in includes/wikia

* SUS-2178: add few extension hooks I missed

* SUS-2178: Get rid of &$this from core MediaWiki

* SUS-2178: Remove remaining &$this from extensions

* SUS-2178: Remove &$this from maintenance scripts

* SUS-2178: remove annoying hooks.txt &$this

* SUS-2178: apply SonarQube suggestions

* SUS-2178: add two missing extensions

* SUS-2178: Update Maps and SMW via composer

* SUS-2178: BeforeParserrenderImageGallery - bring back the wonders of pass by reference

* Disabling memcache in NavigationTest

* SUS-2178: Normalize hook handling in TwitterCards

* SUS-2178: Correct parameter type in CommunityMessages

* SUS-2178: Correct parameter type in WallHooksHelper::onPersonalUrls

* SUS-2178: Correct parameter type in FollowHelper::addPersonalUrl

* SUS-2178: Correct parameter type in WikiaApp::onArticleViewHeader

* SUS-2178: Correct parameter type in ArticleComment::watchlistNotify

* SUS-2178: onArticleSaveComplete - $revision may be null for null edits

* SUS-2178: Correct few errors in Scribe and Variables

* SUS-2178: Correct parameter types in Arrays extension

* SUS-2178: fix class resolution error in IndexingPipeline

* SUS-2178: Fix type hint in WallHooksHelper

* SUS-2178: Include Maps schema

* SUS-2178: Correct parameter types in PageStatsService

* SUS-2178: Correct parameter type in ContentReviewHooks::onArticleDeleteComplete

* SUS-2178: Update WallHooksHelper::onUserIsBlockedFrom

* SUS-2178: Correct parameter type in GadgetHooks::registerModules

* SUS-2178: Correct parameter type in FliteTagController

* SUS-2178: Correct few more param types

* SUS-2178: Remove &$parser from legacy extensions
2017-08-07 21:26:54 +02:00
idradm 8b1289b291 Merge branch 'dev' into XW-2415
# Conflicts:
#	extensions/VisualEditor/wikia/VisualEditor.i18n.php
#	extensions/wikia/PortableInfobox/PortableInfobox.setup.php
#	extensions/wikia/PortableInfobox/tests/PortableInfoboxParserTagControllerTest.php
#	extensions/wikia/PortableInfobox/tests/PortableInfoboxRenderServiceTest.php
2017-01-05 12:37:59 +01:00
idradm 33c2254c7d Merge remote-tracking branch 'origin/XW-2443' into XW-2443
# Conflicts:
#	extensions/wikia/PortableInfobox/controllers/PortableInfoboxParserTagController.class.php
2016-12-30 12:07:20 +01:00
idradm 145b66ea71 Merge branch 'dev' into XW-2443
# Conflicts:
#	extensions/wikia/PortableInfobox/controllers/PortableInfoboxParserTagController.class.php
#	extensions/wikia/PortableInfobox/tests/PortableInfoboxParserTagControllerTest.php
2016-12-30 12:06:00 +01:00
Mateusz Rybarski b9d9e9216e XW-2444: extracting duplicated logic to method 2016-12-29 15:51:46 +01:00
Mateusz Rybarski 81a6a74f30 XW-2444: fallback to default color instead of displaying error when wrong color is provided 2016-12-29 09:46:05 +01:00
Mateusz Rybarski 475d7c61b6 XW-2444: params validator as a instance field 2016-12-29 09:28:54 +01:00
Mateusz Rybarski 129d8bb49a cr remarks 2016-12-28 16:39:53 +01:00
Mateusz Rybarski e4b28b1691 XW-2444: adding # to color if not provided, formatting 2016-12-28 16:30:24 +01:00
Mateusz Rybarski 8f10a879ca XW-2444: 'use' statements for exceptions 2016-12-28 16:01:15 +01:00
Mateusz Rybarski 11b917d0f7 XW-2444: minor cr remarks 2016-12-28 15:51:33 +01:00
Mateusz Rybarski 2402a0210f XW-2444: cr remarks 2016-12-28 15:18:51 +01:00
Mateusz Rybarski 2498b0111a XW-2444: cr remarks 2016-12-28 15:14:54 +01:00
Mateusz Rybarski 34bea1521f XW-2444: notice fix 2016-12-28 13:55:24 +01:00
Igor Rogatty 2c460700fe XW-2443 | use single quotes 2016-12-28 13:20:21 +01:00
Mateusz Rybarski 39ccd95df9 XW-2444: render custom accent colors 2016-12-28 13:10:57 +01:00
idradm a5eff3e363 reformat files 2016-12-28 13:09:26 +01:00
Mateusz Rybarski 3ad591cec6 Merge branch 'pi-render-service-refactor' into XW-2444 2016-12-28 11:29:36 +01:00
Mateusz Rybarski c2fc1f2e76 XW-2444: handling case when no color is set 2016-12-28 09:38:27 +01:00
Mateusz Rybarski 9e89577acf XW-2444: extracting validation from ParserTagController 2016-12-28 09:27:25 +01:00
Mateusz Rybarski 194b8e4e03 XW-2444: error when color is in wrong format 2016-12-27 15:57:14 +01:00
Mateusz Rybarski d56e77855c XW-2444: trim params value 2016-12-27 15:22:45 +01:00
idradm 36b582a164 refactor render service to skin based services 2016-12-27 15:09:55 +01:00
Mateusz Rybarski 1ec85d8594 XW-2444: validating hex color, support for accent-color-text params 2016-12-27 13:50:53 +01:00
Mateusz Rybarski be71d1b0f4 XW-2444: accent-color param without validation 2016-12-27 12:10:11 +01:00
idradm 28c4d0051d XW-2443 refactor if statement 2016-12-27 10:07:10 +01:00
idradm 8ce60507f0 XW-2443 refactor unit tests, add more cases 2016-12-27 10:00:26 +01:00
idradm 116427f924 XW-2443 use both static and variable based themes 2016-12-27 09:25:44 +01:00
idradm 4b29763fb0 use both themes 2016-12-19 17:24:50 +01:00
Igor Rogatty 38aec59849 XW-2415 | treat infobox templates and articles with infoboxes separately 2016-12-13 17:41:55 +01:00
Igor Rogatty cefbe11d71 XW-2415 | handle groups when format=xml 2016-12-13 14:49:32 +01:00
Igor Rogatty 6dea854d48 XW-2415 | use parser tag version and reparse infoboxes if needed 2016-12-09 16:55:42 +01:00
Igor Rogatty 5712de9f05 XW-2415 | save infobox metadata, not just labels 2016-12-09 14:01:49 +01:00
Igor Rogatty e9dc03726d XW-2415 | set title for RefreshLinksForTitleTask 2016-12-09 10:59:03 +01:00
Igor Rogatty 3b704769ff XW-2415 | infobox dialog in VE knows the source types 2016-12-07 19:02:00 +01:00
grunny 36f77e2a8d Add comment explaining where the Mercury PI replacements occur 2016-06-20 18:24:38 +10:00
grunny c006c42035 (CE-3844) Refactor fix for PI and parser tag fix
A security fix from MW core added quotes to the Parser's strip tag
markers in order to prevent an XSS vulnerability. When this was deployed
PIs and our Wikia tag extensions broke in Mercury because ArticlesAsJson
JSON encodes the parser output in the ParserAfterTidy, but then PI and
the tag extensions were manually replacing the Parser tag strip markers
on the already JSON encoded string within their own ParserAfterTidy methods
(which were always run after the ArticlesAsJson method). This meant that the
strip marker had the quote escaped with a backslash in the encoded string,
so the string replacements failed.

This change follows the previous quick and dirty fix by moving the replacements
in PI and the tag extensions to just before ArticlesAsJson encodes the output.
Which also removes the need from before the fix in #10701 to JSON encode the
parser output of the tags that will be replaced into the text.
2016-06-17 20:57:12 +10:00
grunny 61bdc6e652 (DAT-4494) Only decode when it's the main JSON array 2016-06-17 04:14:47 +10:00
grunny ddd6c61e79 (DAT-4494) We don't need to json encode here anymore 2016-06-17 03:59:52 +10:00
grunny 899b127b00 (DAT-4494) Don't perform replacements on JSON encoded content 2016-06-16 17:39:06 +00:00
grunny 8186618eb9 (DAT-4494) Fix galleries and tabber in PortableInfoboxes 2016-06-16 16:59:48 +00:00
Igor Rogatty 3ef5a8e72b XW-1429 | remove whitespace after original marker and put a single space after new marker position 2016-05-09 15:14:02 +02:00
Igor Rogatty bc7f3efb35 XW-1429 | add unit tests for moveFirstMarkerToTop method 2016-05-09 14:50:37 +02:00
Igor Rogatty 464bd9ccee XW-1429 | move whitespace together with marker 2016-05-09 14:49:56 +02:00
Igor Rogatty 81830d7024 XW-1429 | use ArticleAsJsonBeforeEncode hook to move the first infobox marker 2016-05-09 13:56:28 +02:00