From: Brad Jorsch Date: Sat, 6 Jun 2015 12:16:28 +0000 (-0400) Subject: PatrolLogFormatter: Tag curid and previd as numbers for API X-Git-Tag: 1.31.0-rc.0~11157 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=1dc97335ae258ab7a7b29e9181d652f17c13e250;p=lhc%2Fweb%2Fwiklou.git PatrolLogFormatter: Tag curid and previd as numbers for API In the database the values might be strings, depending on the source of the RecentChanges object when the log entry was created. In getParametersForApi(), tag the vars as 'number' so they'll always be output as actual integers. Bug: T101603 Change-Id: I6d3e8fd2653ce810eec59b94bf75063e5fb6bcab --- diff --git a/includes/logging/PatrolLogFormatter.php b/includes/logging/PatrolLogFormatter.php index 00337432cc..7fe0143ffb 100644 --- a/includes/logging/PatrolLogFormatter.php +++ b/includes/logging/PatrolLogFormatter.php @@ -68,9 +68,11 @@ class PatrolLogFormatter extends LogFormatter { $params = $entry->getParameters(); static $map = array( - '4::curid', - '5::previd', + '4:number:curid', + '5:number:previd', '6:bool:auto', + '4::curid' => '4:number:curid', + '5::previd' => '5:number:previd', '6::auto' => '6:bool:auto', ); foreach ( $map as $index => $key ) {