Those quotes aren't needed since those constants are being used as an array
value and the database methods already quotes them. It caused the field to
be double-quoted and being inserted with quotes on the database.
Bug: T172205
Change-Id: I050f8d477600ee44794b7525a119b3d4451e5a28
ChangesFeed was updated in 3517be1cf0, to use the WAN cache,
so this change updates the purgeFeeds() function to use that cache
too.
Avoid the deprected wfMemcKey() too.
Bug: T166195
Change-Id: I28a8d729737f03ccaf069495a59e80401c59e778
Simplify DB callers by just having one code path.
All but some very old code paths bothered with these.
Change-Id: Iaf7a2f83146a0ed15995f9cfc74edcf16ae5a448
* Always delete entries in the time range
* Batch queries and wait for slaves
* Optimized size-fetching query (pass 2)
* Set with rc_type with the actual constants (pass 2)
* Avoid flagging non-bot accounts as 'bot edits
* Use more modern DB layer coding style
Bug: T133053
Change-Id: I55cc099bf40977fa9e0a365da104c208441eec00
There are a few cases where we generate both a page revision and a log
entry for a single action (upload; in the future, maybe also move,
protect), but only one recent changes entry (matching the log entry).
Bug: T116809
Change-Id: Ib95a6cb57a942a0758091ff2db9d29f3c0048598
Field is unused since many versions, so remove the use in sql
statements, to allow dropping in a later version.
The field must not be reference from INSERT because it has a default
value, which is used, when no value is specified in the statement.
Keeping the field allows easier rollback on version update, when
something gets wrong with the new version.
Existing Comment in tables.sql was added with r101293, was already
disused in r11088
Bug: 40667
Change-Id: I4a9c2fa813d1f25dfb755e564f7677a212934d7b
No feature flag, and also not deployed on WMF wikis. Asking for schema changes by the time we branch tomorrow is just unfair
This reverts commit e478c230f6.
Change-Id: I125c30e76fa04679cc04ae7b8728ae3a61f35194
The existing field to differentiate between kinds of recentchanges rows is
the rc_type field. We want to allow extensions to insert their own custom
data into recentchanges, but we have learned via the NS_* series of constants
that requiring extensions to "register" a specific number is very error prone.
The solution, which this commit implements the first phase of, is to utilize
a new 16 byte string field rc_source. Within that field change types will be
prefixed strings such as 'mw.edit' and 'mw.new'.
This commit adds the new field and begins populating it with data. At some
point in the future the rc_type field will be dropped. While WMF wiki's will
simply wait out the 30 day recentchanges history, other wiki's have the option
of letting update.php populate rc_source, or manually applying the db change and
utilizing the PopulateRecentChangeSource maintenance script.
Change-Id: Iaddd6c446373a68d31586ed54346db7d04e13b2c
Follows-up I1343872de7, Ia533aedf63 and I2df2f80b81.
Also updated usage in text in documentation and the
installer LocalSettingsGenerator.
Most of them were handled by this regex:
- find: (require|include|require_once|include_once)\s*\(\s*(.+?)\s*\)\s*;$
- replace: $1 $2;
Change-Id: I6b38aad9a5149c9c43ce18bd8edbab14b8ce43fa
Squiz.WhiteSpace.LanguageConstructSpacing:
Language constructs must be followed by a single space;
expected "require_once expression" but found
"require_once(expression)"
It is a keyword (e.g. like `new`, `return` and `print`). As
such the parentheses don't make sense.
Per our code conventions, we use a space after keywords like
these. We appeared to have an unwritten exception for `require`
that doesn't make sense. About 60% of require/include usage
was missing the space and/or had superfluous parentheses.
It is as silly as print("foo") or return("foo"), it works
because keywords have no significance for whitespace between
it and the expression that follows, and since experessions can
be wrapped in parentheses for clarity (e.g. when doing string
concatenation or mathematical operations) the parenthesis
before and after basiclaly just ignored.
Change-Id: I2df2f80b8123714bea7e0771bf94b51ad5bb4b87
And added/removed spaces around some other tokens,
like +, -, *, /, <, >, =, !
Fixed windows newline style
Change-Id: I0b9c8c408f3f6bfc0d685a074d7ec468fb848fc8
We can now do this since we finally switched to PHP 5.3 for MW 1.20 and get rid of the silly dirname(__FILE__) stuff :)
Change-Id: Id9b2c9cd2e678197aa81c78adced5d1d31ff57b1
Until now, we relied on setting MW_NO_SETUP which was a) hacky, b) irreversable, and c) likely to be forgotten if you didn't use one of the wrappers like runChild().
Instead, move the freaky magic to doMaintenance and have *it* check if it's in a specific call stack that indicates this is being run from the file scope and should be executed. Rename DO_MAINTENANCE to RUN_MAINTENANCE_IF_MAIN so it's nice and clear what magic happens behind the require_once().
* Docs have been updated to indicate the standard on how to write maintenance scripts (MW.org docs will follow) Have ported vast majority of maintenance scripts to new format. Remaining ones (mostly FiveUpgrade-related) are a bit more tricky. commandLine.inc is untouched for now. Many have gotten code-style updates as well. Deleted .inc files were only used by their .php counterparts, and have been merged into single files.
* (bug 11867) Lock error on redirect table when running orphans.php
* (bug 16322) Allow maintenance scripts to accept DB user/pass over input or params
* (bug 18566) Maintenance script to un/protect pages
* initStats overhaul, now uses class SiteStatsInit. Also fixes bug 18930