aboutsummaryrefslogtreecommitdiffstats
path: root/includes/specials/SpecialShortPages.php
Commit message (Collapse)AuthorAgeFilesLines
* Namespace all remaining files in includes/skinJames D. Forrester2025-03-251-1/+1
| | | | | Bug: T353458 Change-Id: I3e829e35c93bcaae75e401b1801bddf93c0b416c
* specials: Remove constructor PHPdoc blockUmherirrender2025-02-201-5/+0
| | | | | | The doc block is identical to the type declaration for each argument. Change-Id: I8281b94351fe2be30344f1425a60f31fbf205100
* Use content dir in DoubleRedirects and ShortPages special pagesEbrahim Byagowi2024-10-081-1/+6
| | | | | | | | | | | | | Whenever possible content dir should be used for titles coming from contents of a wiki rather than the user language UI. And now that we are here let's set lang attribute also as the links are in the content language while rest of the special page uses user language, that can be useful for better font rendering and so. Bug: T375975 Change-Id: Icff7338ecd7b9686a596f5192b2d6666a32263da
* Use HTML markup instead of bidi control chars in Special:ShortPagesEbrahim Byagowi2024-10-031-6/+3
| | | | | Bug: T375975 Change-Id: I77b2ca66e68d7a1998cda5268a02d266cb4926b7
* specials: Improve docs and `@ingroup` tags, fix file headersTimo Tijhof2024-05-151-5/+1
| | | | | | | | | | | | | | | | | | | | * 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
* Namespace NamespaceInfo under \MediaWiki\TitleJames D. Forrester2023-09-191-1/+1
| | | | | | | One of the big ones, so doing this alone. Bug: T166010 Change-Id: Ibe103cd362535d3cb94cb8931e95fc74099d1497
* 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 SpecialS* under \MediaWiki\SpecialsJames D. Forrester2023-09-141-0/+12
| | | | Change-Id: Icccdaa93f8089d88b6d3ba153ecfaa22c901ce66
* Use real type hints for services etc. in specials/ (N-Z)Bartosz Dziewoński2023-08-291-2/+1
| | | | | | | | | | | | | | | Mostly used find-and-replace: Find: /\*[\*\s]+@var (I?[A-Z](\w+)(?:Interface)?)[\s\*]+/\s*(private|protected|public) (\$[a-z]\w+;\n)((?=\s*/\*[\*\s]+@var (I?[A-Z](\w+)(?:Interface)?))\n|) Replace with: \3 \1 \4 Followed by some manual review to make sure I'm not changing too much, omitting some changes that looked too complicated and anything that caused test failures, and some whitespace fixes. Change-Id: I27149404eedc19e68bf62836d79ae0f2b85cc4d0
* specials: Fix setting the offset in inner subqueries in SpecialShortPagesAmir Sarabadani2023-07-261-4/+8
| | | | | | | | | And by extent, to Special:LongPages It's from Icc8894336 Bug: T341928 Change-Id: Iafaab5acf3d1f4c67da92a1d1ee3365740c8afa1
* rdbms: Add support for limit, offset and order by in UnionQueryBuilderAmir Sarabadani2023-07-031-1/+13
| | | | | | | | | And use it in Special:ShortPages and Special:LongPages where they rely on this. Change-Id: I80c21084652e287a9f8304a9e409cb6a1a25ce24 Follows-Up: Icc88943360941bc4159b56289be0d0deb04d46ee Bug: T340776
* SpecialShortPages: Document reason for "reallyDoQuery" overrideTimo Tijhof2023-06-051-23/+19
| | | | | | Bug: T168010 Bug: T334661 Change-Id: Idc89248b0ff4fb9c06c714c649177d5294dc26c8
* rdbms: Remove Database::unionConditionPermutations() and callersAmir Sarabadani2023-06-051-29/+24
| | | | | | | | | It is only used in Special:ShortPages, but it doesn't need such complex logic, just build multiple query builders and join them as a union. Bug: T334661 Change-Id: Icc88943360941bc4159b56289be0d0deb04d46ee
* SpecialShortPages: Mark query as read-onlyLucas Werkmeister2023-04-201-1/+2
| | | | | Bug: T335100 Change-Id: Idd9c25dcc36edcb47255afe57addfda8848ad38c
* Specials: Mass switch everything to IConnectionProvider from LBAmir Sarabadani2023-04-191-4/+4
| | | | | Bug: T330641 Change-Id: Ie1772da59f92213fea598f02385c3e0ac6d200a7
* build: Cleanup of .phpcs.xmlUmherirrender2023-04-131-0/+1
| | | | | | Use inline suppression for known exception from eval/passthru/query call Change-Id: Ie85ea5698a615adf07e4e391bf06d102149effd5
* 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/+1
| | | | | Bug: T321882 Change-Id: I5dc1f7e9c303cd3f5b9dd7010d6bb470d8400a18
* 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
* Migrate use of ${var}-style string interpolationMáté Szabó2022-07-291-2/+2
| | | | | | | | The "${var}" and "${expr}" style string interpolations are deprecated in PHP 8.2. Migrate usages in core to "{$var}" as appropriate. Bug: T314096 Change-Id: I269bad3d4a68c2b251b3e71a066289d4ad9fd496
* 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
* Rename four config variables to avoid 'blacklist' termReedy2021-09-081-1/+1
| | | | | | | | | | | | | | | As part of our wider work on modernising and making more welcoming the language we use within and around MediaWiki, now is a good time for us to rename these configuration variables: - $wgFileBlacklist is now $wgProhibitedFileExtensions - $wgMimeTypeBlacklist is now $wgMimeTypeExclusions - $wgEnableUserEmailBlacklist is now $wgEnableUserEmailMuteList - $wgShortPagesNamespaceBlacklist is now $wgShortPagesNamespaceExclusions Bug: T277987 Depends-On: I91e065c58fda144a722a41cf532e717f962d7a64 Change-Id: I558a8b20d67d48edccce0d065aec2d22992e9dda
* Use more neutral or alternative languageReedy2021-03-201-2/+1
| | | | | Bug: T277987 Change-Id: Iafc4b3e3137936046487119b7e17635f4e560277
* Improve doc about object to be stdClass in QueryPage::formatResultUmherirrender2020-11-151-1/+1
| | | | Change-Id: Ib1fadd74f2f3223ea8a9343d1524533f00b991df
* Inject LinkBatchFactory into QueryPage and use itUmherirrender2020-11-021-1/+8
| | | | | | | | | The LinkBatchFactory service is only used in one method call in the QueryPage class, so make it optional and provide it when needed with a setter Bug: T259960 Change-Id: Iee446b1defc9a4f116dc264b012ab972f89d95fc
* Inject DBLoadBalancer into abstract QueryPageUmherirrender2020-11-021-1/+4
| | | | | | | | Every QueryPage needs a database to work Inject the new service on special pages with already using services. Bug: T259960 Change-Id: I96d91993b70052484c1a6a918a1e2ccc91e39ae7
* Inject NamespaceInfo service into SpecialShortPages/SpecialLongPagesUmherirrender2020-10-111-4/+10
| | | | | | | | This covers only direct used services by this special page Services used by the base class are not part of this patch set Bug: T259960 Change-Id: I041b1f8ef15d687b9a0553fd0cbe360e774c75cf
* Hooks::run() call site migrationTim Starling2020-05-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix some includes/specials/ Squiz.Scope.MethodScope.MissingReedy2020-05-181-6/+6
| | | | Change-Id: I9c19e5ce8d789847d0f019372738a2eecb4c37a6
* Coding style: Auto-fix MediaWiki.Classes.UnsortedUseStatements.UnsortedUseJames D. Forrester2020-01-101-1/+1
| | | | Change-Id: I94a0ae83c65e8ee419bbd1ae1e86ab21ed4d8210
* Make most special pages class names match filenameReedy2019-09-101-0/+182
Change-Id: I3a9f932acb7d9cf44a984b5d97f9fbc6b8670f7d