Whitespace fixes
[lhc/web/wiklou.git] / includes / GlobalFunctions.php
index caa42f9..a38d5a7 100644 (file)
@@ -192,7 +192,7 @@ function wfDebug( $text, $logonly = false ) {
        if ( ( $wgDebugComments || $wgShowDebug ) && !$logonly ) {
                $cache[] = $text;
 
-               if ( isset( $wgOut ) && StubObject::isRealObject( $wgOut ) ) {
+               if ( isset( $wgOut ) && is_object( $wgOut ) ) {
                        // add the message and any cached messages to the output
                        array_map( array( $wgOut, 'debug' ), $cache );
                        $cache = array();
@@ -2209,20 +2209,6 @@ function wfPercent( $nr, $acc = 2, $round = true ) {
        return $round ? round( $ret, $acc ) . '%' : "$ret%";
 }
 
-/**
- * Encrypt a username/password.
- *
- * @param $userid Integer: ID of the user
- * @param $password String: password of the user
- * @return String: hashed password
- * @deprecated since 1.13 Use User::crypt() or User::oldCrypt() instead
- */
-function wfEncryptPassword( $userid, $password ) {
-       wfDeprecated(__FUNCTION__);
-       # Just wrap around User::oldCrypt()
-       return User::oldCrypt( $password, $userid );
-}
-
 /**
  * Appends to second array if $value differs from that in $default
  *
@@ -2514,10 +2500,8 @@ function wfUsePHP( $req_ver ) {
  *                 a float
  */
 function wfUseMW( $req_ver ) {
-       global $wgVersion;
-
-       if ( version_compare( $wgVersion, (string)$req_ver, '<' ) ) {
-               throw new MWException( "MediaWiki $req_ver required--this is only $wgVersion" );
+       if ( version_compare( MW_VERSION, (string)$req_ver, '<' ) ) {
+               throw new MWException( "MediaWiki $req_ver required--this is only " . MW_VERSION );
        }
 }
 
@@ -2863,7 +2847,7 @@ function wfBaseConvert( $input, $sourceBase, $destBase, $pad = 1, $lowercase = t
  *
  * @param $name String
  * @param $p Array: parameters
- * @deprecated
+ * @deprecated since 1.18
  */
 function wfCreateObject( $name, $p ) {
        return MWFunction::newObj( $name, $p );