Fix for missing 'ED' dir.
authorDavid I. Lehn <dlehn@digitalbazaar.com>
Thu, 15 Dec 2011 16:55:21 -0500
changeset 298 4e36cba4fc71
parent 297 088a319ca900
child 299 a0b3b274ed7a
Fix for missing 'ED' dir.
primer/index.php
--- a/primer/index.php	Thu Dec 15 16:42:00 2011 -0500
+++ b/primer/index.php	Thu Dec 15 16:55:21 2011 -0500
@@ -39,13 +39,16 @@
 
 htmlcode;
 
-$editorsDrafts = scandir('ED', 1);
+if(is_dir('ED'))
+{
+   $editorsDrafts = scandir('ED', 1);
 
-foreach($editorsDrafts as $draft)
-{
-   if($draft != "." and $draft != "..")
+   foreach($editorsDrafts as $draft)
    {
-     print("                 <li><a href=\"ED/$draft/\">$draft</a></li>");
+      if($draft != "." and $draft != "..")
+      {
+         print("                 <li><a href=\"ED/$draft/\">$draft</a></li>");
+      }
    }
 }