From e94ee0617aae1978c3ad54a75ac34ca53cf64934 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Fri, 10 Dec 2010 11:23:49 +0000 Subject: [PATCH] Theme plugin will now give correct path even for mobile themes. --- system/pyrocms/plugins/theme.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system/pyrocms/plugins/theme.php b/system/pyrocms/plugins/theme.php index 0b5e5815cd9..f1c234a9f3f 100644 --- a/system/pyrocms/plugins/theme.php +++ b/system/pyrocms/plugins/theme.php @@ -38,7 +38,8 @@ function partial() function path() { $data =& $this->load->_ci_cached_vars; - return dirname($data['template_views']).'/'; + $path = rtrim($data['template_views'], '/'); + return preg_replace('#(\/views(\/web|\/mobile)?)$#', '', $path).'/'; } /**