aboutsummaryrefslogtreecommitdiffstats
path: root/includes/specials/SpecialLog.php
Commit message (Collapse)AuthorAgeFilesLines
* specials: Use type declaration on undocumented private functionsUmherirrender2025-04-041-1/+1
| | | | Change-Id: Ib394792b10afabf5e0440cd3be34c1f2fd9cfe1d
* Namespace all remaining files in includes/changetagsJames D. Forrester2025-03-251-1/+1
| | | | | Bug: T353458 Change-Id: I3cf44dfe5425f2efb8409c83571c427447b053af
* Namespace all remaining files in includes/exceptionJames D. Forrester2025-03-251-1/+1
| | | | | | | | | In MediaWiki/Exception, to follow PSR-4 per plural vs. singular (this can be changed later if people really care). Also, move the couple of exceptions in here that were already namespaced in the MW-top-level into the new space. Bug: T353458 Change-Id: I12ed850ae99effb699a6d7ada173f54e72f0570e
* Namespace all remaining files in includes/loggingJames D. Forrester2025-03-191-3/+3
| | | | | Bug: T353458 Change-Id: Ibe1810f1c71316a9124e1dc6ae405097dafd5267
* Replace remaining gendered pronounsTacsipacsi2025-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | To respect all genders, fix comments to not assume users use binary pronouns (or even that users are “he”s), but rather use singular “they”. Also fix some typos that happened to result in gendered pronouns, and a few incorrect commas and missing articles in comments near the fixed pronouns. I skipped four files: - HISTORY – the release notes were made with the wording they were made with, I’m not sure if rewording them afterwards is okay - tests/phpunit/data/preprocess/All_system_messages.{txt,expected} – these are test cases generated from somewhere, I’d regenerate them rather than updating - languages/i18n/qqq.json – fixed on Translatewiki instead to make their edit histories more useful Bug: T387626 Change-Id: I282406a0e1407be548e917735fe7eb9a6bf8b136
* specials: Remove constructor PHPdoc blockUmherirrender2025-02-201-8/+0
| | | | | | The doc block is identical to the type declaration for each argument. Change-Id: I8281b94351fe2be30344f1425a60f31fbf205100
* SpecialLog: Remove module 'mediawiki.userSuggest'Fomafix2024-12-141-1/+0
| | | | | | | | | The special pages doesn't use this module anymore. The module was added in 91ba0535b26c and the usage of this module was removed in 38756eae46a8. Change-Id: I8baba2939569fe6090b4e46a7c3a514687ab3c94
* Use explicit nullable type on parameter argumentsUmherirrender2024-10-161-1/+1
| | | | | | | | | | | Implicitly marking parameter $... as nullable is deprecated in php8.4, the explicit nullable type must be used instead Created with autofix from Ide15839e98a6229c22584d1c1c88c690982e1d7a Break one long line in SpecialPage.php Bug: T376276 Change-Id: I807257b2ba1ab2744ab74d9572c9c3d3ac2a968e
* Replace deprecated LogFormatter::newFromRow/newFromEntryUmherirrender2024-07-291-1/+8
| | | | Change-Id: I453ce3148a46fcb9cc5c685cee92274e0cb4f98a
* specials: Improve docs and `@ingroup` tags, fix file headersTimo Tijhof2024-05-151-3/+0
| | | | | | | | | | | | | | | | | | | | * Add relevant `@ingroup` to special pages that belong to a specific component and for which a doc group is already defined (defgroup), e.g. "Upload" for SpecialUpload, "JobQueue" for SpecialRunJobs. * Remove duplicate descriptions from file blocks in favour of class doc blocks. This reduces needless duplication and was often incorrect or outdated, and helps make file headers more consistently (visually) ignorable. Add missing `ingroup` to class blocks (and remove any from file blocks) as otherwise the file is indexed twice (e.g. in Doxygen) which makes navigation on doc.wikimedia.org rather messy. Ref https://gerrit.wikimedia.org/r/q/message:ingroup+is:merged Bug: T364652 Change-Id: I795c43b6d72782d457c963e352d7e1b022c2b641
* Standardise all our class alias deprecation comments for ease of greppingJames D. Forrester2024-03-191-3/+1
| | | | Change-Id: I7f85d931d3b79da23e87b4e5692b2e14be8fcaa0
* Merge "Use OutputPage::setPageTitleMsg() instead of ::setPageTitle()"jenkins-bot2023-09-191-1/+1
|\
| * Use OutputPage::setPageTitleMsg() instead of ::setPageTitle()C. Scott Ananian2023-09-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Passing a Message argument to OutputPage::setPageTitle() is deprecated, because the message is not properly HTML-escaped by default. Use ::setPageTitleMsg() instead wherever the message doesn't include HTML metacharacters. Also protect arguments with Message::plaintextParams() where appropriate. Bug: T343994 Bug: T343849 Change-Id: Iba67d008545249772c136c5d6d302110516d3b94
* | Namespace remaining 'specialpage' files under \MediaWiki\SpecialPageJames D. Forrester2023-09-181-1/+1
| | | | | | | | | | | | | | SpecialPageFactory is already here, but none of the others were yet. Bug: T166010 Change-Id: I9689bf0a1ab329625e23669b99f019b96295fffd
* | Namespace 'special' Pagers under \MediaWiki\PagerJames D. Forrester2023-09-181-1/+1
|/ | | | | | | | | | They're under 'specials' because that's where they're mostly used, but they're just another kind of Pager (shown by their use outwith the MediaWiki\Specials hierarchy, which is a bad code smell for us to review later). Bug: T166010 Change-Id: Iad3f91582b723c1e6679525aa852ffdfd8c6d5ba
* Remove redundant empty() constructs (3)Daimona Eaytoy2023-09-081-1/+1
| | | | | | | | | | | | | empty() only makes sense when the expression it checks is possibly undefined, otherwise it's equivalent to a truthiness check with the additional downside of suppressing errors when it's not wanted. Replace it with simple truthiness checks, using strict comparison when that seems to help with polymorphic variables. These were caught by a bespoke phan plugin. Change-Id: Ide262162553d2da7e5388d05e8731529c44591c1
* SpecialLog: Only set valid local user as the relevant userFunc2023-08-241-10/+16
| | | | | Bug: T344886 Change-Id: I66fa9df57304a4922bb98285c8b82237dc851b2f
* Reorg: Move MWTimestamp to MediaWiki\UtilsAmir Sarabadani2023-08-191-1/+1
| | | | | Bug: T321882 Change-Id: I48c10343295c4eb3d9ef8037343b0070e928f040
* SpecialLog: Handle invalid title betterLucas Werkmeister2023-07-101-4/+7
| | | | | | | | Only try to adjust the page parameter if makeTitleSafe() doesn’t return null. Bug: T341475 Change-Id: If88c6b7bc15fcc17768d45bba7ff00842477d1b9
* Use special pages instead of actions for revision delete and edit tagsFunc2023-07-061-17/+4
| | | | | | | | | | | | Timo mentioned the difficulty to port these special pages to actions while with use cases of log events and oldimages, and pointed out we may re-consider the direction of the task. They indeed can be switched to use special pages directly without any issue, so let's go for this direction. Bug: T323338 Bug: T340853 Change-Id: I1947c1d4ccfb624640de761f120b3f1a482de740
* Merge "Cleanup LogEventsList"jenkins-bot2023-07-041-5/+4
|\
| * Cleanup LogEventsListFunc2023-06-301-5/+4
| | | | | | | | | | | | | | | | | | | | | | LogEventsList::showOptions() never supports multiple log type, only the frist one in array would be used, so changed to accept string and simplified related methods. Decoupled it with LogPager a bit by not setting allowed actions from LogPager. Change-Id: Iab3eb4f1606a5a41934a5569ebf1377ed7f0b362
* | SpecialLog: Fix issues related to IP usersFunc2023-07-031-3/+3
|/ | | | | | | | Bug introduced in I370dcca6 and I7e9ad460, sorry. Bug: T338042 Bug: T340929 Change-Id: Ia9d74caa93eb03ea11fb22265ac7b47334689988
* SpecialLog: Fix some interface issues (follow-up to commit 2ac0720)Func2023-06-191-36/+23
| | | | | | | | | | | | 1. Using WebRequest::setVal() for subpage syntax and user namespace fallback, so HTMLForm can prefill inputs correctly. 2. Only set the title and log type description when the type is valid. Also, fixed a bug in subpage syntax parsing when having two parts but the first part is not a valid log type, e.g. Special:Log/foo/bar Bug: T338042 Change-Id: I7e9ad46060d2f2fe65af25c4bc0dd94c736647ce
* SpecialLog: Fix empty offender on suppression logFunc2023-06-161-2/+2
| | | | | | | | | The offender field can be empty, should display all logs matching rest of conditions. Follow-up to commit 23ad1fd. Change-Id: I543a4ecc1c22397badccff83e335b903309cf3a2
* Merge "Add tests for Special:Log/suppress, fix for PostgreSQL"jenkins-bot2023-06-151-1/+4
|\
| * Add tests for Special:Log/suppress, fix for PostgreSQLMarius Hoch2023-06-151-1/+4
| | | | | | | | | | | | Also handle unknown "offender" actors more nicely. Change-Id: Iaf30aae9f14c5a8edc44b89ea67acd6a96909d66
* | SpecialLog: Enable built-in validation of HTMLFormFunc2023-06-141-11/+5
|/ | | | | | | | | | | | | | | | Enable built-in validation of HTMLForm by removing the `default` parameter of each field, HTMLForm now will prefill fields when we set the second param of setFormIdentifier() to true for GET form. Also removed unused params of getOption() since the only caller is SpecialLog. And inlined some very short private helpers. Note: User creation logs would not actually be filtered out if all checkboxes are unchecked even without this patch, I will have another fix for that. Bug: T338042 Change-Id: I370dcca6c2c21c62c67c204fbcb78a27ebc58117
* Replace internal Hooks::runnerUmherirrender2023-05-111-2/+3
| | | | | | | | | The Hooks class contains deprecated functions and the whole class is going to get removed, so remove the convenience function and inline the code. Bug: T335536 Change-Id: I8ef3468a64a0199996f26ef293543fcacdf2797f
* Namespace SpecialL* under \MediaWiki\SpecialsJames D. Forrester2023-05-041-0/+15
| | | | | | Plus two redirect specials. Change-Id: Ie56f96894f6bfbdb9bc093fce8b72b18f8adce86
* Specials: Mass switch everything to IConnectionProvider from LBAmir Sarabadani2023-04-191-8/+7
| | | | | Bug: T330641 Change-Id: Ie1772da59f92213fea598f02385c3e0ac6d200a7
* Copy the Renameuser extension into coreTim Starling2023-03-031-0/+1
| | | | | | | | | Copy the Renameuser extension into core, with minimal code changes. The hook handlers are inlined into Article, SpecialLog and SpecialContributions. Bug: T27482 Change-Id: I314021f4138773df6aaf2753b33ab8283cd16974
* Reorg: Namespace the Title classJames D. Forrester2023-03-021-0/+1
| | | | | | | | | | | | | | | | | | | This is moderately messy. Process was principally: * xargs rg --files-with-matches '^use Title;' | grep 'php$' | \ xargs -P 1 -n 1 sed -i -z 's/use Title;/use MediaWiki\\Title\\Title;/1' * rg --files-without-match 'MediaWiki\\Title\\Title;' . | grep 'php$' | \ xargs rg --files-with-matches 'Title\b' | \ xargs -P 1 -n 1 sed -i -z 's/\nuse /\nuse MediaWiki\\Title\\Title;\nuse /1' * composer fix Then manual fix-ups for a few files that don't have any use statements. Bug: T166010 Follows-Up: Ia5d8cb759dc3bc9e9bbe217d0fb109e2f8c4101a Change-Id: If8fc9d0d95fc1a114021e282a706fc3e7da3524b
* Reorg: Move HTML-related classes out of includes/ to Html/Amir Sarabadani2023-02-161-0/+3
| | | | | Bug: T321882 Change-Id: I5dc1f7e9c303cd3f5b9dd7010d6bb470d8400a18
* Special:Log: Let the tag filter be inverteddvrandecic2022-12-131-2/+5
| | | | | | | | Adding a checkbox that is passed through to the backend that allows to filter entries out based on a tag. Bug: T174349 Change-Id: I42c4671def335401da93789f304eb093c07c8190
* pager: Fix navigations when date range is setFunc2022-12-101-6/+0
| | | | | | | | | | | The main idea here is to make ReverseChronologicalPager not mess up mOffset which IndexPager uses, store the offset in another variable and add separate query conditions. Also, make RangeChronologicalPager more cooperative with its parent class, avoid unnecessary inconsistency. Bug: T228431 Change-Id: Icf76c946770aacee5b038522c066fca33ed1546f
* Prefill page/pattern/tagfilter/offender in form for Special:LogUmherirrender2022-10-311-1/+4
| | | | | Bug: T321988 Change-Id: I09284cf5337e7fc548667a2e5b890c2a70cb8095
* Use the null coalescing assignment operatorTim Starling2022-10-211-1/+1
| | | | | | | | Available since PHP 7.4. Automated search, manual replacement. Change-Id: Ibb163141526e799bff08cfeb4037b52144bb39fa
* Normalize cidr ranges on Special:Log before searching block logsUmherirrender2022-04-251-3/+14
| | | | | Bug: T270798 Change-Id: Ic470fbb1ef36107d26fdc737ce6493760f39c9ed
* Use MainConfigNames instead of string literals, #2Aryeh Gregor2022-04-131-1/+2
| | | | | | | This covers all occurrences of /onfig->.*get( '/ in includes/. Undoubtedly there are still plenty more to go. Change-Id: I33196c4153437778496f40436bcde399638ac361
* Inject UserIdentityLookup into SpecialLogAlexander Vorwerk2021-09-251-4/+12
| | | | Change-Id: Ifc17a7ef38da60ec1534b39df1657f2394cbcb59
* Deprecate UserIdentity::getActorId()daniel2021-03-131-9/+11
| | | | | | | Note: User::getActorId() is not (yet) deprecated. Bug: T274179 Change-Id: Ic2ca6d489db821fc2334e53bf2496c7b0d3ea5b1
* Merge "Convert second batch of special pages to authority"jenkins-bot2021-03-081-11/+4
|\
| * Convert second batch of special pages to authorityPetr Pchelko2021-03-041-11/+4
| | | | | | | | | | Depends-On: Ifc82d29a00d3fd136c44e0699e6bbfa11b8cf2a6 Change-Id: Iaf559a72cc47ec5d2481d7f740ad0eb303c94002
* | Enforce concealment of hidden RelevantUser at Skin levelAmmar Abdulhamid2021-03-081-1/+3
|/ | | | | | | | | | | | | | Skin is what takes a user or extract it from a title to set relevant user and so this is the right place to handle permission check too because if the user is hidden, it should be made known for all callers, instead of hoping each caller will do similar check which is duplication and not guranteed. Skin:setRelevantUser always takes user and this is now typehinted to avoid errors. Callers need to give what's required. Bug: T120883 Change-Id: I177cd83a9c4f87c27a63d8f530c40895d0f3f5dd
* Convert logging namespace to AuthorityPetr Pchelko2021-02-231-1/+0
| | | | Change-Id: Icb44acf275a7f9231c4d229b3886ed8a36d5cbd4
* SECURITY: Set a dummy title for Action buttons on Special:LogDannyS7122020-12-181-0/+12
| | | | | | | | | | | | | | | If no title is set, the fallback is to use the main page, as defined by MediaWiki:Mainpage On wikis where the main page can be translated, MediaWiki:Mainpage is sometimes set to use Special:MyLanguage to redirect to the appropriate version. This is interpreted as a special page, and ACtion::getActionName forces the action to be 'view' if the title cannot be used as a WikiPage, which includes all pages in NS_SPECIAL. Set a dummy title to avoid this. The title provided is unused by the SpecialPageAction class and does not matter. Bug: T205908 Change-Id: I0f0d2e592df96c9bad9001baede900f716433cfa
* Inject services into SpecialLogUmherirrender2020-10-261-12/+45
| | | | | | | | This covers only directly used services by this special page and pager Services used by the base class are not part of this patch set Bug: T259960 Change-Id: Ib4b5edf6b4c56ef626875df8d95496225cddf501
* Use LinkBatchFactory in pagers, special pages and actionsUmherirrender2020-09-061-1/+2
| | | | Change-Id: I299900316c8d3129844a047228cd1c15ae7dff63
* Hooks::run() call site migrationTim Starling2020-05-301-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Migrate all callers of Hooks::run() to use the new HookContainer/HookRunner system. General principles: * Use DI if it is already used. We're not changing the way state is managed in this patch. * HookContainer is always injected, not HookRunner. HookContainer is a service, it's a more generic interface, it is the only thing that provides isRegistered() which is needed in some cases, and a HookRunner can be efficiently constructed from it (confirmed by benchmark). Because HookContainer is needed for object construction, it is also needed by all factories. * "Ask your friendly local base class". Big hierarchies like SpecialPage and ApiBase have getHookContainer() and getHookRunner() methods in the base class, and classes that extend that base class are not expected to know or care where the base class gets its HookContainer from. * ProtectedHookAccessorTrait provides protected getHookContainer() and getHookRunner() methods, getting them from the global service container. The point of this is to ease migration to DI by ensuring that call sites ask their local friendly base class rather than getting a HookRunner from the service container directly. * Private $this->hookRunner. In some smaller classes where accessor methods did not seem warranted, there is a private HookRunner property which is accessed directly. Very rarely (two cases), there is a protected property, for consistency with code that conventionally assumes protected=private, but in cases where the class might actually be overridden, a protected accessor is preferred over a protected property. * The last resort: Hooks::runner(). Mostly for static, file-scope and global code. In a few cases it was used for objects with broken construction schemes, out of horror or laziness. Constructors with new required arguments: * AuthManager * BadFileLookup * BlockManager * ClassicInterwikiLookup * ContentHandlerFactory * ContentSecurityPolicy * DefaultOptionsManager * DerivedPageDataUpdater * FullSearchResultWidget * HtmlCacheUpdater * LanguageFactory * LanguageNameUtils * LinkRenderer * LinkRendererFactory * LocalisationCache * MagicWordFactory * MessageCache * NamespaceInfo * PageEditStash * PageHandlerFactory * PageUpdater * ParserFactory * PermissionManager * RevisionStore * RevisionStoreFactory * SearchEngineConfig * SearchEngineFactory * SearchFormWidget * SearchNearMatcher * SessionBackend * SpecialPageFactory * UserNameUtils * UserOptionsManager * WatchedItemQueryService * WatchedItemStore Constructors with new optional arguments: * DefaultPreferencesFactory * Language * LinkHolderArray * MovePage * Parser * ParserCache * PasswordReset * Router setHookContainer() now required after construction: * AuthenticationProvider * ResourceLoaderModule * SearchEngine Change-Id: Id442b0dbe43aba84bd5cf801d86dedc768b082c7