From d0022decd4f5ea7cc3fb08edf8e2524f3410624d Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Sun, 10 Jun 2007 17:13:49 +0000 Subject: [PATCH] Disable screenshot deletion and add screenshot ids to the cleanup email so we can verify that the cleanup script is removing the correct screenshots. --- cron/cleanup.php | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/cron/cleanup.php b/cron/cleanup.php index f9a7efc..a4f57cf 100644 --- a/cron/cleanup.php +++ b/cron/cleanup.php @@ -285,6 +285,15 @@ function removeScreenshotsWithMissingFiles() $sMsg = "Found ".count($aMissingScreenshotIds)." screenshots with missing files.\r\n"; $sMsg.= "Deleting these screenshots.\r\n"; + // add the screenshot ids to the email so we can see which screenshots are + // going to be deleted + $sMsg.="\r\n"; + $sMsg.="Screenshot IDs:\r\n"; + foreach($aMissingScreenshotIds as $iScreenshotId) + { + $sMsg.=$iScreenshotId."\r\n"; + } + $sSubject = "Screenshots deleted\r\n"; $sEmail = User::get_notify_email_address_list(null, null); /* get list admins */ @@ -292,10 +301,10 @@ function removeScreenshotsWithMissingFiles() mail_appdb($sEmail, $sSubject, $sMsg); // 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(); // delete the screenshot +// } } ?>