http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93195
Revision: 93195 Author: ashley Date: 2011-07-26 15:38:05 +0000 (Tue, 26 Jul 2011) Log Message: ----------- 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: trunk/extensions/SocialProfile/SystemGifts/SpecialRemoveMasterSystemGift.php =================================================================== --- trunk/extensions/SocialProfile/SystemGifts/SpecialRemoveMasterSystemGift.php 2011-07-26 15:20:36 UTC (rev 93194) +++ trunk/extensions/SocialProfile/SystemGifts/SpecialRemoveMasterSystemGift.php 2011-07-26 15:38:05 UTC (rev 93195) @@ -23,9 +23,10 @@ */ function deleteImage( $id, $size ) { global $wgUploadDirectory; - $files = glob( $wgUploadDirectory . '/awards/' . $id . "_{$size}*" ); + $files = glob( $wgUploadDirectory . '/awards/sg_' . $id . "_{$size}*" ); if ( $files && $files[0] ) { $img = basename( $files[0] ); + // $img already contains the sg_ prefix unlink( $wgUploadDirectory . '/awards/' . $img ); } } _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs