Vault changes

This commit is contained in:
Karl Cordes 2010-03-23 17:54:15 +11:00
parent b2ab892253
commit 17c5674879
3 changed files with 7 additions and 4 deletions

View file

@ -11,7 +11,9 @@ function download($id) {
header('Content-type: ' . $file['EmailAttachment']['type']);
header('Content-length: ' . $file['EmailAttachment']['size']);
header('Content-Disposition: attachment; filename="'.$file['EmailAttachment']['name'].'"');
echo $file['EmailAttachment']['data'];
ob_clean();
flush();
readfile($file['EmailAttachment']['filename']);
exit();
}

View file

@ -112,7 +112,7 @@ class VaultShell extends Shell {
$this->data['EmailAttachment']['email_id'] = $email_id;
$this->data['EmailAttachment']['name'] = $attachment['name'];
$this->data['EmailAttachment']['type'] = $attachment['type'];
$this->data['EmailAttachment']['size'] = filesize($email_dir.'/'.$attachment['name']);
$this->data['EmailAttachment']['size'] = filesize($email_dir.'/'.$uniqid.'/'.$attachment['name']);
$this->data['EmailAttachment']['filename'] = $email_dir.'/'.$uniqid.'/'.$attachment['name'];
if ($this->EmailAttachment->save($this->data)) {
echo "Saved file successfully to database\n";
@ -182,7 +182,7 @@ class VaultShell extends Shell {
if(isset($discarded_msgs)) {
foreach($discarded_msgs as $msg) {
$no = imap_msgno($mbox,$msg);
$this_header = imap_headerinfo($mbox, $i);
echo "Going to discard: $no\t $msg\t".$this_header->subject."\n";
if($testing == 0) {
imap_mail_move($mbox,$no, 'INBOX/Discarded');

3
vendors/xtcpdf.php vendored
View file

@ -392,6 +392,7 @@ ENDPRODUCT;
$options = 0; //Toggled to 1 when we encounter an Optional product. Stops the totals being printed.
print_r($pageProducts);
// print_r($products);
foreach ($pageProducts as $page) {
$this->AddPage();
@ -434,7 +435,7 @@ ENDPRODUCT;
foreach($page as $productID) {
$product = array_shift($products);
$fullDesc = "<b>".$product[$docType]['title'].'</b><br>'.$product[$docType]['description'];
$fullDesc = "<b>".$product['Principle']['name']."</b><br>"."<b>".$product[$docType]['title'].'</b><br>'.$product[$docType]['description'];
if($product[$docType]['option'] == 1) {
$options = 1;