X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Flogging%2FLogPage.php;h=daaff07a1e42bf02d69b3fa958a600f679d458b0;hb=0e80bbf07dd6bfc5130561e7dfe5738e85518807;hp=6b70ceca4d801308bd054b15b185630c6f5f0eeb;hpb=1e296da3d7da4bf095ae228d7f5890f7ef520873;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/logging/LogPage.php b/includes/logging/LogPage.php index 6b70ceca4d..daaff07a1e 100644 --- a/includes/logging/LogPage.php +++ b/includes/logging/LogPage.php @@ -97,7 +97,7 @@ class LogPage { // @todo FIXME private/protected/public property? $this->timestamp = $now = wfTimestampNow(); - $data = array( + $data = [ 'log_id' => $log_id, 'log_type' => $this->type, 'log_action' => $this->action, @@ -109,7 +109,7 @@ class LogPage { 'log_page' => $this->target->getArticleID(), 'log_comment' => $this->comment, 'log_params' => $this->params - ); + ]; $dbw->insert( 'logging', $data, __METHOD__ ); $newId = !is_null( $log_id ) ? $log_id : $dbw->insertId(); @@ -225,7 +225,7 @@ class LogPage { * @return string HTML */ public static function actionText( $type, $action, $title = null, $skin = null, - $params = array(), $filterWikilinks = false + $params = [], $filterWikilinks = false ) { global $wgLang, $wgContLang, $wgLogActions; @@ -331,11 +331,11 @@ class LogPage { * * @return int The log_id of the inserted log entry */ - public function addEntry( $action, $target, $comment, $params = array(), $doer = null ) { + public function addEntry( $action, $target, $comment, $params = [], $doer = null ) { global $wgContLang; if ( !is_array( $params ) ) { - $params = array( $params ); + $params = [ $params ]; } if ( $comment === null ) { @@ -394,14 +394,14 @@ class LogPage { return false; // nothing } - $data = array(); + $data = []; foreach ( $values as $value ) { - $data[] = array( + $data[] = [ 'ls_field' => $field, 'ls_value' => $value, 'ls_log_id' => $logid - ); + ]; } $dbw = wfGetDB( DB_MASTER ); @@ -428,7 +428,7 @@ class LogPage { */ public static function extractParams( $blob ) { if ( $blob === '' ) { - return array(); + return []; } else { return explode( "\n", $blob ); }