Applying patch from 'franiglesias'. Fixes issues where str_replace would greedily replace too many occurences of 'libs/'. Fixes #724

This commit is contained in:
mark_story 2010-05-16 23:50:17 -04:00
parent 4915645fb1
commit cd5aee1bfa

View file

@ -54,7 +54,7 @@ class TemplateTask extends Shell {
function _findThemes() {
$paths = App::path('shells');
$core = array_pop($paths);
$core = str_replace('libs' . DS, '', $core);
$core = preg_replace('#libs' . DS . '$#', '', $core);
$paths[] = $core;
$Folder =& new Folder($core . 'templates' . DS . 'default');
$contents = $Folder->read();