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();
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
*
* 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 );
}
}
*
* @param $name String
* @param $p Array: parameters
- * @deprecated
+ * @deprecated since 1.18
*/
function wfCreateObject( $name, $p ) {
return MWFunction::newObj( $name, $p );