Activte the deletion portion of the 'screenshots with missing files' cleanup

This commit is contained in:
Chris Morgan
2007-06-08 00:42:06 +00:00
committed by WineHQ
parent 0cd6de7970
commit be5361f751

View File

@@ -283,8 +283,7 @@ function removeScreenshotsWithMissingFiles()
// build the email to admins about what we are doing
$sMsg = "Found ".count($aMissingScreenshotIds)." screenshots with missing files.\r\n";
//FIXME: uncomment the below line when we uncomment the below lines in the script
// $sMsg.= "Deleting these screenshots.\r\n";
$sMsg.= "Deleting these screenshots.\r\n";
$sSubject = "Screenshots deleted\r\n";
@@ -292,12 +291,11 @@ function removeScreenshotsWithMissingFiles()
if($sEmail)
mail_appdb($sEmail, $sSubject, $sMsg);
//FIXME: activate this after we see the results from the nightly cron script email
// remove the screenshots with missing files
// foreach($aMissingScreenshotIds as $iScreenshotId)
// {
// $oScreenshot = new Screenshot($iScreenshotId);
// $oScreenshot->delete(true); // delete the screenshot silently
// }
foreach($aMissingScreenshotIds as $iScreenshotId)
{
$oScreenshot = new Screenshot($iScreenshotId);
$oScreenshot->delete(true); // delete the screenshot silently
}
}
?>