aboutsummaryrefslogtreecommitdiffstats
path: root/maintenance
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | Consistent spelling of "subpage"Amir E. Aharoni2024-08-061-1/+1
| |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also: 1. Other minor fixes in comments touched by this patch. 2. Add a separate test for subpage with spaces. Change-Id: I267f19027098e5778b1cd491826e1741fc7ee794
* | | | | Merge "schema: Remove allowInfinite from page_links_updated"jenkins-bot2024-08-014-5/+242
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | schema: Remove allowInfinite from page_links_updatedUmherirrender2024-07-294-5/+242
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This timestamp is to track the last refreshlinks run and is always now or in the past, there is no need to hold the infinite value. This only affects mysql Bug: T298317 Change-Id: I16978e076a795258639591a2fbfe353f67d0ec64
* | | | Merge "CleanupTitles: Turn "Talk:Project:Foo" into "Project talk:Foo""jenkins-bot2024-07-301-15/+32
|\ \ \ \
| * | | | CleanupTitles: Turn "Talk:Project:Foo" into "Project talk:Foo"Pppery2024-07-301-15/+32
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than a broken title. This is a common kind of invalid title as it happens if a new namespace or namespace alias is added. Bug: T196088 Change-Id: Ie7d32858a5267615995ff0eb8074edf4248c03d8
* | | | Merge "[ParsoidParser] Remove unneeded code to set render ID"jenkins-bot2024-07-301-1/+1
|\ \ \ \ | |/ / / |/| | |
| * | | [ParsoidParser] Remove unneeded code to set render IDC. Scott Ananian2024-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since I72c5e6f86b7f081ab5ce7a56f5365d2f75067a78 it is part of the contract of ContentRenderer::getParserOutput() that the render ID (and other cache parameters) will be set when it returns. (ContentHandler::getParserOutput() can set them even earlier if it has custom content-based overrides.) We had a lot of temporary backward-compatibility code "later" in the parse process to try to close the barn door if some code path "forgot" to set them, but these are unnecessary now. This patch removes that backward-compatibility code in ParsoidParser; there is similar remaining code in ParserCache etc. which can be addressed in follow ups. (For compatibility we do have to temporarily copy the render ID code inside ParsoidOutputAccess::parseUncachable, but that class is deprecated and will be removed.) The HtmlOutputRendererHelper path which used to call ParsoidParser::parseFakeRevision() is now replaced with a codepath that goes through RevisionRenderer. In order to maintain the same behavior of the ParsoidHandler, we have also added 'useParsoid' handling to the JsonContentHandler. This support can perhaps be deprecated eventually. Bug: T350538 Change-Id: I0853624cf785f72fd956c6c2336f979f4402a68f
* | | | Merge "maintenance: Replace deprecated PageArchive::undeleteAsUser"jenkins-bot2024-07-261-5/+9
|\ \ \ \
| * | | | maintenance: Replace deprecated PageArchive::undeleteAsUserUmherirrender2024-07-211-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Bug: T339394 Change-Id: I49795be36c8b75ad2e6dc8caa2eb97e134530dfa
* | | | | Merge "Add a basic interactive install.php"jenkins-bot2024-07-243-5/+108
|\ \ \ \ \
| * | | | | Add a basic interactive install.phpaddshore2024-07-243-5/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Start with the basic required arguments. Leaves room for expansion. Decided to have: - 0 arguments = interactive - 1+ argument results in regular validation messages - --help outputs help as normal - interactive mode mentions you might want --help Bug: T48076 Change-Id: I972bf55f96c9cdf1a5eaf55c0e0117b190420d30
* | | | | | maintenance: Use expression builder instead of raw sqlUmherirrender2024-07-2215-19/+20
| |/ / / / |/| | | | | | | | | | | | | | | | | | | Bug: T361023 Change-Id: Ieb229d8088cb1ff3f03e44f7ac99eb612f48bc7b
* | | | | Merge "Use expression builder to avoid IDatabase::addQuotes"jenkins-bot2024-07-202-6/+5
|\ \ \ \ \ | |_|/ / / |/| | | |
| * | | | Use expression builder to avoid IDatabase::addQuotesUmherirrender2024-07-182-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Bug: T361023 Change-Id: Ic28b548947894921134cbec0a7347e7e27e2aaf2
* | | | | Deprecate Html*Helper::init()C. Scott Ananian2024-07-191-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of creating a half-initialized helper and later calling ::init, provide all the information necessary for the helper in the constructor. This is facilitated by the fact that there already exists a factory class, PageRestHelperFactory, which holds all the services required. This affects: * HtmlOutputRendererHelper::init() * HtmlMessageOutputHelper::init() * HtmlInputTransformHelper::init() Change-Id: I1e1213597c6be012f2bc024c2b370c968ff3b472
* | | | | [HtmlOutputRendererHelper] Remove use of ParsoidOutputAccess::parseUncacheableC. Scott Ananian2024-07-191-1/+1
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the last use of ParsoidOutputAccess in core, allowing it to be deprecated and eventually removed. Bug: T367074 Bug: T317018 Change-Id: Ica2c880e2e7c2b126aaea66a3e4be460b3f2234f
* | | | Merge "NamespaceDupes: treat Special and Media namespaces like interwikis"jenkins-bot2024-07-151-2/+4
|\ \ \ \
| * | | | NamespaceDupes: treat Special and Media namespaces like interwikisPppery2024-07-111-2/+4
| |/ / / | | | | | | | | | | | | | | | | Bug: T18839 Change-Id: I4d87c77fbadd23f6bd73468dd43319ff05d1bd0b
* | | | Merge "Rewrite and add tests for cleanupTitles"jenkins-bot2024-07-131-28/+103
|\ \ \ \ | |/ / / |/| | |
| * | | Rewrite and add tests for cleanupTitlesPppery2024-07-121-28/+103
| | | | | | | | | | | | | | | | | | | | Bug: T196088 Change-Id: I8f84be9e5adb6d375858c5093d90be14d9f7ffe8
* | | | rdbms: Create IReadableDatabase::andExpr() / ::orExpr()Umherirrender2024-07-114-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid the call to internal constructor of AndExpressionGroup and OrExpressionGroup by creating a factory function similiar as the IReadableDatabase::expr function for Expression objects. This is also a replacement for calls to ISQLPlatform::makeList with LIST_AND or LIST_OR argument to reduce passing sql as string to the query builders. Created two functions to allow the return type to be set for both expression group to allow further calls of ->and() or ->or() on the returned object. Depending on the length of the array argument to makeList() it is sometimes hard to see if the list gets converted to AND or OR, having the operator in the function name makes it easier to read, so two functions are helpful in this case as well. Bug: T358961 Change-Id: Ica29689cbd0b111b099bb09b20845f85ae4c3376
* | | | Add namespace to the root classes of ObjectCacheEbrahim Byagowi2024-07-102-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And deprecated aliases for the the no namespaced classes. ReplicatedBagOStuff that already is deprecated isn't moved. Bug: T353458 Change-Id: Ie01962517e5b53e59b9721e9996d4f1ea95abb51
* | | | Merge "Replace some uses of raw SQL with expression builder"jenkins-bot2024-07-081-1/+1
|\ \ \ \
| * | | | Replace some uses of raw SQL with expression builderBartosz Dziewoński2024-07-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I noticed these while reviewing other changes to the code. Change-Id: If548eb937ba36c94d652ec2f881ce668ea1df21d
* | | | | maintenance: Hint at better replacements for deprecated fieldsthiemowmde2024-07-071-4/+4
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | I believe these methods are what should be used in maintenance scripts, not anything that literally starts with $this->parameters->… Change-Id: I5a2d19475834386e03146985ed9e5a5cd4ae1c52
* | | | Merge "cleanupSpam: Add import for Database"jenkins-bot2024-07-061-0/+1
|\ \ \ \ | |/ / / |/| | |
| * | | cleanupSpam: Add import for DatabaseReedy2024-05-171-0/+1
| | | | | | | | | | | | | | | | Change-Id: Ia13c319cef766dd345b828c5f0bc8e40ede06863
* | | | Merge "[ParsoidCachePrewarmJob] Use ParserOutputAccess"jenkins-bot2024-06-281-14/+24
|\ \ \ \
| * | | | [ParsoidCachePrewarmJob] Use ParserOutputAccessC. Scott Ananian2024-06-171-14/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One more step in gradually replacing uses of ParsoidOutputAccess. This one was pretty easy, as ParsoidOutputAccess was pretty much directly calling ParserOutputAccess when provided with a ExistingPageRecord and RevisionRecord. Bug: T367074 Change-Id: I96161a64952e1809c0aec773d5a3dd4c71105657
* | | | | Merge "schema: Drop old pagelinks columns"jenkins-bot2024-06-188-54/+177
|\ \ \ \ \
| * | | | | schema: Drop old pagelinks columnsAmir Sarabadani2024-06-188-54/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It has been dropped in production already. Bug: T299947 Change-Id: I8ec1e7d9224c81d6494c39c78df9e4bdac38d377
* | | | | | Merge "Use namespaced classes (1)"jenkins-bot2024-06-186-1/+7
|\ \ \ \ \ \ | |_|/ / / / |/| | | | |
| * | | | | Use namespaced classes (1)Umherirrender2024-06-166-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes to the use statements done automatically via script Addition of missing use statement done manually Change-Id: Ic4d4dd61de5ab896fb6173eb579c81f164a1e4a3
* | | | | | maintenance: Fix missing where in initEditCount.phpUmherirrender2024-06-161-0/+2
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The raw query does not include a where and it was missing when converted to the QueryBuilder. For this case the IDatabase::ALL_ROWS constant exists. Bug: T367659 Follow-Up: Ie7dbd639c51abe21851ed3edfcd74fa3dfc192c2 Change-Id: I02b4b6d0f00020421b45f76ca7e7dbd7375716eb
* | | | | expireTemporaryAccounts: Provide support for overriding the expiry periodKosta Harlan2024-06-141-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: - When disabling temporary accounts, the wiki operator may wish to also expire active temporary accounts. What: - Provide an override of the config setting for 'expireAfterDays' in the maintenance script. Setting a value of "--expiry=0" will expire all temporary accounts Bug: T356524 Change-Id: I7313ce947d7d4de340418d145a9bdd15910403e8
* | | | | [temp accounts] Make use of isKnown config flagKosta Harlan2024-06-143-4/+4
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: - A few places in core should check the isKnown flag (I4ce534a847461230f7fa276a565bdc1d6c9857e1) rather than isEnabled What: - Update ChangesListSpecialPage, UserGroupManager, UserSelectQueryBuilder, WatchedItemQueryService, ApiQuerySiteInfo, maintenance/expireTemporaryAccounts and maintenance/userOptions to used the isKnown() config check Bug: T356524 Change-Id: I5a88808c7297752c60f6e7ffe16cf6543d783269
* | | | Merge "user: Introduce UserOptionsStore"jenkins-bot2024-06-131-1/+5
|\ \ \ \
| * | | | user: Introduce UserOptionsStoreTim Starling2024-06-121-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactoring: * Break out the database access part of UserOptionsManager to a separate class hierarchy implementing interface UserOptionsStore. It's basically a key/key/string-value store, very simple. The complex parts of user options storage remain in UserOptionsManager. * Bundle the UserOptionsManager caches into a per-user cache object. I was adding a couple more and it was getting tedious. Start integrating GlobalPreferences with UserOptionsManager: * Have an array of stores. There's always a local store, and extensions can add stores via an attribute. * Add $global parameter to UserOptionsManager::setOption(), allowing this method to update or override global options. * Rename loadOptionsFromDb to loadOptionsFromStore. * Move the local override feature from GlobalPreferences to core. Bug: T323076 Change-Id: Ib3623b723557c819bc0ffdf21a4ffcb070eb298b
* | | | | Merge "Maintenance: Print errors from StatusValue objects in a consistent way"jenkins-bot2024-06-1223-76/+71
|\ \ \ \ \
| * | | | | Maintenance: Print errors from StatusValue objects in a consistent wayBartosz Dziewoński2024-06-1223-76/+71
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow Maintenance::error() and Maintenance::fatalError() to take StatusValue objects. They now print each error message from the status on a separate line, in English, ignoring on-wiki message overrides, as wikitext but after parser function expansion. Thoughts on the previously commonly used methods: - $status->getMessage( false, false, 'en' )->text() Almost the same as the new output, but it allows on-wiki message overrides, and if there is more than one error, it prefixes each line with a '*' (like a wikitext list). - $status->getMessage( false, false, 'en' )->plain() - $status->getWikiText( false, false, 'en' ) As above, but these forms do not expand parser functions such as {{GENDER:}}. - print_r( $status->getErrorsArray(), true ) - print_r( $status->getErrors(), true ) These forms output the message keys instead of the message text, which is not very human-readable. The error messages are now always printed using error() rather than output(), which means they go to STDERR rather than STDOUT and they're printed even with the --quiet flag. Change-Id: I5b8e7c7ed2a896a1029f58857a478d3f1b4b0589
* | | | | Rename JsonUnserial… to JsonDeserial…James D. Forrester2024-06-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is to make it clearer that they're related to converting serialized content back into JSON, rather than stating that things are not representable in JSON. Change-Id: Ic440ac2d05b5ac238a1c0e4821d3f2d858bc3d76
* | | | | Merge "User objectCacheFactory methods not deprecated ObjectCache methods"jenkins-bot2024-06-121-5/+11
|\ \ \ \ \ | |_|/ / / |/| | | |
| * | | | User objectCacheFactory methods not deprecated ObjectCache methodsWandji692024-06-061-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | Bug: T363770 Change-Id: I2335b315bec6a540409492df4891c518640966d5
* | | | | Merge "Add dark mode support to plain html outputs"jenkins-bot2024-06-111-0/+1
|\ \ \ \ \ | |_|/ / / |/| | | |
| * | | | Add dark mode support to plain html outputsEbrahim Byagowi2024-06-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nowadays files transferred to browser via text/* MIME are also getting automatic dark mode by the browsers so this makes these simple pages compatible with those features of the browsers. Change-Id: Id8360ff3ca6dbe7b78e30194fde292763479cb21
* | | | | Maintenance: Consistently print a newline after errorsBartosz Dziewoński2024-06-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This code path used to add a newline too until it was removed in bb45c5e8a3034a24fa7c85f27c4ce035de56ccb0 (2011). It seems to be an accidental change, since other changes in that commit carefully kept the newlines. I guess it's not reached often in practice… Change-Id: I1f0e9735efed70fc50e6b4592a7b643f6f51ddc6
* | | | | fileOpPerfTest: Fix printing statusBartosz Dziewoński2024-06-071-4/+4
| |/ / / |/| | | | | | | | | | | | | | | | | | | Surely it's not supposed to print the same status 5 times. Change-Id: I7745168aeada8ef6d85f05d09648a95fe276dfa8
* | | | [HtmlOutputRendererHelper] Use ParserOutputAccessC. Scott Ananian2024-06-051-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One more step in gradually replacing uses of ParsoidOutputAccess with ParserOutputAccess. This is mostly just inlining the code from ParsoidOutputAccess (which already uses ParserOutputAccess internally) and then removing dead code. Change-Id: I87d6568d9dc71bc11f406ea3c31ce86e01667e05
* | | | rdbms: Remove ILoadBalancer::getWriterIndex()Amir Sarabadani2024-06-032-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It doesn't need to have its own method, We can just use the constant instead. Bug: T363839 Change-Id: Iaec5a8e88dc3e5ae4eaf1f24aebf4c5d73f4b350
* | | | Merge "rdbms: Warn about queries that don't provide the caller"jenkins-bot2024-06-031-2/+5
|\ \ \ \