From 87e6aaf9bf98c1033ec52d9ce2d2f8302f6e8537 Mon Sep 17 00:00:00 2001 From: Catrope Date: Sun, 13 May 2012 14:40:15 -0700 Subject: [PATCH] Make the private-logs-UDP code path in saveContent() also return $newId This was an oversight in a69fb4827409786203ee6f4befc5aa4009d13ef8 which changed saveContent() (and, by extension, addEntry()) to return a log_id rather than a boolean. Also update the documentation comments to reflect this, and remove a resolved TODO Change-Id: I8fe269f452f8c8d4fa0318c120b676ac10efebae --- includes/logging/LogPage.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/includes/logging/LogPage.php b/includes/logging/LogPage.php index 88f34845c9..3891f3416c 100644 --- a/includes/logging/LogPage.php +++ b/includes/logging/LogPage.php @@ -68,7 +68,7 @@ class LogPage { } /** - * @return bool|int|null + * @return int log_id of the inserted log entry */ protected function saveContent() { global $wgLogRestrictions; @@ -105,7 +105,7 @@ class LogPage { } elseif( $this->sendToUDP ) { # Don't send private logs to UDP if( isset( $wgLogRestrictions[$this->type] ) && $wgLogRestrictions[$this->type] != '*' ) { - return true; + return $newId; } # Notify external application via UDP. @@ -438,8 +438,7 @@ class LogPage { * @param $params Array: parameters passed later to wfMsg.* functions * @param $doer User object: the user doing the action * - * @return bool|int|null - * @TODO: make this use LogEntry::saveContent() + * @return int log_id of the inserted log entry */ public function addEntry( $action, $target, $comment, $params = array(), $doer = null ) { global $wgContLang; -- 2.20.1