aboutsummaryrefslogtreecommitdiffstats
path: root/includes/actions
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge "Use expression builder instead of raw sql"jenkins-bot2024-07-261-3/+2
|\
| * Use expression builder instead of raw sqlUmherirrender2024-07-231-3/+2
| | | | | | | | | | Bug: T361023 Change-Id: Ibf1c93ddbf8f680e8fb9442816f6fed94a069c0a
* | Update help links to point to MediaWiki.org rather than MetaPppery2024-07-261-1/+1
|/ | | | | Bug: T366713 Change-Id: I8967d229306243fbbed8463667727c4115eb2a34
* Replace deprecated HTMLForm::addPreText/addPostTextUmherirrender2024-07-141-3/+3
| | | | | Bug: T325474 Change-Id: Iea85b2935ecec3aa0c02323188f5e2f1ff5fd3e4
* Merge "RecentChange: Replace use of legacy error arrays"jenkins-bot2024-07-101-9/+9
|\
| * RecentChange: Replace use of legacy error arraysBartosz Dziewoński2024-07-091-9/+9
| | | | | | | | | | | | | | | | | | | | | | Replace uses of soon-to-be-deprecated methods: * ApiBase::errorArrayToStatus * PermissionStatus::toLegacyErrorArray Deprecate and replace uses of: * RecentChange::doMarkPatrolled Change-Id: I2311d1fa3772ba6be378ad6f497ed4c0df9b7aa8
* | Replace some uses of deprecated PermissionManager::getPermissionErrors()Bartosz Dziewoński2024-06-271-4/+1
|/ | | | | | | | | getPermissionStatus() does the same thing but better. A lot of things use the legacy error arrays though, we're nowhere near removing it. Change-Id: Iff60dbb0593329a584d003b2407bbf24d5b22aea
* Use namespaced classes (3)Umherirrender2024-06-1611-0/+12
| | | | | | | Changes to the use statements done automatically via script Addition of missing use statement done manually Change-Id: Ia35b2d3105880631dd26ec974068b000ac7f4b6b
* Merge "Show all error messages on unsuccessful rollback"jenkins-bot2024-06-031-16/+14
|\
| * Show all error messages on unsuccessful rollbackMatěj Suchánek2024-06-011-16/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: * When rollback fails, the status may include more than just one error message. This is quite common on Wikidata where the content is validated by multiple checks. Showing only one of them can mislead the patroller. What: * Show all messages from Status::getMessages. Do this not by throwing ErrorPageError, which can show only one message, but by writing them all to OutputPage. Note that there was already a code path that did the same thing (i.e., did not throw an exception). Bug: T127648 Change-Id: I90b1faea516644596a06d218f004dd13c2ae5f04
* | Merge "delete: Replace deprecated User::matchEditToken(...) call"jenkins-bot2024-05-291-2/+9
|\ \
| * | delete: Replace deprecated User::matchEditToken(...) callSohom2024-05-291-2/+9
| | | | | | | | | | | | Change-Id: Iaf9d0e84509fe917d32d662fb08e11bf199f400e
* | | Merge "Use StatusValue::getMessages() instead of deprecated methods"jenkins-bot2024-05-292-5/+6
|\ \ \ | |/ / |/| / | |/
| * Use StatusValue::getMessages() instead of deprecated methodsBartosz Dziewoński2024-05-182-5/+6
| | | | | | | | | | | | | | | | | | This commit replaces some of the uses of getErrorsArray(), getWarningsArray(), getErrorsByType(), and getErrors(). In many cases the code becomes shorter and clearer. Follow-up to Ibc4ce11594cf36ce7b2495d2636ee080d3443b04. Change-Id: Id0ebeac26ae62231edb48458dbd2e13ddcbd0a9e
* | Merge "Add MediaWiki\Watchlist namespace to the related classes"jenkins-bot2024-05-231-0/+1
|\ \
| * | Add MediaWiki\Watchlist namespace to the related classesEbrahim Byagowi2024-05-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This adds MediaWiki\Watchlist namespace to the classes of watchlist directory and adds deprecation notice since 1.43 to the just created unnamespaced aliases of the classes. Bug: T353458 Change-Id: I4234f8fe62bb3bde6f5271c7ba31a2420b0f4b90
* | | Merge "InfoAction: Silence Phan Security Check warnings"jenkins-bot2024-05-221-0/+1
|\ \ \ | |/ / |/| / | |/
| * InfoAction: Silence Phan Security Check warningsBartosz Dziewoński2024-05-181-0/+1
| | | | | | | | | | | | | | | | | | I can't figure out why Phan would think that $id is escaped here, but without this, completely unrelated changes (see Id0ebeac26a) cause: includes/actions/InfoAction.php:208 SecurityCheck-DoubleEscaped Calling method \InfoAction::getRow() in \InfoAction::onView that outputs using tainted argument #3 (`$id`). (Caused by: includes/actions/InfoAction.php +252; annotations in \MediaWiki\Html\Html::rawElement) (Caused by: includes/actions/InfoAction.php +207; includes/Message/Message.php +393; includes/Message/Message.php +269; includes/Message/Message.php +268; includes/Message/Message.php +274; includes/libs/StatusValue.php +369; includes/libs/StatusValue.php +364; includes/libs/StatusValue.php +362; includes/libs/StatusValue.php +248; includes/libs/StatusValue.php +280; includes/libs/StatusValue.php +278; includes/libs/StatusValue.php +603; includes/Message/Converter.php +119; includes/Message/Converter.php +101; includes/Message/Converter.php +97; includes/Message/Converter.php +45; annotations in \MediaWiki\Message\Message::__toString; includes/Message/Message.php +275) Change-Id: I845154f534575ea9f274f38c4cbad239883d07ef
* | Add namespace and deprecation alias to WatchedItemStoreEbrahim Byagowi2024-05-202-0/+2
| | | | | | | | | | | | | | | | | | This patch introduces a namespace declaration for the MediaWiki\Watchlist to WatchedItemStore and establishes a class alias marked as deprecated since version 1.43. Bug: T353458 Change-Id: I820a3512440ba5a1de13e8470ccf5845918f3198
* | Add namespace and deprecation alias to TextContentEbrahim Byagowi2024-05-191-0/+1
|/ | | | | | | | | This patch introduces a namespace declaration for the MediaWiki\Content to TextContent and establishes a class alias marked as deprecated since version 1.43. Bug: T353458 Change-Id: Ic251b1ddfcf6db9c85cb54cddf912aa827d2bc3a
* Add namespace and deprecation alias to WatchedItemEbrahim Byagowi2024-05-171-0/+1
| | | | | | | | | This patch introduces a namespace declaration for the MediaWiki\Watchlist to WatchedItem and establishes a class alias marked as deprecated since version 1.43. Bug: T353458 Change-Id: Id2a582b624f21867240def2541c98ce5b1bd12b4
* Add namespace and deprecation alias to Xml and XmlSelectEbrahim Byagowi2024-05-161-0/+1
| | | | | | | | | | This patch introduces a new namespace declaration, MediaWiki\Xml and adds Xml and XmlSelect to it and establishes class aliases marked as deprecated since version 1.43. Bug: T353458 Change-Id: I45cccd540b6e15f267d3ab588a064fbeb719d921
* HistoryAction: Don't use the deprecated codex-search-styles moduleJames D. Forrester2024-05-051-1/+0
| | | | | | | | Instead, make mediawiki.action.history.styles also a CodexModule, adding in the one Codex component (CdxButton) we currently use. Bug: T356676 Change-Id: I9dcf6ebe5190b9b3379db21ee08bf48e6e6a613f
* Merge "InfoAction: Minor cleanup"jenkins-bot2024-05-041-31/+36
|\
| * InfoAction: Minor cleanupReedy2024-05-041-31/+36
| | | | | | | | Change-Id: I5792eea713feab9faccbc6a0eb0e7b14611a583b
* | InfoAction: Specify days directly in pageinfo-visiting-watchersJon Harald Søby2024-04-301-7/+2
|/ | | | | | | | | | | Use a number of days directly in the message, instead of indirectly via `Language::formatTimePeriod()` (which will yield 'days' for any reasonable value of WatchersMaxAge), to aid with translation. Follows-Up: I898c463f5cb4efc40877f0bc67156a296bd506e4 Bug: T363659 Change-Id: Ic3c9f94232264aead3cb6e058a5603256f5eebf2
* Allow interwiki redirects on the same domainMáté Szabó2024-04-251-3/+1
| | | | | | | | | | | | | | | | | | | | Currently, the logic handling local interwiki redirects (e.g. https://example.com/wiki/iwprefix:Foo) treats the title as invalid if the target is under the same domain as the origin, ostensibly to prevent redirect loops. This seems to be a somewhat arbitrary limitation that has been present ever since the feature was added in 52def2f. This limitation causes headaches for sites that host sister projects under the same domain, e.g. https://starwars.fandom.com/wiki/essences:Test works fine but https://starwars.fandom.com/wiki/es:Test requires a bag of tricks involving hijacking the BadTitleError thrown from the init code at the output stage and serving up a redirect anyways. Instead, allow interwiki redirects under the same domain and prevent trivial redirect loops by checking that the target URL does not equal the request URL. Bug: T363423 Change-Id: Idcac16979e668903b9dd2bacdc4c6d14d5843a1c
* actions: Fix PSR2.Classes.PropertyDeclaration.Multiple errorsTaavi Väänänen2024-04-212-2/+6
| | | | Change-Id: Ida2fd731b70ad7e2a496975cd87c6ef90b920bd2
* InfoAction: Explain to users how long WatchersMaxAge is, not just 'recent'James D. Forrester2024-04-101-1/+7
| | | | | Bug: T336250 Change-Id: I898c463f5cb4efc40877f0bc67156a296bd506e4
* InfoAction: Document array shape for PhanBartosz Dziewoński2024-04-032-3/+4
| | | | Change-Id: Ic20e4f233f1f30e9978925b370fa6c389165f9c6
* Add explicit parentheses around mixed boolean operatorUmherirrender2024-03-231-2/+2
| | | | | | | Mixing different binary boolean operators within an expression without using parentheses to clarify precedence is not allowed (T358966) Change-Id: I24ca752d5dac7c948fdbcabf721f6f0aef8a466f
* HistoryPager: Add #[AllowDynamicProperties]Reedy2024-03-201-0/+1
| | | | | Bug: T324903 Change-Id: I45d3763683fda907d3213c4e1cf081b1c7068809
* Standardise all our class alias deprecation comments for ease of greppingJames D. Forrester2024-03-191-4/+1
| | | | Change-Id: I7f85d931d3b79da23e87b4e5692b2e14be8fcaa0
* Rename dropdown-related methods to avoid random camel-caseBartosz Dziewoński2024-03-091-4/+4
| | | | | | | | | | | | | | | | It's a dropdown, not a drop down, therefore rename: * Html::listDropDownOptions → Html::listDropdownOptions * Xml::listDropDownOptions → Xml::listDropdownOptions * Html::listDropDownOptionsOoui → Html::listDropdownOptionsOoui * Xml::listDropDownOptionsOoui → Xml::listDropdownOptionsOoui * Xml::listDropDown → Xml::listDropdown In PHP, method names are case-insensitive, therefore we can do this without a breaking change or deprecation. This also matches the naming convention in OOUI. Change-Id: Ifda13ba9dee316709c424636ec3b285de8d0e9b1
* Namespace includes/cacheJames D. Forrester2024-02-201-1/+1
| | | | | Bug: T353458 Change-Id: Ic3f3168ef17113f5fb3ec11e0a47f52d65eefba9
* Move Parser to Mediawiki\Parser namespaceSubramanya Sastry2024-02-161-0/+1
| | | | | | | | Bug: T166010 Co-Authored-By: Daimona Eaytoy <daimona.wiki@gmail.com> Co-Authored-By: James Forrester <jforrester@wikimedia.org> Co-Authored-By: Subramanya Sastry <ssastry@wikimedia.org> Change-Id: I79b4e732c45095eedbaa80afa5eb7479b387ed8a
* Namespace Message, move to appropriate directoryJames D. Forrester2024-02-145-0/+5
| | | | | Bug: T353458 Change-Id: I088cbc53fbcdb974e5b05b45a62e91709dacc024
* Namespace HTMLForm and friendsJames D. Forrester2024-02-141-1/+1
| | | | | Bug: T353458 Change-Id: I09e66c3223018ec47e0549ee7f6a590b676f4eef
* Namespace includes/contextJames D. Forrester2024-02-0818-8/+19
| | | | | Bug: T353458 Change-Id: I4dbef138fd0110c14c70214282519189d70c94fb
* Merge "Remove uses of $wgUseMediaWikiUIEverywhere"jenkins-bot2024-02-051-6/+0
|\
| * Remove uses of $wgUseMediaWikiUIEverywhereBartosz Dziewoński2024-02-041-6/+0
| | | | | | | | | | | | | | | | | | Removing the config variable in a separate change: Ib9966bc6a4a94f771cb99a5aa52fb6a1dc826ca5 (just in case something depends on its existence). Bug: T182050 Change-Id: Ic3e038df16fc540ec7f6bcb9a54d73f8d596d305
* | Merge "Html: Copy listDropDownOptions() and listDropDownOptionsOoui() from ↵jenkins-bot2024-02-041-1/+1
|\ \ | | | | | | | | | Xml and migrate users"
| * | Html: Copy listDropDownOptions() and listDropDownOptionsOoui() from Xml and ↵James D. Forrester2024-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | | migrate users Bug: T356544 Change-Id: Ibcc13c92a48b3fd2a33914418dfbefb0dd890c82
* | | Merge "actions: Switch from mixed Xml and Html classes to pure Html ones"jenkins-bot2024-02-042-2/+2
|\ \ \
| * | | actions: Switch from mixed Xml and Html classes to pure Html onesJames D. Forrester2024-02-032-2/+2
| |/ / | | | | | | | | | | | | Bug: T356544 Change-Id: Ifb38c4db9e01a67537eb8e1c986df0016a314061
* / / HistoryPager: Switch from mixed Xml and Html classes to pure Html onesJames D. Forrester2024-02-031-13/+14
|/ / | | | | | | | | Bug: T356544 Change-Id: I7e27fa91132d4521f1c9522955cd579339aa2c43
* | Merge "entrypoint: Isolate entry points from PHP runtime for testing"jenkins-bot2024-02-021-10/+2
|\ \ | |/ |/|
| * entrypoint: Isolate entry points from PHP runtime for testingdaniel2024-02-021-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | 1) Introduce EntryPointEnvironment which wraps functions that interact with the PHP runtime, so they can be mocked for testing. 2) Allow server info fields to be overwritten in FauxRequest. 3) Make MediaWikiEntryPoint use WebResponse to set headers Bug: T354216 Change-Id: Ic21950c956de5d2b5a7dd66a1e2de58f807cfd9f
* | index.php: Restore support for forcesafemode option.daniel2024-01-301-0/+6
| | | | | | | | | | | | | | | | This code was originally introduced in I6f2d024c01cdb1 and then accidentally removed in a rebase of Ib70e4e67e4cb. Bug: T355314 Change-Id: Ibc4431b15d5ddbdff69ac62e287d5e8e5f6beec0
* | Merge "Warn if page was edited while deletion was being confirmed"jenkins-bot2024-01-292-4/+50
|\ \