Commit graph

52 commits

Author SHA1 Message Date
Umherirrender 6fa4d27867 Migrate to IDatabase::newUpdateQueryBuilder
Change-Id: If32f952172d6058dbca2deb627b19991015e1cb4
2024-04-03 19:50:13 +02:00
Umherirrender a9281905de Migrate to IDatabase::newInsertQueryBuilder/newDeleteQueryBuilder
Change-Id: If2b6312f08e05223f6a79ff00b49c83b7dd94320
2024-04-02 19:40:35 +02:00
James D. Forrester b22041413c Replace wfGetDB() with ICP getReplicaDatabase() etc.
Ahead of any decision to merge this extension into core, let's
actually fix this now.

Bug: T357646
Change-Id: I5128ce524c1a6a04bbe8b7607747eab84d892059
2024-03-21 20:02:00 +00:00
Umherirrender a6a4562141 build: Upgrade mediawiki/mediawiki-codesniffer to v43.0.0
Change-Id: I7720215d153da5509d8b416b9981ccf496db74a4
2024-03-11 19:25:16 +01:00
Umherirrender 0a1ff5fadd Use namespaced classes
Done automatically via script

Change-Id: Idb2384889f9beb01919ae48427681bf7d047c61f
2024-01-06 17:30:06 +01:00
James D. Forrester 46ea77c54d SpecialInterWiki::getDescription: Return a Message, not a string
Bug: T347903
Change-Id: I0bbf920563835edcb7b27f7c9cdb422dfca1bbd7
2023-10-02 19:48:09 +00:00
gerritbot 84f970e069 Replace some moved Title class uses, now MediaWiki\Title\Title
Bug: T321681
Change-Id: Icba4b0cd621dc29c2eb1b8e9aaaf0a3aafb4d03d
2023-08-19 04:16:58 +00:00
Umherirrender 6a97be19bf Use HookHandlers for core hook
The use of "HookHandlers" attribute in extension.json makes it possible
to inject services into hook handler classes in a future patch.

Bug: T271017
Change-Id: Ia27729fb69a0c80493b386f2e5d913602fb50698
2023-08-15 12:43:27 +02:00
Umherirrender d5ecaf0796 Replace deprecated Hooks::register
Bug: T335536
Change-Id: Ia39bbc8a2f0853ae69f966b65ff47551f3af941d
2023-05-07 01:50:35 +02:00
gerritbot e0bc80f826 Update moved class WikiMap
See T321882. Moved in I60cf4b9ef02b9d5

Bug: T321681
Change-Id: I3c8585128c8937824c32eba2207da4982817fc3d
2023-04-25 09:54:05 +00:00
jenkins-bot 394d761a34 Merge "Replace deprecated Language::fetchLanguageName" 2022-12-29 18:08:09 +00:00
Umherirrender d65018980f Replace deprecated Language::fetchLanguageName
Bug: T325962
Change-Id: Ib8bba98d88b55c9e9b4d31dcc877d28c0d1304bb
2022-12-28 12:57:47 +01:00
Umherirrender c6ebd4f89d Replace deprecated HTMLForm::setIntro
Bug: T325474
Change-Id: I93b3354ef94ea0430d4f5cff172cc81cd5495360
2022-12-27 18:17:01 +01:00
Adam Wight 2fd61a8691 Save empty string to non-null field
Work around a schema glitch to make it possible to add rows using the
GUI.  Without this patch, adding a row fails due to a not-null
constraint.

A longer-term fix would be to allow nulls, but this requires some code
review and database migration.

Bug: T72530
Change-Id: I47550e2277b777f079858207b25ae709bae80383
2022-11-30 10:38:06 +00:00
Alexander Vorwerk dac4379764 Replace usages of deprecated wfWikiID()
The global function wfWikiID() is deprecated since 1.35 and it's usages
should be replaced with WikiMap::getCurrentWikiId().

Bug: T298059
Change-Id: I1bf004218b30b2324c1dd87c18fab9945be04371
2021-12-22 08:36:26 +00:00
Umherirrender ee7b69b883 Get config with SpecialInterwiki::getConfig
Change-Id: Id12c798a1eca057a9958ad804b1f8532e284c426
2021-12-09 14:51:42 +00:00
Umherirrender 9f9e40cf7a Replace $wgLegalTitleChars with Title::legalChars()
Bug: T297340
Change-Id: I0828f5d9f6e5c65435c489adab3e161ad1c67873
2021-12-09 15:49:31 +01:00
jenkins-bot 4a9e7a8dcb Merge "Fix two Explicitly typos" 2021-10-01 07:35:33 +00:00
Sophivorus 4b5b85ab38 Add a field to Special:Interwiki to add/edit the API URL of interwiki
prefixes

Until now, the only way to add/edit the URL of the API of an interwiki
prefix was to edit the database directly.

The immediate motivation for this change is to make it easier to add new
wikis that can be used by Extension:InterwikiExtracts without requiring
the user to do manual changes to the database, see
https://www.mediawiki.org/wiki/Extension:InterwikiExtracts#New_interwikis

Bug: T244594
Change-Id: Ifd5809aa60eab622d0effc69a39d31cc32d38fef
2021-10-01 00:32:06 +00:00
Sophivorus 0f306e5440 Retain the Forward and Transclude flag status options when editing an existing interwiki prefix
Bug: T283998
Change-Id: I79a3853ac1d3ea6d6c26809f4d9476086edbdd5e
2021-10-01 00:22:24 +00:00
Reedy 38280e8d7b Fix two Explicitly typos
Change-Id: Iea1556af48ffb2c8a2b84cce5512a162db7534e8
2021-10-01 01:15:51 +01:00
libraryupgrader 7b24bf9103 build: Updating composer dependencies
* mediawiki/mediawiki-phan-config: 0.10.6 → 0.11.0
* php-parallel-lint/php-parallel-lint: 1.3.0 → 1.3.1

Change-Id: I7d9282765884b08d494a93713a2d892b44ead985
2021-09-09 10:54:22 +00:00
paladox 0be22a84a0 Fix calling "onInterwikiLoadPrefix" hook
Currently failing with "Error: Call to undefined function MediaWiki\Extension\Interwiki\Hooks()"

Bug: T283539
Change-Id: Iedbf0880814aac2ea414448ef84b307bcbf2fd41
2021-05-24 21:03:22 +00:00
libraryupgrader 14ccebb638 build: Updating composer dependencies
* mediawiki/mediawiki-codesniffer: 35.0.0 → 36.0.0
  The following sniffs are failing and were disabled:
  * PSR2.ControlStructures.SwitchDeclaration.TerminatingComment

* php-parallel-lint/php-parallel-lint: 1.2.0 → 1.3.0

Change-Id: I9902bf4083e274b42e346333828360537290158c
2021-05-05 04:21:06 +00:00
Reedy 7bb8875696 Namespace extension
Change-Id: Ia510f65e739d21bcfd6072c82859109d05cf5dd1
2021-03-14 05:40:38 +00:00
C. Scott Ananian b21bafe385 Don't register InterwikiLoadPrefix hook unless it is needed
The InterwikiLoadPrefix hook has been deprecated, as it doesn't
support some functions needed in a round-trip wikitext parser
(T270444).  This extension doesn't require the hook in the way that it
is used in WMF production (with a static interwiki cache), so don't
register the hook in this configuration to avoid triggering the
deprecation warning.

Bug: T270444
Depends-On: If2507017c99c4ee42c104a0890bc45a84d7239d5
Change-Id: Id5c02a824c6d6a97200074430aa7d5c1db804396
2020-12-22 20:43:12 +00:00
Bartosz Dziewoński 1bbcce88b7 Fix tabbing
Remove tabindex on input fields, add autofocus to first one.

Bug: T100052
Change-Id: I5cf79d73e6b06cb78ec9c3a4877029b423d02162
2020-09-09 18:52:16 +02:00
Umherirrender e7c4d44bd4 Parse messages in string context
Change-Id: I0010ca3cb713b9a9ae129a4de73fc857a08bd860
2020-06-02 21:08:10 +00:00
Umherirrender 8727563172 Use SpecialPage::checkReadOnly instead of wfReadOnly
Requires MediaWiki 1.19

Change-Id: I3e1efce08228c2a51922a94fa4a5d9e64f2858f6
2020-04-15 22:18:54 +02:00
DannyS712 e2e6384923 PHP coding conventions: reorder doxygen tags
See https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP#Doxygen_tags

Change-Id: If657d46d89ef54d6fe93db7049f5e74c97985d36
2020-03-26 15:52:22 +00:00
DannyS712 7f18ab9d04 Pass a user to LogPage::addEntry
Bug: T243652
Change-Id: I2fba3b5c3749a1e99a072de698325a1ebba262b2
2020-01-25 02:30:24 +00:00
libraryupgrader a687ec46e0 build: Updating mediawiki/mediawiki-phan-config to 0.9.0
Additional changes:
* Added .eslintcache to .gitignore.

Change-Id: Ic8740b08acfe205cbdebfc9fdb733989c5ca72db
2019-12-30 16:52:54 +00:00
Umherirrender beae7d6b19 Do not use false for condition on IDatabase::selectField
It results in a log entry in Database::selectSQLText

Change-Id: I95313cb375851d53353e9629c43f730d1c96c85f
2019-12-09 19:49:51 +01:00
Umherirrender b784e7d527 build: Updating mediawiki/mediawiki-phan-config to 0.8.0
Remove array check, because the variable always array at this location

Bug: T235049
Change-Id: Ieb1287c1b02715dd69aa83e4485fe090883023ed
2019-11-03 19:20:27 +01:00
Derick Alangi 3989bee54a Avoid usage of deprecated $wgContLang global (dep in 1.32)
Change-Id: I55bfd9d30dc135f8886a2532f53299e9d65ddac9
2019-09-02 09:52:38 +01:00
Reedy b7449481be Remove no-op if ( $action === 'delete' ) { } block
Change-Id: I65b63af4706e58c271281edfca377fb1a489ef6d
2019-07-26 12:42:25 +00:00
Reedy 16c67999b4 Remove duplicate code line
Change-Id: I59b803e6f7381a683e61dbe3af00aa55f5f46efc
2019-07-26 12:11:21 +01:00
jenkins-bot 729d7c6d21 Merge "Global interlanguage links feature" 2019-07-18 08:32:11 +00:00
Jack Phoenix 4f51be9781 Global interlanguage links feature
To use, set the new global $wgInterwikiCentralInterlanguageDB to the
name of a MediaWiki DB from which to fetch global interlanguage links.
For example, on Uncyclomedia projects this could be 'uncm_meta' for
most of the Uncyclopedias to fetch their interlanguage links from the
meta-wiki, but perhaps 'illg_en' for the Illogicopedias to fetch their
interlanguage links from the English Illogicopedia's DB (instead of
the meta Uncyclomedia wiki's DB).

Disables local interlanguage links for as long as it is enabled, and
as such likewise prevents their editing, but does not change anything
currently in the local table.

Also bumped the version number and got rid of the silly, outdated
datestamp in it.

Bug: T220247
Change-Id: I6b691ef8e37367fe0e0fcb8b3778f4470d0c5200
2019-07-15 19:05:43 +00:00
James D. Forrester bfc8a01872 build: Upgrade phan-taint-check-plugin from 1.5.x to 2.0.1
Change-Id: Ic99c6b8c0e5e9380b1bc794494a01d1896bfc4ac
2019-07-10 16:32:51 +00:00
jenkins-bot eaaac4df89 Merge "Preload tablesorter styles by module 'jquery.tablesorter.styles'" 2019-06-11 20:20:09 +00:00
Fomafix 9c2e708ded Use explicit escaped() instead of implicit __toString()
For the message 'comma-separator' a wikitext parsing is not necessary.

Change-Id: I5816a39c0526b153f881f8ba5f744493e6f54034
2019-05-23 14:47:27 +02:00
Kunal Mehta 0f74b73974 Upgrade to newer phan
Bug: T216923
Change-Id: I4b1363d58bb1e1ed4393bfe917f524091495057b
2019-03-17 16:32:13 -07:00
Kunal Mehta e7dafee4af Avoid use of func_get_args()
Change-Id: I74de3e0fb27b87a4b7f1e56cdb4e4233aa7804f2
2019-03-08 13:04:53 -08:00
Sethakill 125f850279 Convert Special:Interwiki to use OOUI
Bug: T135332
Change-Id: I5842c4a8bae2de1cf65e74de6d2fdfe1dad3f47e
2019-02-15 16:44:49 +01:00
Fomafix d259ebcb45 Preload tablesorter styles by module 'jquery.tablesorter.styles'
This change avoids the flash of missing sorting buttons while loading,
but only with I0b446d18f47428d8c0c4aed78b75de16fe106218 in MediaWiki
core included in MediaWiki 1.33 or higher.

Depends-On: I0b446d18f47428d8c0c4aed78b75de16fe106218
Change-Id: I12c90bc3cc2dc2b58f0ffa0fab55af3a67cb226b
2019-02-02 17:15:20 +01:00
Fomafix 884c3fbbfa SpecialInterwiki: Add <thead> and <tbody> in the sortable table
This avoids that module 'jquery.tablesorter' has to add the elements.

With change I0b446d18f47428d8c0c4aed78b75de16fe106218 in core this also
avoids a flash of missing sorting buttons while loading.

Change-Id: I66afdd78a524b53d130e2fa0ec5b8b4693928f45
2019-01-07 00:04:41 +01:00
Umherirrender 15ec47c8aa Add method scope visibility
Change-Id: I782dc75cc50ded5f00763ca600092885491064b0
2018-10-31 23:38:46 +01:00
Kunal Mehta bb1c7bf309 Get rid of most of the need for an extension function
* Conditionally register the userright with UserGetAllRights hook.
* Always register the LogActionsHandlers, it'll be a noop if not
  enabled.
* The $wgLogTypes modification is left alone for now, it can be moved
  to a hook once T200385 is implemented.

Bug: T180192
Change-Id: Ic5392fe93b6271d31ef1e6d589415ec77c0b14eb
2018-07-26 08:24:52 -07:00
Matěj Suchánek 9a794ffc44 Replace Linker::link() with LinkRenderer
This raises MediaWiki version requirement to 1.28.0.

Bug: T149346
Change-Id: Id677c70474dfb724ab93f1ee983038544923211b
2018-06-10 08:02:11 +00:00