jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/405873 )
Change subject: BSAvatars: Fixed user option handling and readfile path ...................................................................... BSAvatars: Fixed user option handling and readfile path Change-Id: Ifc5cb62a6943e498e7d71fb7cbea363d1b49b9cb --- M Avatars.php M includes/api/BSApiAvatarsTasks.php M resources/BS.Avatars/SettingsWindow.js M src/DynamicFileDispatcher/Image.php M src/DynamicFileDispatcher/UserProfileImage.php 5 files changed, 6 insertions(+), 8 deletions(-) Approvals: Robert Vogel: Looks good to me, approved jenkins-bot: Verified diff --git a/Avatars.php b/Avatars.php index e89c609..7db8959 100644 --- a/Avatars.php +++ b/Avatars.php @@ -82,8 +82,8 @@ * @param User $oUser */ public static function unsetUserImage($oUser) { - if( $oUser->getOption( 'MW::UserImage' ) ) { - $oUser->setOption( 'MW::UserImage', false ); + if( $oUser->getOption( 'bs-avatars-profileimage' ) ) { + $oUser->setOption( 'bs-avatars-profileimage', false ); $oUser->saveSettings(); $oUser->invalidateCache(); } diff --git a/includes/api/BSApiAvatarsTasks.php b/includes/api/BSApiAvatarsTasks.php index afa244e..c382007 100644 --- a/includes/api/BSApiAvatarsTasks.php +++ b/includes/api/BSApiAvatarsTasks.php @@ -38,7 +38,6 @@ } public function task_uploadFile( $oTaskData, $aParams ) { - global $wgRequest; $oResponse = $this->makeStandardReturn(); $oUser = $this->getUser(); Avatars::unsetUserImage( $oUser ); @@ -77,7 +76,7 @@ } $oUser = $this->getUser(); - $oUser->setOption( 'MW::UserImage', $sUserImage ); + $oUser->setOption( 'bs-avatars-profileimage', $sUserImage ); $oUser->saveSettings(); $oResponse->success = true; diff --git a/resources/BS.Avatars/SettingsWindow.js b/resources/BS.Avatars/SettingsWindow.js index f0a0bfa..d1bad78 100644 --- a/resources/BS.Avatars/SettingsWindow.js +++ b/resources/BS.Avatars/SettingsWindow.js @@ -29,7 +29,7 @@ this.tfUserImage = Ext.create('Ext.form.field.Text', { name: 'uimg', blankText: mw.message('bs-avatars-userimage-help').plain(), - emptyText: mw.user.options.get('MW::UserImage'), + emptyText: mw.user.options.get( 'bs-avatars-profileimage' ), allowBlank: false, labelWidth: 150, padding: "0 5 0 0" @@ -101,7 +101,7 @@ }); }, confirmOverwrite: function(callback) { - if (mw.user.options.get('MW::UserImage')) { + if( mw.user.options.get( 'bs-avatars-profileimage' ) ) { bs.util.confirm('AMwarn2', { text: mw.message('bs-avatars-warning-text').plain(), title: mw.message('bs-avatars-warning-title').plain()}, diff --git a/src/DynamicFileDispatcher/Image.php b/src/DynamicFileDispatcher/Image.php index 25e3e41..ee02ce7 100644 --- a/src/DynamicFileDispatcher/Image.php +++ b/src/DynamicFileDispatcher/Image.php @@ -56,7 +56,7 @@ \BsFileSystemHelper::normalizePath( $path . $this->src ) ); - readfile( "/$path" ); + readfile( $path ); } public function getMimeType() { diff --git a/src/DynamicFileDispatcher/UserProfileImage.php b/src/DynamicFileDispatcher/UserProfileImage.php index 24ab5f3..c46b19e 100644 --- a/src/DynamicFileDispatcher/UserProfileImage.php +++ b/src/DynamicFileDispatcher/UserProfileImage.php @@ -4,7 +4,6 @@ use BlueSpice\Avatars\Generator; use BlueSpice\DynamicFileDispatcher\UserProfileImage as UPI; -use BlueSpice\Avatars\Config; use BlueSpice\DynamicFileDispatcher\UserProfileImage\AnonImage; class UserProfileImage extends UPI { -- To view, visit https://gerrit.wikimedia.org/r/405873 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifc5cb62a6943e498e7d71fb7cbea363d1b49b9cb Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/BlueSpiceAvatars Gerrit-Branch: master Gerrit-Owner: Pwirth <wi...@hallowelt.biz> Gerrit-Reviewer: Robert Vogel <vo...@hallowelt.biz> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits