r93195 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93194‎ | r93195 | r93196 >
Date:15:38, 26 July 2011
Author:ashley
Status:ok
Tags:
Comment:
SocialProfile: follow-up to r92526: award (system gift) images are prefixed with sg_, so try to delete the award image instead of a gift image; gift images have no prefix
Modified paths:
  • /trunk/extensions/SocialProfile/SystemGifts/SpecialRemoveMasterSystemGift.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SocialProfile/SystemGifts/SpecialRemoveMasterSystemGift.php
@@ -23,9 +23,10 @@
2424 */
2525 function deleteImage( $id, $size ) {
2626 global $wgUploadDirectory;
27 - $files = glob( $wgUploadDirectory . '/awards/' . $id . "_{$size}*" );
 27+ $files = glob( $wgUploadDirectory . '/awards/sg_' . $id . "_{$size}*" );
2828 if ( $files && $files[0] ) {
2929 $img = basename( $files[0] );
 30+ // $img already contains the sg_ prefix
3031 unlink( $wgUploadDirectory . '/awards/' . $img );
3132 }
3233 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r92526SocialProfile: new special page, Special:RemoveMasterSystemGift, to allow awa...ashley11:42, 19 July 2011

Status & tagging log