diff options
Diffstat (limited to 'modules/View.php')
-rw-r--r-- | modules/View.php | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/modules/View.php b/modules/View.php index ac64056611..e81bf8445a 100644 --- a/modules/View.php +++ b/modules/View.php @@ -1,22 +1,22 @@ -<?php
-/**
- * Piwik - Open source web analytics
- *
- * @link http://piwik.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later
- * @version $Id$
- *
- * @package Piwik_Visualization
- */
-
+<?php +/** + * Piwik - Open source web analytics + * + * @link http://piwik.org + * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later + * @version $Id$ + * + * @package Piwik_Visualization + */ + require_once 'Smarty/Smarty.class.php'; -require_once "iView.php";
-
-/**
- *
- * @package Piwik_Visualization
- *
+require_once "iView.php"; + +/** + * + * @package Piwik_Visualization + * */ class Piwik_View implements Piwik_iView { @@ -36,34 +36,34 @@ class Piwik_View implements Piwik_iView foreach($smConf as $key => $value) { $this->smarty->$key = $value; - }
+ } - $this->smarty->template_dir = $this->getCorrectPath( $smConf->template_dir->toArray() );
- $this->smarty->plugins_dir = $this->getCorrectPath( $smConf->plugins_dir->toArray() );
- $this->smarty->compile_dir = $this->getCorrectPath( $smConf->compile_dir );
- $this->smarty->cache_dir = $this->getCorrectPath( $smConf->cache_dir );
+ $this->smarty->template_dir = $this->getCorrectPath( $smConf->template_dir->toArray() ); + $this->smarty->plugins_dir = $this->getCorrectPath( $smConf->plugins_dir->toArray() ); + $this->smarty->compile_dir = $this->getCorrectPath( $smConf->compile_dir ); + $this->smarty->cache_dir = $this->getCorrectPath( $smConf->cache_dir ); $this->smarty->load_filter('output','trimwhitespace'); // global value accessible to all templates: the piwik base URL for the current request $this->piwikUrl = Piwik_Url::getCurrentUrlWithoutFileName(); - }
-
- protected function getCorrectPath( $path )
- {
- if(is_array($path))
- {
- foreach($path as &$dir)
- {
- $dir = PIWIK_INCLUDE_PATH . '/' . $dir ;
- }
- return $path;
- }
- else
- {
- return PIWIK_INCLUDE_PATH . '/' . $path;
- }
+ } + + protected function getCorrectPath( $path ) + { + if(is_array($path)) + { + foreach($path as &$dir) + { + $dir = PIWIK_INCLUDE_PATH . '/' . $dir ; + } + return $path; + } + else + { + return PIWIK_INCLUDE_PATH . '/' . $path; + } } /** |