Commit graph

126537 commits

Author SHA1 Message Date
jenkins-bot
29b407432c Merge "ResourceLoader: Test DependencyStore with indirect styles dependencies" 2024-09-09 18:36:11 +00:00
Hannah Okwelum
9fffe0a559 ResourceLoader: Test DependencyStore with indirect styles dependencies
Bug: T343492
Change-Id: Ic6f34fbedd47962e2df9cb00c32df6fc93912c02
2024-09-09 18:07:35 +00:00
jenkins-bot
65f6dcb558 Merge "editstash: migrate ApiStashEdit to statslib" 2024-09-09 18:06:12 +00:00
jenkins-bot
e6d0f05427 Merge "Return early in ApiLogout if user not logged in" 2024-09-09 17:34:51 +00:00
Aaron Schulz
e63f87b0dc editstash: migrate ApiStashEdit to statslib
Bug: T359465
Change-Id: Id5aa4000e8b8bbb13b0ccd4d7cdf8bb355963ad7
2024-09-09 09:39:16 -07:00
jenkins-bot
7de2cb299f Merge "search: Simplify host name logic in InterwikiSearchResultSetWidget" 2024-09-09 14:58:38 +00:00
jenkins-bot
c79c070737 Merge "selenium: Remove engines from wdio-mediawiki" 2024-09-09 14:02:07 +00:00
jenkins-bot
1397b8db2c Merge "search: Add missing documentation to class properties" 2024-09-09 13:29:43 +00:00
Dreamy Jazz
24d8b04558 Return early in ApiLogout if user not logged in
Why:
* The 'logout' API allows users to logout of their account
* This calls the "UserLogoutComplete" hook which users assume
  is only called when a logout is successful.
* However, the hook is called by the API even if the user making
  the request was not logged in
* The Special:UserLogout page does not call the hook if the user
  performing the request is already logged out.

What:
* Return early in ApiLogout::execute if the user is not logged
  in, and also add a warning to the response to indicate this.

Bug: T374353
Change-Id: I72e73c2391a475cec2e5cb24250f9aa2b792e5de
2024-09-09 13:47:50 +01:00
jenkins-bot
48453384d1 Merge "Avoid use of deprecated wfAssembleUrl" 2024-09-09 12:28:22 +00:00
jenkins-bot
7b0ff4c7ab Merge "Improve labels color of Special:RecentChanges in dark mode" 2024-09-09 12:13:10 +00:00
Ebrahim Byagowi
1c2f320f1a Avoid use of deprecated wfAssembleUrl
Change-Id: I198e862d1dd6eb73f4610a771b5c5e0cd43ce8c7
2024-09-09 15:18:12 +03:30
Željko Filipin
e2341256c7 selenium: Remove engines from wdio-mediawiki
Bug: T373684
Change-Id: I2d482b61d6a3bf037f43c9050b46f989c06bc559
2024-09-09 13:48:09 +02:00
Ebrahim Byagowi
b23b8ac3ad Improve labels color of Special:RecentChanges in dark mode
Bug: T374333
Change-Id: I4428b9b19d8e852bdf94326a67a4a2f9aab23080
2024-09-09 11:36:52 +00:00
jenkins-bot
6d2b2b655c Merge "Localisation updates from https://translatewiki.net." 2024-09-09 09:29:11 +00:00
jenkins-bot
21d1f4f59c Merge "wdio-mediawiki: Add random element to junit-reporter file name" 2024-09-09 09:09:53 +00:00
Translation updater bot
b692f6210e Localisation updates from https://translatewiki.net.
Change-Id: I55d48a6c8844e87442f46a368f0e4112896825d3
2024-09-09 08:45:22 +00:00
jenkins-bot
9e1a586460 Merge "auth: Pass canAlwaysAutocreate from session to pre-auth providers" 2024-09-09 04:04:32 +00:00
jenkins-bot
a323ae9ccd Merge "parser: Add a new {{USERLANGUAGE}} magic word for use in wikitext" 2024-09-08 23:38:53 +00:00
jenkins-bot
4d58855717 Merge "Avoid use of deprecated wfExpandUrl in IntroMessageBuilder" 2024-09-08 20:56:45 +00:00
jenkins-bot
a6e2068558 Merge "Avoid use of deprecated wfExpandUrl in MediaWiki\Feed" 2024-09-08 20:52:27 +00:00
jenkins-bot
28c0173022 Merge "ResourceLoader: Add missing documentation to class properties" 2024-09-08 20:11:55 +00:00
Ebrahim Byagowi
9548912600 Avoid use of deprecated wfExpandUrl in MediaWiki\Feed
Bug: T319340
Change-Id: I986f3ca427d3cd0dbbca15fd3d25706234aae043
2024-09-08 23:23:50 +03:30
jenkins-bot
70fecac8ad Merge "Avoid use of deprecated wfParseUrl in MediaWiki\Api" 2024-09-08 18:40:49 +00:00
Ebrahim Byagowi
7db85051f8 Avoid use of deprecated wfParseUrl in MediaWiki\Api
Change-Id: Idd0f98ccb449735b5244bb7531327be763daceb8
2024-09-08 21:15:44 +03:30
jenkins-bot
98d802cd63 Merge "specials/forms: Remove unused UploadForm::$mMaxFileSize" 2024-09-08 17:31:18 +00:00
jenkins-bot
2802ed4182 Merge "Add fr alias for Special:EditRecovery" 2024-09-08 15:39:16 +00:00
jenkins-bot
001fcec212 Merge "Make some element IDs etc. greppable" 2024-09-08 10:38:26 +00:00
Taavi Väänänen
99951eb334
Permissions: Fix typo
Change-Id: Ieb92269f1445951fb1d179a069eb4eb4839df405
2024-09-08 10:41:18 +03:00
Ebrahim Byagowi
6f1acdda65 Avoid use of deprecated wfExpandUrl in IntroMessageBuilder
Bug: T319340
Change-Id: I77542ef7cbe38fcc4eee42873610c50236e41661
2024-09-08 06:46:37 +03:30
Sam Wilson
62f6aae8fe Add fr alias for Special:EditRecovery
Bug: T362974
Change-Id: I5595baafe68a9ff0af4b83758dd1ae2471f2cb17
2024-09-08 09:11:11 +08:00
Jack Phoenix
e316e84339 Make some element IDs etc. greppable
...because I don't want to end up thinking, "oh, this is unused, I should remove it" just to find out that the style was, in fact, used, despite not showing up on codesearch.

Change-Id: Ib73750be8814e24c07b4b116303a1eac34d163b4
2024-09-07 23:24:08 +00:00
Umherirrender
6c81485143 search: Add missing documentation to class properties
Add doc-typehints to class properties found by the PropertyDocumentation
sniff to improve the documentation.

Once the sniff is enabled it avoids that new code is missing type
declarations. This is focused on documentation and does not change code.

Change-Id: I2606072015d71b4bdda70a7c149d9f55ac205a3c
2024-09-07 21:56:00 +02:00
jenkins-bot
784804f1a8 Merge "rdbms: Migrate MediaWiki.rdbms_trxprofiler_warnings to statslib" 2024-09-07 19:47:58 +00:00
Timo Tijhof
85cca4408e search: Simplify host name logic in InterwikiSearchResultSetWidget
* footerHtml() contained seemingly unused logic for extracting
  the host name for use in the "search-interwiki-resultset-link"
  message.

  This was added during in change I9498a070da (T307468, 0d1184e501).
  It seems to be a left-over from the "search-interwiki-default"
  message that Special:Search used previously.

  Overrides for specific wikis are now in the heading based on the
  the "search-interwiki-custom" message, which feeds customCaptions
  which takes precedence over the entire message, instead of requiring
  wikis to e.g. switch/if-case inside wikitext based on "$1" or something.

  The qqq.json entry for "search-interwiki-resultset-link" mentions
  no parameters, and none of the translations use it either. I've
  also checked WikimediaMessages extension, en.wikipedia.org, Commons,
  and Wikidata in case they use the parameter there, but found nothing.

* headerHtml() used wfExpandUrl() combined with wfParseUrl().

  This is problematic for Phan analysis since both can fail and
  technically require a fallback. This is currently tolerated by Phan
  because it doesn't yet understand that `false[key]` yields the
  same kind of warning PHP as `null[key]`.
  https://github.com/phan/phan/issues/4879

  It seems this code has evolved over the years into what it is
  now, and it's not clear that this is all intentional or by design.

  In 2011, r95011 (92ff782a9) changed this code from parse_url to
  wfParseUrl to handle protocol-relative URLs, which has long been
  fixed in PHP: https://3v4l.org/sSkfX.

  In 2017, If78cb0c29a (6e155624fa) changed further switched from
  Title->getUrl() to Interwiki->getURL() with wfExpandUrl() to handle
  same-site destinations, e.g. when an interwiki is on the same
  domain, and defined on Special:Interwiki without any hostname.

  The code had a note saying:
  "hostname of the other wiki which might suck if there are many wikis
  on one hostname" which appears to remain true today.

  I've changed this all back to parse_url(), with an explicit fallback
  to $iwPrefix for invalid urls or same-site interwikis. If we
  want to display the current domain name there instead, we can do
  that explicitly by falling back go $wgServerName instead.

* Fix potential escaping problem by pasing $caption to element()
  instead of rawElement() since in headerHtml() at least one of the
  values in the assignment chain caption is plain text, not escaped
  HTML. Move escaping down to the last mile by storing plain text
  instead.

  Idem for footerHtml(), although that one is safe and simple as-is,
  I've switched it similarly to plain text and let Html::element do
  the escaping.

Change-Id: I3281e12ee52af168f85cdb12ac4d53fc25c9f38d
2024-09-07 12:30:03 -07:00
Umherirrender
441017cb54 ResourceLoader: Add missing documentation to class properties
Add doc-typehints to class properties found by the PropertyDocumentation
sniff to improve the documentation.

Once the sniff is enabled it avoids that new code is missing type
declarations. This is focused on documentation and does not change code.

Change-Id: I90ecf85cb6f639af4be1947ccfbfb16d5b84cab3
2024-09-07 21:25:51 +02:00
Larissa Gaulia
3bd0435eaa rdbms: Migrate MediaWiki.rdbms_trxprofiler_warnings to statslib
* Remove StatsdAwareInterface
 * Remove setStatsdDataFactory()
 * Add setStatsFactory()
 * Migrate api and action setStatsdDataFactory() usage.

Bug: T359366
Change-Id: Ic4e82c24d3b1cdca638b22885902cc441d8510b8
2024-09-07 19:18:11 +00:00
dvorapa
10ab0e40a9 parser: Add a new {{USERLANGUAGE}} magic word for use in wikitext
Depending on configuration, this returns either the interface language
code of the current user or the current page language.

Bug: T4085
Change-Id: Iab7fda272ec81af88c74612727ff6bed014d4a81
2024-09-07 19:16:32 +00:00
jenkins-bot
e659256efe Merge "Fix Special:NewPages unpatrolled items color in dark mode" 2024-09-07 13:07:31 +00:00
jenkins-bot
286925fcef Merge "Hard deprecation of wfExpandIRI" 2024-09-07 13:07:24 +00:00
jenkins-bot
8a4138d7a5 Merge "Remove wfUnpack, deprecated since 1.42" 2024-09-07 13:01:10 +00:00
jenkins-bot
e8907bbe11 Merge "Remove wfGetLangObj, deprecated since 1.41" 2024-09-07 12:57:24 +00:00
Umherirrender
ba8b42bf83 specials/forms: Remove unused UploadForm::$mMaxFileSize
Added with wrong name in 9fb510f31d (r83218)
The correct named mMaxUploadSize was added in 29e672787c (r109554)

Change-Id: Ib0402017e602ad3e79b7ffbb5b02bcedae1fab6b
2024-09-07 12:19:06 +02:00
Ebrahim Byagowi
65dc5495c4 Fix Special:NewPages unpatrolled items color in dark mode
Bug: T374299
Change-Id: Ie9a20ec04fc9b668c4817e91a4f611419fc53501
2024-09-07 11:20:11 +03:30
Ebrahim Byagowi
ba2190a467 Hard deprecation of wfExpandIRI
Deprecated since 1.39, now let's emit warning.

Depends-On: Ib08a0cc47a7b0d8ec7375d4505b447c4b770d4ef
Change-Id: I6bd166b998b2283ef0fb2de56a517b74d004f991
2024-09-07 08:03:40 +03:30
jenkins-bot
64475f3edf Merge "rdbms: merge isClean() into popAtomicLevels() in TransactionManager" 2024-09-07 03:58:13 +00:00
jenkins-bot
1831a32514 Merge "rdbms: remove unused ILoadBalancer::reuseConnection() method" 2024-09-07 03:36:49 +00:00
jenkins-bot
242fbcaa68 Merge "rdbms: suppress warning for all information_schema.* tables in tableName()" 2024-09-07 03:29:07 +00:00
jenkins-bot
79343586e1 Merge "language: make isValidBuiltInCode() more robust" 2024-09-07 03:22:26 +00:00
Ebrahim Byagowi
136a799336 Remove wfUnpack, deprecated since 1.42
Change-Id: I7e5df58fe809d3adb61bdb64444c4ca98641c6c6
2024-09-07 06:48:35 +03:30