r68561 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68560‎ | r68561 | r68562 >
Date:13:33, 25 June 2010
Author:demon
Status:ok
Tags:
Comment:
Permission warnings are annoying and should be transparent to end users
Modified paths:
  • /trunk/phase3/includes/filerepo/ForeignAPIRepo.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/ForeignAPIRepo.php
@@ -211,10 +211,13 @@
212212 }
213213 $localUrl = $wgServer . $wgUploadPath . '/' . $path . $fileName;
214214 # FIXME: Delete old thumbs that aren't being used. Maintenance script?
 215+ wfSuppressWarnings();
215216 if( !file_put_contents($wgUploadDirectory . '/' . $path . $fileName, $thumb ) ) {
 217+ wfRestoreWarnings();
216218 wfDebug( __METHOD__ . " could not write to thumb path\n" );
217219 return $foreignUrl;
218220 }
 221+ wfRestoreWarnings();
219222 $wgMemc->set( $key, $localUrl, $this->apiThumbCacheExpiry );
220223 wfDebug( __METHOD__ . " got local thumb $localUrl, saving to cache \n" );
221224 return $localUrl;

Status & tagging log