projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4485675
)
Mailer.php
author
Alan Knowles
<alan@roojs.com>
Wed, 22 Aug 2012 06:23:49 +0000
(14:23 +0800)
committer
Alan Knowles
<alan@roojs.com>
Wed, 22 Aug 2012 06:23:49 +0000
(14:23 +0800)
Mailer.php
patch
|
blob
|
history
diff --git
a/Mailer.php
b/Mailer.php
index
defe068
..
6e9114f
100644
(file)
--- a/
Mailer.php
+++ b/
Mailer.php
@@
-211,7
+211,21
@@
class Pman_Core_Mailer {
{
if ($url[0] == '/') {
- print_R($this->page);exit;
+ $file = $this->page->rootDir . $url;
+ require_once 'File/MimeType.php';
+ $m = new File_MimeType();
+ $mt = $m->fromFilename($file);
+ $ext = $m->toExt($mt);
+
+ return array(
+ 'mimetype' => $mt,
+ 'ext' => $ext,
+ 'contentid' => md5($file),
+ 'file' => $file
+ );
+
+
+
}
print_R($url);