Skip to content

Commit

Permalink
pkp#3242 Remove unnecessary template dir adds
Browse files Browse the repository at this point in the history
  • Loading branch information
asmecher committed Jan 5, 2018
1 parent 7d2520c commit e96dc94
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions classes/template/PKPTemplateManager.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,24 +85,12 @@ function __construct($request) {
$baseDir = Core::getBaseDir();
$cachePath = CacheManager::getFileCachePath();


// Set the theme template dir
$activeTheme = null;
$context = $request->getContext();
if (is_a($context, 'Context')) {
$activeTheme = $context->getSetting('themePluginPath');
} elseif (!defined('SESSION_DISABLE_INIT')) {
$site = $request->getSite();
$activeTheme = $site->getSetting('themePluginPath');
}

$this->theme_template_dir = $baseDir . DIRECTORY_SEPARATOR . "plugins" . DIRECTORY_SEPARATOR . "themes" . DIRECTORY_SEPARATOR . $activeTheme . DIRECTORY_SEPARATOR . 'templates';
// Set the default template dir (app's template dir)
$this->app_template_dir = $baseDir . DIRECTORY_SEPARATOR . 'templates';
// Set fallback template dir (core's template dir)
$this->core_template_dir = $baseDir . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'pkp' . DIRECTORY_SEPARATOR . 'templates';

$this->template_dir = array($this->theme_template_dir, $this->app_template_dir, $this->core_template_dir);
$this->template_dir = array($this->app_template_dir, $this->core_template_dir);
$this->compile_dir = $cachePath . DIRECTORY_SEPARATOR . 't_compile';
$this->config_dir = $cachePath . DIRECTORY_SEPARATOR . 't_config';
$this->cache_dir = $cachePath . DIRECTORY_SEPARATOR . 't_cache';
Expand Down

2 comments on commit e96dc94

@Vitaliy-1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@asmecher
And this:

private $theme_template_dir;

@asmecher
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, thanks, @Vitaliy-1!

Please sign in to comment.