projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
93ccdd8
)
MailTemplateList.php
author
Edward
<edward@roojs.com>
Wed, 19 Feb 2014 07:54:24 +0000
(15:54 +0800)
committer
Edward
<edward@roojs.com>
Wed, 19 Feb 2014 07:54:24 +0000
(15:54 +0800)
MailTemplateList.php
patch
|
blob
|
history
diff --git
a/MailTemplateList.php
b/MailTemplateList.php
index
eb30358
..
6c8af16
100644
(file)
--- a/
MailTemplateList.php
+++ b/
MailTemplateList.php
@@
-20,25
+20,31
@@
class Pman_Core_MailTemplateList extends Pman
$templateDir = explode(PATH_SEPARATOR, $fopts['templateDir']);
$templateDir = explode(PATH_SEPARATOR, $fopts['templateDir']);
+ $ret = array();
+
foreach ($templateDir as $dir){
foreach ($templateDir as $dir){
- echo "$dir <br/>";
+
if(!file_exists($dir . '/mail')){
continue;
}
if ($handle = opendir($dir . '/mail')) {
while (false !== ($entry = readdir($handle))) {
if(!file_exists($dir . '/mail')){
continue;
}
if ($handle = opendir($dir . '/mail')) {
while (false !== ($entry = readdir($handle))) {
- if ($entry == "." || $entry == "..") {
+ if ($entry == "." || $entry == ".."
|| !preg_match('/\.html$/', $entry)
) {
continue;
}
continue;
}
- echo "$entry <br/>";
+ $ret[] = array(
+ 'file' => $entry,
+ 'content' => file_get_contents("$dir/mail/$entry")
+ );
}
closedir($handle);
}
}
}
closedir($handle);
}
}
+ print_r($ret);exit;
exit;
$this->jdata(array(array('name' => 'aa', 'body'=> 'test')));
exit;
$this->jdata(array(array('name' => 'aa', 'body'=> 'test')));