Fix mediawiki.ui.checkbox loading in mobile
[lhc/web/wiklou.git] / includes / logging / LogEntry.php
index c7f9e40..bebe3a9 100644 (file)
@@ -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 ) {
@@ -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,