* 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 ) {
'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd',
'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd',
'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd',
- 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd'
+ 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd',
+ // https://phabricator.wikimedia.org/T168856
+ 'http://www.w3.org/TR/2001/PR-SVG-20010719/DTD/svg10.dtd',
];
if ( $type !== 'PUBLIC'
|| !in_array( $systemId, $allowedDTDs )
* @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 );
}
/**
* @return void
*/
public static function setSessionStatus( User $user, $statusKey, $value ) {
- $key = wfMemcKey( 'uploadstatus', $user->getId() ?: md5( $user->getName() ), $statusKey );
-
$cache = MediaWikiServices::getInstance()->getMainObjectStash();
+ $key = $cache->makeKey( 'uploadstatus', $user->getId() ?: md5( $user->getName() ), $statusKey );
+
if ( $value === false ) {
$cache->delete( $key );
} else {