Go to file
Jeff Janes 942a95e80e PostgreSQL: Fix magic-value code for AbuseFilter
When importing filters, the code is using the magic value
of 'new' for the af_id field, which is of type bigint, to
indicate a not-yet-inserted record.

In MySQL, comparing a bigint to 'new' is legal but always false,
while in PostgreSQL it is illegal, and led to errors when checking
if the filter is hidden.

Fix this by adding special-case code to filterHidden so that it
always returns false for 'new' records. In PostgreSQL this fixes
the error, and in MySQL it avoids a pointless trip to the database.

Should be back patched to 1.23 and 1.24

Bug: T89514
Change-Id: Ib4b5585ac9889a1760ec930c555e7809a424538e
2015-03-25 22:07:55 +00:00
api Add i18n for API module help 2014-10-29 16:37:37 -04:00
db_patches abuse_filter_log table only uses tinyint not int for namespace ID 2014-03-04 02:24:27 +00:00
i18n Localisation updates from https://translatewiki.net. 2015-02-19 22:03:03 +01:00
maintenance $res is a bool, not a resultwrapper.. 2014-01-03 18:06:49 +00:00
modules Improve error handling for HTTP requests 2014-08-02 11:56:32 +00:00
special Allow searching for local hits on central wiki 2015-01-04 07:59:07 +00:00
tests Fix double escaping in AFPData::keywordLike() 2014-07-11 14:56:42 -07:00
Views add filter option for local rules only on central wiki 2015-02-17 09:00:44 +01:00
.gitignore Add .gitignore 2012-05-21 01:27:29 +01:00
.gitreview Add .gitreview file 2012-03-22 13:55:41 -07:00
.jshintrc Add .jshintrc for AbuseFilter and make it pass 2013-04-17 15:03:36 +02:00
AbuseFilter.alias.php Localisation updates from https://translatewiki.net. 2015-01-23 22:22:27 +01:00
AbuseFilter.class.php PostgreSQL: Fix magic-value code for AbuseFilter 2015-03-25 22:07:55 +00:00
AbuseFilter.hooks.php Implement ChangeTagsListActive hook 2015-02-04 19:22:00 +00:00
AbuseFilter.i18n.php Update i18n shim 2014-04-22 13:08:17 +00:00
AbuseFilter.parser.php Remove obvious function-level profiling 2015-02-04 10:26:04 -08:00
AbuseFilter.php Add license name to credits and add minor config code comment 2015-02-17 01:26:10 +01:00
abusefilter.tables.pg.sql abuse_filter_log table only uses tinyint not int for namespace ID 2014-03-04 02:24:27 +00:00
abusefilter.tables.sql abuse_filter_log table only uses tinyint not int for namespace ID 2014-03-04 02:24:27 +00:00
abusefilter.tables.sqlite.sql abuse_filter_log table only uses tinyint not int for namespace ID 2014-03-04 02:24:27 +00:00
AbuseFilterVariableHolder.php Add new variable article_first_contributor 2014-08-11 11:51:44 +00:00
AbuseLogHitFormatter.php Add a few bits of method documentation 2012-06-21 14:32:05 +01:00
composer.json Specify an actual version constraint for composer/installers 2014-12-29 11:36:03 -08:00
COPYING Add COPYING 2014-01-22 21:21:10 +00:00
hooks.txt (bug 42064) AbuseFilter + EditFilterMergedContent 2013-01-17 11:18:28 +01:00