Don't require trailing slash for smarty/geshi includes
Don't require trailing slash for smarty/geshi includes

--- a/config/gitphp.conf.defaults.php
+++ b/config/gitphp.conf.defaults.php
@@ -280,7 +280,6 @@
 /*
  * smarty_prefix
  * This is the prefix where smarty is installed.
- * (including trailing slash)
  * If an absolute (starts with /) path is given,
  * Smarty.class.php will be searched for in that directory.
  * If a relative (doesn't start with /) path is given,
@@ -304,7 +303,6 @@
  * NOTE: this is the path to the base geshi.php file to include,
  * NOT the various other geshi php source files!
  * Leave blank if geshi.php is in the gitphp root
- * (don't forget trailing slash!)
  */
 $gitphp_conf['geshiroot'] = 'lib/geshi/';
 

--- a/include/controller/ControllerBase.class.php
+++ b/include/controller/ControllerBase.class.php
@@ -67,7 +67,7 @@
 	 */
 	public function __construct()
 	{
-		require_once(GitPHP_Config::GetInstance()->GetValue('smarty_prefix', 'lib/smarty/libs/') . 'Smarty.class.php');
+		require_once(GitPHP_Util::AddSlash(GitPHP_Config::GetInstance()->GetValue('smarty_prefix', 'lib/smarty/libs/')) . 'Smarty.class.php');
 		$this->tpl = new Smarty;
 		$this->tpl->plugins_dir[] = GITPHP_INCLUDEDIR . 'smartyplugins';
 

--- a/include/controller/Controller_Blame.class.php
+++ b/include/controller/Controller_Blame.class.php
@@ -140,7 +140,7 @@
 		$this->tpl->assign('tree', $commit->GetTree());
 
 		if (GitPHP_Config::GetInstance()->GetValue('geshi', true)) {
-			include_once(GitPHP_Config::GetInstance()->GetValue('geshiroot', 'lib/geshi/') . "geshi.php");
+			include_once(GitPHP_Util::AddSlash(GitPHP_Config::GetInstance()->GetValue('geshiroot', 'lib/geshi/')) . "geshi.php");
 			if (class_exists('GeSHi')) {
 				$geshi = new GeSHi("",'php');
 				if ($geshi) {

--- a/include/controller/Controller_Blob.class.php
+++ b/include/controller/Controller_Blob.class.php
@@ -191,7 +191,7 @@
 		$this->tpl->assign('extrascripts', array('js/blame.js'));
 
 		if (GitPHP_Config::GetInstance()->GetValue('geshi', true)) {
-			include_once(GitPHP_Config::GetInstance()->GetValue('geshiroot', 'lib/geshi/') . "geshi.php");
+			include_once(GitPHP_Util::AddSlash(GitPHP_Config::GetInstance()->GetValue('geshiroot', 'lib/geshi/')) . "geshi.php");
 			if (class_exists('GeSHi')) {
 				$geshi = new GeSHi("",'php');
 				if ($geshi) {

comments