if ( $this->mTitle !== false ) {
return $this->mTitle;
}
+ if ( !is_string( $this->mDesiredDestName ) ) {
+ $this->mTitleError = self::ILLEGAL_FILENAME;
+ $this->mTitle = null;
+
+ return $this->mTitle;
+ }
/* Assume that if a user specified File:Something.jpg, this is an error
* and that the namespace prefix needs to be stripped of.
*/
public static function getSessionStatus( User $user, $statusKey ) {
$key = wfMemcKey( 'uploadstatus', $user->getId() ?: md5( $user->getName() ), $statusKey );
- return wfGetCache( CACHE_ANYTHING )->get( $key );
+ return ObjectCache::getMainStashInstance()->get( $key );
}
/**
public static function setSessionStatus( User $user, $statusKey, $value ) {
$key = wfMemcKey( 'uploadstatus', $user->getId() ?: md5( $user->getName() ), $statusKey );
- $cache = wfGetCache( CACHE_ANYTHING );
+ $cache = ObjectCache::getMainStashInstance();
if ( $value === false ) {
$cache->delete( $key );
} else {