From 972fa9c98d16a2f517cc59544d92875426b54913 Mon Sep 17 00:00:00 2001 From: chihwen Date: Thu, 4 Apr 2013 23:42:36 +0800 Subject: [PATCH 1/2] Fix the sequence of layout subdir to meet comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The comment is  // Things like views/admin/web/view admin = subdir So the sequence of layout subdir should be views/admin/web/view admin = subdir views/admin/mobile/view admin = subdir not views/web/admin/view admin = subdir views/mobile/admin/view admin = subdir --- libraries/Template.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libraries/Template.php b/libraries/Template.php index ca28ff1..333bee4 100644 --- a/libraries/Template.php +++ b/libraries/Template.php @@ -662,6 +662,12 @@ private function _find_view_folder() $view_folder = $this->_theme_path.'views/'; } + // Things like views/admin/web/view admin = subdir + if ($this->_layout_subdir) + { + $view_folder .= $this->_layout_subdir.'/'; + } + // Would they like the mobile version? if ($this->_is_mobile === TRUE AND is_dir($view_folder.'mobile/')) { @@ -675,12 +681,6 @@ private function _find_view_folder() $view_folder .= 'web/'; } - // Things like views/admin/web/view admin = subdir - if ($this->_layout_subdir) - { - $view_folder .= $this->_layout_subdir.'/'; - } - // If using themes store this for later, available to all views $this->_ci->load->vars('template_views', $view_folder); @@ -793,4 +793,4 @@ private function _ext($file) } } -// END Template class \ No newline at end of file +// END Template class From 82fa6de856f0791ff765b7c366e174907e122b68 Mon Sep 17 00:00:00 2001 From: chihwen Date: Fri, 5 Apr 2013 00:36:39 +0800 Subject: [PATCH 2/2] Corrected comment to meet the squence of subdir --- libraries/Template.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libraries/Template.php b/libraries/Template.php index 333bee4..96001fc 100644 --- a/libraries/Template.php +++ b/libraries/Template.php @@ -662,12 +662,6 @@ private function _find_view_folder() $view_folder = $this->_theme_path.'views/'; } - // Things like views/admin/web/view admin = subdir - if ($this->_layout_subdir) - { - $view_folder .= $this->_layout_subdir.'/'; - } - // Would they like the mobile version? if ($this->_is_mobile === TRUE AND is_dir($view_folder.'mobile/')) { @@ -681,6 +675,12 @@ private function _find_view_folder() $view_folder .= 'web/'; } + // Things like views/web/admin/view admin = subdir + if ($this->_layout_subdir) + { + $view_folder .= $this->_layout_subdir.'/'; + } + // If using themes store this for later, available to all views $this->_ci->load->vars('template_views', $view_folder);