From 4bd19c04869f86831a1b9f828d007c90f1083b08 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Wed, 1 Aug 2018 11:30:49 +1000 Subject: [PATCH] Fix pingback on non-MySQL MySQL has its own implementation of upsert(), but the others rely on $uniqueIndexes being a field list, not a field/value associative array. The previous code generated an SQL error when checking for existing values. Bug: T200864 Change-Id: Ifb56f7f350fbb84144bc6f5a1dd76939816338a6 (cherry picked from commit ba54f7f90dce0e06ff3c4ad1ec141362f10be9a9) --- RELEASE-NOTES-1.31 | 1 + includes/Pingback.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES-1.31 b/RELEASE-NOTES-1.31 index 95ba836f6f..b22f75e962 100644 --- a/RELEASE-NOTES-1.31 +++ b/RELEASE-NOTES-1.31 @@ -17,6 +17,7 @@ This is a security and maintenance release of the MediaWiki 1.31 branch. * (T197030) PHPSessionHandler: Suppress headers warnings in initialize(). * (T182377, T196793) Exif: Guard against uncountable tag values. * (T200861) Fix total breakage of SQLite web upgrade. +* (T200864) Fix pingback over-reporting on non-MySQL databases === Changes since MediaWiki 1.31.0-rc.2 === * (T195783) Initialize PSR-4 namespaces at same stage as normal autoloader. diff --git a/includes/Pingback.php b/includes/Pingback.php index 64b54f1e4b..bf2123fae3 100644 --- a/includes/Pingback.php +++ b/includes/Pingback.php @@ -99,7 +99,7 @@ class Pingback { return $dbw->upsert( 'updatelog', [ 'ul_key' => $this->key, 'ul_value' => $timestamp ], - [ 'ul_key' => $this->key ], + [ 'ul_key' ], [ 'ul_value' => $timestamp ], __METHOD__ ); -- 2.20.1