From: Catrope Date: Sun, 13 May 2012 21:40:15 +0000 (-0700) Subject: Make the private-logs-UDP code path in saveContent() also return $newId X-Git-Tag: 1.31.0-rc.0~23622 X-Git-Url: http://git.cyclocoop.org/data/Fool?a=commitdiff_plain;h=87e6aaf9bf98c1033ec52d9ce2d2f8302f6e8537;p=lhc%2Fweb%2Fwiklou.git 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 --- 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;