}
/**
- * 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') {
if( $contents == '' ) {
$out .= ' />';
} else {
- $out .= '>';
- $out .= htmlspecialchars( $contents );
- $out .= "</$element>";
+ $out .= '>' . htmlspecialchars( $contents ) . "</$element>";
}
}
return $out;
}
// Shortcuts
-function wfOpenElement( $element ) { return "<$element>"; }
+function wfOpenElement( $element, $attribs = null ) { return wfElement( $element, $attribs, null ); }
function wfCloseElement( $element ) { return "</$element>"; }
/**
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 );
}
/**