From a956fa2b6c846f223d679cdb2b9a059113cd8d4b Mon Sep 17 00:00:00 2001 From: "Philip M. Hofer (Frumph)" Date: Sat, 12 Dec 2009 00:45:08 -0800 Subject: [PATCH] Added check for whether the comics directory exists by isdir ABSPATH .'/'. $comic_folder and gives debug error message on dashboard if not set or found. Signed-off-by: Philip M. Hofer (Frumph) --- comicpress-debug.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/comicpress-debug.php b/comicpress-debug.php index 6e01d47..b1d695c 100644 --- a/comicpress-debug.php +++ b/comicpress-debug.php @@ -1,7 +1,7 @@ ' . __('post categories.','comicpress') . '' . - __(' It is necessary to have 2 more categories in addition to the uncategorized category, a Blog and Comic primary categories. These two additional categories will be the root categories that seperate the difference between the comic and blog posts. When you post a new comic you will be posting it into the comic category or heirarchal children of the comic category. When posting a new blog post you need to set it into the blog category or child of the blog category. Uncategorized will act as a blog post category (do not rename uncategorized).','comicpress'); + __(' It is necessary to have 2 more categories in addition to the uncategorized category, a Blog and Comic primary categories. These two additional categories will be the root categories that seperate the difference between the comic and blog posts. When you post a new comic you will be posting it into the comic category or heirarchal children of the comic category. When posting a new blog post you need to set it into the blog category or child of the blog category. Uncategorized will act as a blog post category (do not rename uncategorized). You can configure the categories to set as the primary blog and comic category from within the comicpress-config.php file or use ComicPress Manager - ComicPress Config','comicpress'); } + // Check Comics Folder + if (!is_dir(ABSPATH . '/' . $comic_folder)) { + $error[] = array('header', __('Comics Folder is not configured and is unable to be found.','comicpress')); + $error[] = __('ComicPress stores the files it uses inside a specific directory and that directory is set within the comicpress-config.php or you can configure it from within ComicPress Manager. When this error is present it means that the theme is unable to find the appropriate directory to read the comics from.','comicpress'); + } + if (!empty($error)) { ?>