From: Ævar Arnfjörð Bjarmason Date: Thu, 8 Dec 2005 08:01:39 +0000 (+0000) Subject: * Documentation: "Check where as the operating" => "Check if the operating system" X-Git-Tag: 1.6.0~987 X-Git-Url: http://git.cyclocoop.org/wiki/Target_page?a=commitdiff_plain;h=241b1b9b00f7e6c1734b1beda7366c36bcfc85f2;p=lhc%2Fweb%2Fwiklou.git * Documentation: "Check where as the operating" => "Check if the operating system" * Code formatting * Make wfOpenElement() support attributes * Changed variable name: $x => $protocols --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 2515f395fa..45e1e0c8a4 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -1262,9 +1262,9 @@ function wfTimestampOrNull( $outputtype = TS_UNIX, $ts = null ) { } /** - * Check where as the operating system is Windows + * Check if the operating system is Windows * - * @return bool True if it's windows, False otherwise. + * @return bool True if it's Windows, False otherwise. */ function wfIsWindows() { if (substr(php_uname(), 0, 7) == 'Windows') { @@ -1330,9 +1330,7 @@ function wfElement( $element, $attribs = null, $contents = '') { if( $contents == '' ) { $out .= ' />'; } else { - $out .= '>'; - $out .= htmlspecialchars( $contents ); - $out .= ""; + $out .= '>' . htmlspecialchars( $contents ) . ""; } } return $out; @@ -1359,7 +1357,7 @@ function wfElementClean( $element, $attribs = array(), $contents = '') { } // Shortcuts -function wfOpenElement( $element ) { return "<$element>"; } +function wfOpenElement( $element, $attribs = null ) { return wfElement( $element, $attribs, null ); } function wfCloseElement( $element ) { return ""; } /** @@ -1555,11 +1553,11 @@ function in_string( $needle, $str ) { function wfUrlProtocols() { global $wgUrlProtocols; - $x = array(); + $protocols = array(); foreach ($wgUrlProtocols as $protocol) - $x[] = preg_quote( $protocol, '/' ); + $protocols[] = preg_quote( $protocol, '/' ); - return implode( '|', $x ); + return implode( '|', $protocols ); } /**