Jack Phoenix has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/132958

Change subject: If a file named "Avatar.jpg" has been uploaded to the wiki, 
uploading a new avatar is impossible.
......................................................................

If a file named "Avatar.jpg" has been uploaded to the wiki, uploading a
new avatar is impossible.

This patch fixes that issue by changing the file name used internally to
something relatively random.

Patch by MediaWiki.org user Krusher.

Change-Id: Ia46d4668ab573c0d36eefe2bf948fce6d9a09e63
---
M UserProfile/SpecialUploadAvatar.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SocialProfile 
refs/changes/58/132958/1

diff --git a/UserProfile/SpecialUploadAvatar.php 
b/UserProfile/SpecialUploadAvatar.php
index 9329bac..3d3f053 100644
--- a/UserProfile/SpecialUploadAvatar.php
+++ b/UserProfile/SpecialUploadAvatar.php
@@ -453,7 +453,7 @@
         * Only needed for the redirect; needs fixage
         */
        public function getTitle() {
-               return Title::makeTitle( NS_FILE, 'Avatar.jpg' );
+               return Title::makeTitle( NS_FILE, 'Avatar-placeholder' . 
uniqid() . '.jpg' );
        }
 
        /**

-- 
To view, visit https://gerrit.wikimedia.org/r/132958
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia46d4668ab573c0d36eefe2bf948fce6d9a09e63
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SocialProfile
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix <j...@countervandalism.net>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to