From 8decb55b674bfafb65048f3daa196eac5ae2576d Mon Sep 17 00:00:00 2001 From: Edward Date: Wed, 19 Feb 2014 17:03:43 +0800 Subject: [PATCH] MailTemplateList.php --- MailTemplateList.php | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/MailTemplateList.php b/MailTemplateList.php index 6cded709..104b1d7f 100644 --- a/MailTemplateList.php +++ b/MailTemplateList.php @@ -19,26 +19,25 @@ class Pman_Core_MailTemplateList extends Pman_Core_ConvertStyle if(!file_exists($dir . '/mail')){ continue; } - echo "$dir/mail/$entry
"; -// -// if ($handle = opendir($dir . '/mail')) { -// while (false !== ($entry = readdir($handle))) { -// if ($entry == "." || $entry == ".." || !preg_match('/\.html$/', $entry)) { -// continue; -// } -// + + if ($handle = opendir($dir . '/mail')) { + while (false !== ($entry = readdir($handle))) { + if ($entry == "." || $entry == ".." || !preg_match('/\.html$/', $entry)) { + continue; + } + echo "$dir/mail/$entry
"; // $ret[] = array( // 'file' => $entry, // 'content' => $this->convertStyle("$dir/mail/$entry") // ); -// } -// -// closedir($handle); -// } + } + + closedir($handle); + } } exit; - $this->jok($ret); +// $this->jok($ret); } -- 2.39.2