|
|
@@ -1601,8 +1601,8 @@ class View implements EventDispatcherInterface
|
|
|
$templatePaths = App::path(static::NAME_TEMPLATE);
|
|
|
$pluginPaths = $themePaths = [];
|
|
|
if (!empty($plugin)) {
|
|
|
- for ($i = 0, $count = count($templatePaths); $i < $count; $i++) {
|
|
|
- $pluginPaths[] = $templatePaths[$i]
|
|
|
+ foreach ($templatePaths as $templatePath) {
|
|
|
+ $pluginPaths[] = $templatePath
|
|
|
. static::PLUGIN_TEMPLATE_FOLDER
|
|
|
. DIRECTORY_SEPARATOR
|
|
|
. $plugin
|
|
|
@@ -1615,16 +1615,14 @@ class View implements EventDispatcherInterface
|
|
|
$themePaths[] = Plugin::templatePath(Inflector::camelize($this->theme));
|
|
|
|
|
|
if ($plugin) {
|
|
|
- for ($i = 0, $count = count($themePaths); $i < $count; $i++) {
|
|
|
- array_unshift(
|
|
|
- $themePaths,
|
|
|
- $themePaths[$i]
|
|
|
- . static::PLUGIN_TEMPLATE_FOLDER
|
|
|
- . DIRECTORY_SEPARATOR
|
|
|
- . $plugin
|
|
|
- . DIRECTORY_SEPARATOR
|
|
|
- );
|
|
|
- }
|
|
|
+ array_unshift(
|
|
|
+ $themePaths,
|
|
|
+ $themePaths[0]
|
|
|
+ . static::PLUGIN_TEMPLATE_FOLDER
|
|
|
+ . DIRECTORY_SEPARATOR
|
|
|
+ . $plugin
|
|
|
+ . DIRECTORY_SEPARATOR
|
|
|
+ );
|
|
|
}
|
|
|
}
|
|
|
|