1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33 |
diff --git a/cake/libs/view/theme.php b/cake/libs/view/theme.php
index 22a06f0..89d97bc 100644
--- a/cake/libs/view/theme.php
+++ b/cake/libs/view/theme.php
@@ -23,7 +23,7 @@
*
* Allows the creation of multiple themes to be used in an app. Theme views are regular view files
* that can provide unique HTML and static assets. If theme views are not found for the current view
- * the default app view files will be used. You can set `$this->theme` and `$this->view = 'Theme'`
+ * the default app view files will be used. You can set `$this->theme` and `$this->view = 'Theme'`
* in your Controller to use the ThemeView.
*
* Example of theme path with `$this->theme = 'super_hot';` Would be `app/views/themed/super_hot/posts`
@@ -59,13 +59,16 @@ class ThemeView extends View {
if (!empty($this->theme)) {
$count = count($paths);
for ($i = 0; $i < $count; $i++) {
- if (strpos($paths[$i], DS . 'plugins' . DS) === false
- && strpos($paths[$i], DS . 'libs' . DS . 'view') === false) {
+ if (strpos($paths[$i], DS . 'libs' . DS . 'view') === false) {
+ if (strpos($paths[$i], DS . 'plugins' . DS) === false) {
if ($plugin) {
$themePaths[] = $paths[$i] . 'themed'. DS . $this->theme . DS . 'plugins' . DS . $plugin . DS;
}
$themePaths[] = $paths[$i] . 'themed'. DS . $this->theme . DS;
+ } elseif ($plugin) {
+ $themePaths[] = $paths[$i] . 'themed'. DS . $this->theme . DS;
}
+ }
}
$paths = array_merge($themePaths, $paths);
}
|
