Skip to content

Commit

Permalink
Merge branch 'develop' into multisource-ui
Browse files Browse the repository at this point in the history
  • Loading branch information
ehough committed Jun 15, 2015
2 parents 8f3b820 + c103afc commit 1a325e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/add-ons/core/web/js/tubepress.js
Expand Up @@ -228,7 +228,7 @@ var tubePressDomInjector,
} else {

//http://stackoverflow.com/questions/2161159/get-script-path
dokument.getElementsByTagName(text_script);
scripts = dokument.getElementsByTagName(text_script);
x = 0;

for (x; x < scripts.length; x += 1) {
Expand Down
Expand Up @@ -303,21 +303,24 @@ private function _strNode($name, $value, $depth)

private function _findTemplates($rootDirectory)
{
$legacy = $this->_doFind("$rootDirectory/templates", '.tpl.php');
$twig = $this->_doFind("$rootDirectory/templates", '.html.twig');
$legacy = $this->_doFind($rootDirectory, '.tpl.php');
$twig = $this->_doFind($rootDirectory, '.html.twig');
$allPaths = array_merge($twig, $legacy);
$toReturn = array();

foreach ($allPaths as $path) {

$toReturn[$path] = "$rootDirectory/templates/$path";
$key = str_replace('\\', '/', $path);
$toReturn[$key] = sprintf('%s%stemplates%s%s', $rootDirectory, DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR, $path);
}

return $toReturn;
}

private function _doFind($rootDirectory, $suffix)
{
$rootDirectory = $rootDirectory . DIRECTORY_SEPARATOR . 'templates';

if ($this->shouldLog()) {

$this->getLogger()->debug(sprintf('Looking for %s files in %s', $suffix, $rootDirectory));
Expand Down

0 comments on commit 1a325e9

Please sign in to comment.