aboutsummaryrefslogtreecommitdiffstats
path: root/includes/revisiondelete/RevDelRevisionItem.php
Commit message (Collapse)AuthorAgeFilesLines
* Replace a number of uses of class aliases with the real thingsJames D. Forrester2025-03-261-0/+2
| | | | | | | Found via disabling phan's alias support for a run (and ignoring wgLang's hard-coded state of being a \Language, alas). Change-Id: I4753bcd84d72d6de111fc7ffc5841fa417bf7333
* Remove 2-line PHPDocs that just repeat the types from the codethiemowmde2025-01-171-2/+0
| | | | | | | | | | | | | | | | Same as Ia294bf4 did for 1-line comments. This patch removes slightly more complex 2-line PHPDoc comments that don't add any new information to the code, but literally repeat what the code already says. They say "don't document the code, code the documentation", and we are doing this more and more. We just tend to forget to remove the obsolete comments. Note I'm also removing a line of text in a few cases when it's very short and literally says the same as the method name. Again, such comments add zero new information. Change-Id: I01535404bab458c6c47e48e5456403b7a64198ed
* Use namespaced classesUmherirrender2024-10-211-0/+1
| | | | | | | Changes to the use statements done automatically via script Addition of missing use statement done manually Change-Id: I73fb416573f5af600e529d224b5beb5d2e3d27d3
* Add MediaWiki\RevisionList namespace to the related classesEbrahim Byagowi2024-05-211-0/+1
| | | | | | | | | This patch introduces a namespace, MediaWiki\RevisionList, and adds it to the related classes and establishes class aliases marked as deprecated since version 1.43. Bug: T353458 Change-Id: I1614a00dd8973c5300d95317a725cbe46e14d1af
* 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
* Move away from wfGetDB() callsAmir Sarabadani2024-02-121-1/+1
| | | | | | | | | | | If we are serious about getting rid of wfGetDB(), we should start replcing callers with proper replacement. These classes don't have any injection so it doesn't make sense to introduce it for this specific usecase. Bug: T330641 Change-Id: I645f67324d441288c63787c7e42390b59106c585
* Migrate more usages of Database::update() to UpdateQueryBuilderAlexander Vorwerk2023-06-091-14/+13
| | | | | Bug: T330640 Change-Id: I094eea810886b13d832be575d9b9df8f8e4a77ea
* revisionslists: Replace deprecated Linker::revComment/commentBlockUmherirrender2022-12-111-1/+2
| | | | | Bug: T324906 Change-Id: I0db8521f5ea0266a41687c46d7466a97fbc21742
* Reorg: Move DummyLinker and Linker to linker/Amir Sarabadani2022-12-081-0/+1
| | | | | | | This feels like a no-brainer unless I'm missing something obvious Bug: T321882 Change-Id: Id49c3d0dd6ea4593211048850856b5b8e05a8fb3
* Use short array destructuring instead of list()Tim Starling2022-10-211-1/+1
| | | | | | | | Introduced in PHP 7.1. Because it's shorter and looks nice. I used regex replacement. Change-Id: I0555e199d126cd44501f859cb4589f8bd49694da
* build: Updating dependencieslibraryupgrader2021-07-221-1/+1
| | | | | | | | | | | | | | composer: * mediawiki/mediawiki-codesniffer: 36.0.0 → 37.0.0 The following sniffs now pass and were enabled: * Generic.ControlStructures.InlineControlStructure * MediaWiki.PHPUnit.AssertCount.NotUsed npm: * svgo: 2.3.0 → 2.3.1 * https://npmjs.com/advisories/1754 (CVE-2021-33587) Change-Id: I2a9bbee2fecbf7259876d335f565ece4b3622426
* Post Revision-removal cleanupDannyS7122021-06-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updates for the removal of the Revision class itself and the various methods/hooks/variables removed in the process, including: - Update some documentation removing most references to the Revision class and updating the MCR migration notes to reflect the past tense for Revision methods. - Change some capitalization from "Revision" to "revision" to make it clear comments are about revisions in general, not the Revision class in particular. - Minor code tweaks including removing unused variables that were around for the old hooks that were removed, and removing the use of DeprecatablePropertyArray where no longer needed for anything. - Fix incorrect documentation for PageUpdater::getStatus(), the status value changed a while ago to have revision-record in addition to revision, and recently to only have the revision-record, but ironically PageUpdater was never updated. - Removed Parser::$mRevisionObject, used to be a Revision object and was deprecated in 1.35, missed earlier because it was no longer being set to Revision objects, always null. - Add RevisionRecord typehints in DummyLinker to match those in the corresponding Linker methods This should be a no-op in terms of functionality. Bug: T247143 Change-Id: I03bbb94fc29085855448780b1a5ad9063911ecc4
* Using RevisionListBase::getPage instead of calling $title directlyZabeMath2021-05-131-2/+2
| | | | | Bug: T282825 Change-Id: I9966b206b053c8227e619521b5ad69561198443e
* Replace uses of DB_MASTER with DB_PRIMARYJames D. Forrester2021-04-291-1/+1
| | | | | | Just an auto-replace from codesniffer for now. Change-Id: I5240dc9ac5929d291b0ef1c743ea2bfd3f428266
* Add classes to when a linked change is suppressedAmir Sarabadani2021-04-291-1/+2
| | | | | | | | | | This also tries to centralize adding logic of adding history-deleted class as well. To make future changes easier. This doesn't affect history deletion on files, recentchanges, and logs yet Bug: T23272 Change-Id: I08f14f712479e1b170c606e2b64857f8386acd76
* Use Authority for revision audience where possiblePetr Pchelko2021-02-241-19/+9
| | | | | Depends-On: I963a79d94b9e39086940a43945def7c8eff1536d Change-Id: If99d428b391c0eaf61396565af7f38740bef6c4a
* Remove use of Revision objects in RevisionItem classesDannyS7122020-05-051-9/+10
| | | | | | Bug: T249393 Bug: T249021 Change-Id: I1e240adb2799978b7f4302f90e43f7d337a0fdd9
* Replace various uses of Revision objectsDannyS7122020-05-011-31/+50
| | | | | | | | | | Each file's changes are independent of the other files and can be reviewed separately. Bug: T250579 Bug: T250714 Bug: T250580 Change-Id: I223dd6dfba27e560aff89be6705d91c40c550dd8
* Pass RevisionRecord to Linker methodsDannyS7122020-04-181-2/+2
| | | | | | | | | | | Hard deprecation of passing Revision objects will follow soon, but until that is ready core calls can be updated There is some code cleanup that could be done around the calls, but to simplify review no other changes are made. Bug: T249561 Change-Id: Ifcfb3811650decffeaa87dc033c41fd1710b47a6
* Always pass a user when using FOR_THIS_USER on revision methodsDannyS7122020-03-231-3/+3
| | | | | Bug: T248291 Change-Id: I94a581e67edc190c8d7eeab487dcbd502938c856
* Hard deprecate Revision::userCanDannyS7122020-03-111-6/+18
| | | | | | | Replace remaining uses outside of tests, hide deprecated in tests Bug: T247259 Change-Id: I91dfb46ed6864ee89d968aea8ec93b5ea2f8389e
* Remove hacks for lack of index on rc_this_oldidBrad Jorsch2019-12-041-2/+0
| | | | | | | | | | | | | In several places, we're including rc_timestamp or other fields in a query selecting on rc_this_oldid because there was historically no index on the column. The needed index was created by I0ccfd26d and deployed by T202167, so let's remove the hacks. Bug: T139012 Bug: T239772 Change-Id: Ic99760075bde6603c9f2ab3ee262f5a2878205c7
* revisionlist: Strict type hints in RevisionItem constructorsThiemo Kreuz2019-10-251-1/+1
| | | | Change-Id: Iab0bce89a9a4111eef217bbc1a8f1263f1ed796a
* phan: Disable enable_class_alias_supportUmherirrender2019-09-151-1/+1
| | | | | | It is enabled for b/c in extensions, but not needed in core Change-Id: I51dca12be9c77049f77563d9bf0edd07928c2300
* Unsuppress another phan issue (part 7)Daimona Eaytoy2019-09-031-0/+2
| | | | | | | Bug: T231636 Depends-On: I2cd24e73726394e3200a570c45d5e86b6849bfa9 Depends-On: I4fa3e6aad872434ca397325ed7a83f94973661d0 Change-Id: Ie6233561de78457cae5e4e44e220feec2d1272d8
* Avoid usage of deprecated Revision::* constants, use RevisionRecordDerick Alangi2019-07-211-12/+18
| | | | Change-Id: I872fc89e5c02dd6a3ae9cd7e76640b95dc33f514
* Use PRC_AUTOPATROLLED for rollbacks and revdelRoan Kattouw2019-02-061-1/+1
| | | | | | | | | These are automatic, and happen regardless of whether the user performing the action has patrol-related rights. Bug: T190408 Bug: T184791 Change-Id: Icd1f3826c378ae759f501d87ffb9988766775b27
* Remove PhanUndeclaredStaticMethod from blacklistErik Bernhardson2018-08-281-1/+12
| | | | | | | | | | | There was a single instance of this issue which was reasonably simple to solve. The code that triggered the issue was not wrong, but calling the grandparent constructor directly is not the cleanest code so it seems right to fix it. Switch revision initialization into an overridable function to remove the need to even have a constructor in the class. Change-Id: Ic2af0d93e8d55e93061e3f4b5c7a4122509543f0
* Use constants for rc_patrolled values instead of numbersAmir Sarabadani2018-04-131-1/+1
| | | | | | These are recently introduced, better to use them Change-Id: Id904ff09081cb5a1fe2f1c24c5d415da18fd2294
* Add `actor` table and code to start using itBrad Jorsch2018-02-231-0/+4
| | | | | | | | | | | | | Storing the user name or IP in every row in large tables like revision and logging takes up space and makes operations on these tables slower. This patch begins the process of moving those into one "actor" table which other tables can reference with a single integer field. A subsequent patch will remove the old columns. Bug: T167246 Depends-On: I9293fd6e0f958d87e52965de925046f1bb8f8a50 Change-Id: I8d825eb02c69cc66d90bd41325133fd3f99f0226
* Fix RevDel API output for formatversion=2Brad Jorsch2016-12-191-3/+3
| | | | | | | | | | Use booleans, not the old empty-string-or-undefined. This bugfix is a breaking change, but chances are it won't affect many clients. Bug: T153518 Change-Id: If5fa2cdcb973b186349307b29e4266daceef0a9d
* Replace Linker::link() with LinkRenderer in all revisiondelete pagesdivadsn2016-12-061-6/+6
| | | | | | | | | | | * RevDelArchiveItem * RevDelArchivedFileItem * RevDelFileItem * RevDelLogItem * RevDelRevisionItem Bug: T149346 Change-Id: I96f83d06b4d3ccf3f76ccfca843a6aaf76d89063
* Convert all array() syntax to []Kunal Mehta2016-02-171-23/+23
| | | | | | | | | | Per wikitech-l consensus: https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html Notes: * Disabled CallTimePassByReference due to false positives (T127163) Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
* Add IContextSource as parameter to ChangeTags::formatSummaryRowAashaka Shah2016-02-041-1/+5
| | | | | | | | | | | | | | | | | | | | | | Using IContextSource avoids the use of $wgLang and wfMessage which make use of global $wgTtle. Add IContextSource as parameter to ChangeTags::formatSummaryRow to avoid globals. Define an IContextSource instance in all functions which reference ChangeTags::formatSummaryRow and pass it in ChangeTags::formatSummaryRow function call. Also make the default value of IContextSource $context as null in parameter, to avoid breaking changes for old callers in extensions. Document default null value of IContextSource and add a @note to prefer IContextSource over null value. Remove trailing whitespace, and make code order according to parameter order. Bug: T105648 Change-Id: Ib54a6a96b73f6cd8fcdf8e520db2448a1e811cfa
* Show change tags on Special:RevisionDeletemhutti12015-12-151-1/+19
| | | | | | | | | RevDelRevisionItem.php has been modifed to display tags and RevDelREvisionList.php has been modifed to request tag data its database query. Bug: T109041 Change-Id: Icaae790b7d21a6670c692d11e25c6db7b7325530
* Cleaned up CAS check in RevDelLogItem::setBits for recentchangesAaron Schulz2015-05-231-1/+1
| | | | Change-Id: I6c29653361a0937489c27891739a9dc626c20167
* Fix phpcs issues in actions and revisiondelete dirsaddshore2014-08-121-1/+1
| | | | Change-Id: I54c1e336b8c44ff8720ac38c8b2d68ede42af305
* Restore formatting before split of RevisionDelete.phpumherirrender2014-08-081-11/+55
| | | | | | | | I244a66fe19c089df4bcabcf745536d99b2103bc4 splitted RevisionDelete.php in 11 files, but that removed code formatting and produced long lines. Restored code formatting and added newline at end of files. Change-Id: I51ab4181b723b46a806dad4752420e6bfc530133
* Split RevisionDelete.php to separate filesReedy2014-08-071-0/+143
Change-Id: I244a66fe19c089df4bcabcf745536d99b2103bc4