MailTemplateList.php
[Pman.Core] / MailTemplateList.php
index 6cded70..104b1d7 100644 (file)
@@ -19,26 +19,25 @@ class Pman_Core_MailTemplateList extends Pman_Core_ConvertStyle
             if(!file_exists($dir . '/mail')){
                 continue;
             }
-            echo "$dir/mail/$entry<br/>";
-//            
-//            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<br/>";
 //                    $ret[] = array(
 //                        'file' => $entry,
 //                        'content' => $this->convertStyle("$dir/mail/$entry")
 //                    );
-//                }
-//                
-//                closedir($handle);
-//            }
+                }
+                
+                closedir($handle);
+            }
             
         }
         exit;
-        $this->jok($ret);
+//        $this->jok($ret);
         
     }