mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-24 04:40:13 +01:00
added garbage collection to viewed images
This commit is contained in:
parent
190ce71af7
commit
81b6f2357d
@ -291,7 +291,7 @@ make_cron_entries() {
|
||||
echo "*/15 * * * * $INDEXER --quiet tag1 --rotate" >> $CRON_TMP
|
||||
echo "*/15 * * * * $INDEXER --quiet note1 --rotate" >> $CRON_TMP
|
||||
echo "30 6 * * * /usr/bin/php $LIBEXECDIR/piler/generate_stats.php --webui $DOCROOT" >> $CRON_TMP
|
||||
|
||||
echo "*/5 * * * * /usr/bin/find $DOCROOT/tmp -type f -name i.\* -exec rm -f {} \;" >> $CRON_TMP
|
||||
echo "### PILEREND" >> $CRON_TMP
|
||||
}
|
||||
|
||||
|
@ -81,13 +81,13 @@ class ControllerMessageView extends Controller {
|
||||
foreach($this->data['attachments'] as $a) {
|
||||
if(preg_match("/image/", $a['type'])) {
|
||||
$attachment = $this->model_search_message->get_attachment_by_id($a['id']);
|
||||
$fp = fopen(DIR_BASE . 'tmp/' . $a['id'], "w+");
|
||||
$fp = fopen(DIR_BASE . 'tmp/' . "i." . $a['id'], "w+");
|
||||
if($fp) {
|
||||
fwrite($fp, $attachment['attachment']);
|
||||
fclose($fp);
|
||||
|
||||
$this->data['images'][] = array(
|
||||
'name' => $a['id']
|
||||
'name' => "i." . $a['id']
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -47,6 +47,8 @@ class ModelMailMail extends Model {
|
||||
|
||||
fclose($r);
|
||||
|
||||
syslog(LOG_INFO, "sending mail from=$from, rcpt=" . implode(" ", $to) . ", status=$ok");
|
||||
|
||||
return $ok;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user