X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Flogging%2FLogEntry.php;h=bebe3a9fee24ab2e843099202a1db518b67be144;hb=4169b4f42502ca1956f7a7253b5f54e1901e7821;hp=71b4fc24d7c2c882c58b9d16afacd6883fb27f92;hpb=f73c54a0a47585f4baf1aee38a4a1a059bfb259c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/logging/LogEntry.php b/includes/logging/LogEntry.php index 71b4fc24d7..bebe3a9fee 100644 --- a/includes/logging/LogEntry.php +++ b/includes/logging/LogEntry.php @@ -88,8 +88,8 @@ interface LogEntry { public function getDeleted(); /** - * @param $field Integer: one of LogPage::DELETED_* bitfield constants - * @return Boolean + * @param int $field One of LogPage::DELETED_* bitfield constants + * @return bool */ public function isDeleted( $field ); } @@ -407,7 +407,7 @@ class ManualLogEntry extends LogEntryBase { * Declare arbitrary tag/value relations to this log entry. * These can be used to filter log entries later on. * - * @param array $relations Map of (tag => (list of values)) + * @param array $relations Map of (tag => (list of values|value)) * @since 1.22 */ public function setRelations( array $relations ) { @@ -463,7 +463,7 @@ class ManualLogEntry extends LogEntryBase { * * @since 1.19 * - * @param integer $deleted + * @param int $deleted */ public function setDeleted( $deleted ) { $this->deleted = $deleted; @@ -504,6 +504,10 @@ class ManualLogEntry extends LogEntryBase { 'log_comment' => $comment, 'log_params' => serialize( (array)$this->getParameters() ), ); + if ( isset( $this->deleted ) ) { + $data['log_deleted'] = $this->deleted; + } + $dbw->insert( 'logging', $data, __METHOD__ ); $this->id = !is_null( $id ) ? $id : $dbw->insertId(); @@ -512,6 +516,11 @@ class ManualLogEntry extends LogEntryBase { if ( !strlen( $tag ) ) { throw new MWException( "Got empty log search tag." ); } + + if ( !is_array( $values ) ) { + $values = array( $values ); + } + foreach ( $values as $value ) { $rows[] = array( 'ls_field' => $tag, @@ -569,8 +578,8 @@ class ManualLogEntry extends LogEntryBase { /** * Publishes the log entry. - * @param int $newId id of the log entry. - * @param string $to rcandudp (default), rc, udp + * @param int $newId Id of the log entry. + * @param string $to One of: rcandudp (default), rc, udp */ public function publish( $newId, $to = 'rcandudp' ) { $log = new LogPage( $this->getType() );