From 5fb1c4ff4dc0b6a890b70ce95c95d21bbc2f9c9e Mon Sep 17 00:00:00 2001 From: John Bintz Date: Sun, 19 Jul 2009 19:10:31 -0400 Subject: [PATCH] fix broken partials method --- classes/ComicPress.inc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/classes/ComicPress.inc b/classes/ComicPress.inc index f347060..985110c 100644 --- a/classes/ComicPress.inc +++ b/classes/ComicPress.inc @@ -310,16 +310,21 @@ class ComicPress { */ function get_next_comic($category = null, $override_post = null) { return $this->get_adjacent_comic($category, true, $override_post); } + /** + * Get the path to a partial. + * @param array $partials The partials to search for in each path. + * @return string|boolean The partial path to use, or false if no matches. + */ function get_partial_path($partials) { foreach ($partials as $partial) { foreach ($comicpress->partial_paths as $path) { $target = $path . '/' . $partial . '.inc'; if (file_exists($target)) { - include($target); - return; + return $target; } } } + return false; } }