Merge "Add logic for "tags" in ApiBase"
[lhc/web/wiklou.git] / includes / logging / PatrolLogFormatter.php
index 2abaf17..7fe0143 100644 (file)
@@ -62,4 +62,26 @@ class PatrolLogFormatter extends LogFormatter {
 
                return $params;
        }
+
+       protected function getParametersForApi() {
+               $entry = $this->entry;
+               $params = $entry->getParameters();
+
+               static $map = array(
+                       '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 ) {
+                       if ( isset( $params[$index] ) ) {
+                               $params[$key] = $params[$index];
+                               unset( $params[$index] );
+                       }
+               }
+
+               return $params;
+       }
 }