From ed93e7e28ec37682277a0d854eadba1e6453347a Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Fri, 25 Jun 2010 13:33:39 +0000 Subject: [PATCH] Permission warnings are annoying and should be transparent to end users --- includes/filerepo/ForeignAPIRepo.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/filerepo/ForeignAPIRepo.php b/includes/filerepo/ForeignAPIRepo.php index da6d1555d1..00020ff03f 100644 --- a/includes/filerepo/ForeignAPIRepo.php +++ b/includes/filerepo/ForeignAPIRepo.php @@ -211,10 +211,13 @@ class ForeignAPIRepo extends FileRepo { } $localUrl = $wgServer . $wgUploadPath . '/' . $path . $fileName; # FIXME: Delete old thumbs that aren't being used. Maintenance script? + wfSuppressWarnings(); if( !file_put_contents($wgUploadDirectory . '/' . $path . $fileName, $thumb ) ) { + wfRestoreWarnings(); wfDebug( __METHOD__ . " could not write to thumb path\n" ); return $foreignUrl; } + wfRestoreWarnings(); $wgMemc->set( $key, $localUrl, $this->apiThumbCacheExpiry ); wfDebug( __METHOD__ . " got local thumb $localUrl, saving to cache \n" ); return $localUrl; -- 2.20.1