From 711a54fa05448dcc953958353880d6822bcc4391 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Mon, 16 Jan 2006 22:38:30 +0000 Subject: [PATCH] * use braces in if else if if if stuff (safer read). * removing useless call ($sk never used in function) --- includes/GlobalFunctions.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 85b3b916a3..8a74427ea4 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -494,14 +494,17 @@ function wfMsgReplaceArgs( $message, $args ) { $message = str_replace( "\r", '', $message ); // Replace arguments - if ( count( $args ) ) - if ( is_array( $args[0] ) ) - foreach ( $args[0] as $key => $val ) + if ( count( $args ) ) { + if ( is_array( $args[0] ) ) { + foreach ( $args[0] as $key => $val ) { $message = str_replace( '$' . $key, $val, $message ); - else { - foreach( $args as $n => $param ) - $replacementKeys['$' . ($n + 1)] = $param; - $message = strtr( $message, $replacementKeys ); + } + } else { + foreach( $args as $n => $param ) { + $replacementKeys['$' . ($n + 1)] = $param; + } + $message = strtr( $message, $replacementKeys ); + } } return $message; @@ -730,7 +733,6 @@ function wfViewPrevNext( $offset, $limit, $link, $query = '', $atend = false ) { } } - $sk = $wgUser->getSkin(); if ( 0 != $offset ) { $po = $offset - $limit; if ( $po < 0 ) { $po = 0; } -- 2.20.1