Commit graph

4720 commits

Author SHA1 Message Date
Daimona Eaytoy 9a315f2a6e Revert "Use string cast for Postgres compatibility"
This reverts commit 4ab12305f1.

Bug: T221357
Change-Id: Id0f26f48ad9904e73a8b65d76586957c2be93e82
2019-04-18 11:51:16 +00:00
Daimona Eaytoy 4ab12305f1 Use string cast for Postgres compatibility
We JOIN integer and text, so Postgres would always fail on these. As
mentioned in the task description, this is only a temporary solution
(although a clean and durable one), while the long-term one is
I7460a2d63f60c2933b36f8383a8abdbba8649e12.

Bug: T42757
Change-Id: Ifddd0bca1e8eaa7c70511fb0d0588457b4fd0669
2019-03-23 12:44:02 +01:00
jenkins-bot 7a6468fa29 Merge "Add a function to the parser to retrieve the next token" 2019-03-23 11:10:44 +00:00
Daimona Eaytoy f375835ff2 Merge "Localisation updates from https://translatewiki.net." 2019-03-23 11:10:19 +00:00
jenkins-bot 24aef03785 Merge "Log throttled actions" 2019-03-23 11:08:06 +00:00
Daimona Eaytoy 27545422b4 Add a function to the parser to retrieve the next token
It provides some sort of look ahead capability, avoiding to move and
then roll back.

Change-Id: I6293cbd355572c9de3a8591dd8286b14a239ffb2
2019-03-23 11:55:08 +01:00
Daimona Eaytoy c095069918 Log throttled actions
So that we have some numbers and debugging info.

Change-Id: I490504bfac09d537be5bca36ef52992b6aa4f0cb
2019-03-23 11:52:48 +01:00
Daimona Eaytoy 01f699ff07 Remove useless SpecialAbuseLog::getNotDeletedCond
The method is used to make afl_deleted = null treated as afl_deleted =
0. Digging into code history, I found that it's in place because:

*In rEABF14b850f891de27ea09a1439e3835f66c49ad773f the afl_deleted field
was introduced as NULL, and wasn't used.
*In rEABFfe39e38282fc4c7903eb3f8080dbf0bab0f697f4 it was ALTERed to be
"NOT NULL DEFAULT 0"
*And in rEABFa2ead8bfb5166e0b354f3bb3e09f39795cb5b1c0 this function was
introduced to "negate the need for a schema change".

However, when ALTERing afl_deleted to be NOT NULL DEFAULT 0, all NULL
values have been automatically converted to 0 thanks to the DEFAULT
clause, and being the column NOT NULL, of course no NULL are still
there... The ALTER was applied to all wikis (in 2010), so afl_deleted is
NOT NULL everywhere and we can safely treat it as such.

Change-Id: Iebd843629d26e392d2e24efc2795c767e854897a
2019-03-23 11:49:30 +01:00
Translation updater bot 13faec61e4 Localisation updates from https://translatewiki.net.
Change-Id: I92928d97a70308a37386bb033b397e7d9f407a1a
2019-03-23 10:21:56 +01:00
jenkins-bot 77a0fd6c0d Merge "Replace double-equals with triple-equals" 2019-03-23 07:56:37 +00:00
jenkins-bot 6a8f45300e Merge "Rely on parent::getTableClass in TablePager" 2019-03-23 07:56:34 +00:00
Holger Knust 324d0e6aa3 AbuseFilter: Swapped getNative for getText
Use getText method in AbuseFilter.php instead of deprecated getNativeData method.

Bug:  T155582
Change-Id: Ia1af3abea8331e2292d608215946834b282ed753
2019-03-22 17:48:19 -04:00
Daimona Eaytoy f2c1beec44 Replace double-equals with triple-equals
Since double-equals are evil. I left some of them in place where I
wasn't sure, but I may be changed some which were intended to be
doubles. It could be a good idea to delay merging this patch until we'll
have more code coverage.

Change-Id: I1721a3ba532d481e3ecf35f51099c1438b6b73b2
2019-03-22 16:12:13 +01:00
Daimona Eaytoy 037b0c375d Rely on parent::getTableClass in TablePager
Or it will fail if the parent class changes (like it did).

Bug: T218996
Change-Id: I601bac181790e6466fe0b9d8c5d8572dab5a3177
2019-03-22 15:52:21 +01:00
jenkins-bot 44d602b9a9 Merge "Use lowercase for built-in variables" 2019-03-22 10:44:24 +00:00
jenkins-bot c8021a520a Merge "Move the throttle help tooltip to a message" 2019-03-22 10:35:02 +00:00
jenkins-bot 85b16f1ecd Merge "Change method used for file_bits_per_channel in /test" 2019-03-22 10:34:11 +00:00
Daimona Eaytoy 45e84bad0e Change method used for file_bits_per_channel in /test
Using MWProps will not raise an 'undefined index' notice and, if the
bitsdepth cannot be established, will return 0. This is way better than
returning the empty string or null, which cannot be treated as integers.

Bug: T218874
Change-Id: I2b585f3a2f257783c15f0fcdd2851f1e1ce4256b
2019-03-21 14:05:54 +01:00
Daimona Eaytoy 4103ff56af Use 'page' prefix for upload vars
Rationale on phabricator.

Bug: T218873
Change-Id: I33128098c186ab716951c72e0d917663721b4740
2019-03-21 13:29:43 +01:00
Translation updater bot edc35ede96 Localisation updates from https://translatewiki.net.
Change-Id: Ife27683216c2675979f5af60005f7866f2e813a6
2019-03-20 22:26:35 +01:00
Translation updater bot 4f2b1b00fc Localisation updates from https://translatewiki.net.
Change-Id: I4fe3d1a41be910bd7be65a58428e17bf8e2c7023
2019-03-19 22:16:45 +01:00
Translation updater bot 48ed625aa3 Localisation updates from https://translatewiki.net.
Change-Id: Ice4ced756ff653f2061a0c88a357dbd390da349c
2019-03-18 23:06:56 +01:00
Daimona Eaytoy 553facee1e Move the throttle help tooltip to a message
Follow-up of I982d67aa62a899916a26452aceb9646df8c31232. The help text
was meant to be localized, and I probably forgot to do so in the
mentioned patch.

Change-Id: If394b02819911f9c97519b5c972977c38e6d83fa
2019-03-18 17:38:45 +01:00
Translation updater bot 0837f8ec28 Localisation updates from https://translatewiki.net.
Change-Id: I22f2865c9f6357d2c4fc30e58385daac5c15f092
2019-03-17 22:13:44 +01:00
Daimona Eaytoy c79ec2f65e Don't fill the "Filter ID" field with 0
Follow-up of If4fd015dff64237375a0c4d3b9fbcefbd54dba3e.

Change-Id: I4a68d413dd4897fb12ab92ed0407773a5df23c7d
2019-03-17 15:49:45 +01:00
Daimona Eaytoy bae9c5bb8f Use lowercase for built-in variables
The uppercase is just a leftover from a long time ago. Currently,
variables are case-insensitive, and we already perform a strtolower when
saving them. Since most parts of the code already use lowercase, the
uppercase leftovers only make it harder to grep the code to find
variables. As a bonus, make Ace recognize variables in a
case-insensitive fashion.

Change-Id: I72933fcc9952fc1aabf6464b2fc0b04ec39c024b
2019-03-17 14:23:11 +01:00
jenkins-bot ef8c8e6006 Merge "Make the filter field on ViewHistory of "int" type" 2019-03-17 12:00:47 +00:00
jenkins-bot dc0c5cc5ac Merge "Make uploads testable" 2019-03-17 11:06:43 +00:00
jenkins-bot 8588c35142 Merge "Simplify AbuseFilterVariableHolder::dumpAllVars" 2019-03-17 11:04:53 +00:00
jenkins-bot f63b7e8039 Merge "Remove the hacky 'context' variable" 2019-03-17 10:35:31 +00:00
Daimona Eaytoy 3211c71739 Make uploads testable
This patch adds missing methods for testing a filter against uploads in
RC. Please note that (as discussed below) using wfFindFile could be
relatively expensive (as it will be executed for 0-100 RC rows).
If this is true, then we should either use another method (but I
couldn't find a suitable one), or simply reduce the amount of testable
uploads to a reasonable limit.

Bug: T170249
Change-Id: Id406d4e1571873f49bb11e69029311b24ececf49
2019-03-17 11:32:56 +01:00
jenkins-bot de4e971c72 Merge "Remove usage of MakeGlobalVariablesScript hook" 2019-03-17 10:32:30 +00:00
jenkins-bot 4c63c9190c Merge "Remove deprecated DB method" 2019-03-17 10:08:50 +00:00
jenkins-bot 3f3e98fbc5 Merge "Fix shortcircuit for consecutive operations" 2019-03-17 10:04:14 +00:00
jenkins-bot 001a83272d Merge "Add help links for throttle groups" 2019-03-17 09:59:25 +00:00
jenkins-bot e2f1880922 Merge "Don't use wgLang and wgContLang" 2019-03-17 09:53:16 +00:00
jenkins-bot b4780723e4 Merge "Fix faulty query in normalizeThrottleParameters" 2019-03-17 09:50:39 +00:00
jenkins-bot d11f30f7ec Merge "Make text fields use readonly instead of disabled" 2019-03-17 09:49:40 +00:00
jenkins-bot 65a4c26804 Merge "Remove exclusions for Generic.Files.LineLength" 2019-03-17 09:49:38 +00:00
jenkins-bot 92fdb2ce90 Merge "Make Special:AbuseFilter sortable by filter name" 2019-03-17 09:48:29 +00:00
Daimona Eaytoy 7449b43c2f Remove deprecated DB method
Database::nextSequenceValue is deprecated and just returns null.

Change-Id: I8109e90ab836b5915873da26da87ea9225e2ff03
2019-03-17 09:38:46 +00:00
Kunal Mehta 577f4dab93 Migrate to new phan
Bug: T216904
Change-Id: I30864bd3d7f9b9ab674bf6589cd9e5e3aed5bb8d
2019-03-16 09:41:23 +00:00
Daimona Eaytoy 53ab2b5067 Fix documentation errors reported by Phan
Change-Id: I5788147ba1998235ded9eedbf64ebad37fce236f
2019-03-16 09:27:05 +00:00
Translation updater bot 768af21c10 Localisation updates from https://translatewiki.net.
Change-Id: Ia2d9b679777db7846e12a13aa0864b8a8290abc8
2019-03-15 22:35:44 +01:00
Translation updater bot 68bf88f062 Localisation updates from https://translatewiki.net.
Change-Id: I4e3f8c8a5d67939032895963e083bba331801d2b
2019-03-14 22:51:39 +01:00
Translation updater bot 217ad90792 Localisation updates from https://translatewiki.net.
Change-Id: I727caf44e961b6d2bcff47e41be5dca40e0603be
2019-03-13 22:16:05 +01:00
Translation updater bot c280cdc8c4 Localisation updates from https://translatewiki.net.
Change-Id: I5488d3cc8de49b03048706177d890ea5722a4d67
2019-03-12 22:29:12 +01:00
jenkins-bot fc00915d7d Merge "Don't escape externalLink text" 2019-03-12 06:00:47 +00:00
Translation updater bot 53920f3b0c Localisation updates from https://translatewiki.net.
Change-Id: I0c49e687e580da20ba47eb55ccdcdf27b78cd066
2019-03-11 22:16:23 +01:00
Daimona Eaytoy 6158d96c41 Don't escape externalLink text
As escaping is handled by makeExternalLink itself. This currently makes
seccheck fail for any patch and is a merge blocker.

Change-Id: I2d21632bbc59abd4ea48aebdb6572d53f8fc89cd
2019-03-11 13:23:49 +01:00