dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
UploadBase: Avoid deprecated wfMemcKey()
[lhc/web/wiklou.git]
/
includes
/
upload
/
UploadBase.php
diff --git
a/includes/upload/UploadBase.php
b/includes/upload/UploadBase.php
index
2c0afdf
..
0868ce6
100644
(file)
--- a/
includes/upload/UploadBase.php
+++ b/
includes/upload/UploadBase.php
@@
-798,7
+798,7
@@
abstract class UploadBase {
* Returns the title of the file to be uploaded. Sets mTitleError in case
* the name was illegal.
*
* Returns the title of the file to be uploaded. Sets mTitleError in case
* the name was illegal.
*
- * @return Title The title of the file or null in case the name was illegal
+ * @return Title
|null
The title of the file or null in case the name was illegal
*/
public function getTitle() {
if ( $this->mTitle !== false ) {
*/
public function getTitle() {
if ( $this->mTitle !== false ) {
@@
-2113,9
+2113,10
@@
abstract class UploadBase {
* @return Status[]|bool
*/
public static function getSessionStatus( User $user, $statusKey ) {
* @return Status[]|bool
*/
public static function getSessionStatus( User $user, $statusKey ) {
- $key = wfMemcKey( 'uploadstatus', $user->getId() ?: md5( $user->getName() ), $statusKey );
+ $cache = MediaWikiServices::getInstance()->getMainObjectStash();
+ $key = $cache->makeKey( 'uploadstatus', $user->getId() ?: md5( $user->getName() ), $statusKey );
- return
MediaWikiServices::getInstance()->getMainObjectStash()
->get( $key );
+ return
$cache
->get( $key );
}
/**
}
/**
@@
-2129,9
+2130,9
@@
abstract class UploadBase {
* @return void
*/
public static function setSessionStatus( User $user, $statusKey, $value ) {
* @return void
*/
public static function setSessionStatus( User $user, $statusKey, $value ) {
- $key = wfMemcKey( 'uploadstatus', $user->getId() ?: md5( $user->getName() ), $statusKey );
-
$cache = MediaWikiServices::getInstance()->getMainObjectStash();
$cache = MediaWikiServices::getInstance()->getMainObjectStash();
+ $key = $cache->makeKey( 'uploadstatus', $user->getId() ?: md5( $user->getName() ), $statusKey );
+
if ( $value === false ) {
$cache->delete( $key );
} else {
if ( $value === false ) {
$cache->delete( $key );
} else {