backport the ability to manualy set the tpl path

This commit is contained in:
Pim Snel 2006-10-30 09:50:40 +00:00
parent b55f7db8ed
commit 3d6ef7ce57

View File

@ -85,12 +85,12 @@
@abstract sets the preferred and fallback template search paths
@return void
*/
function set_tpl_path()
function set_tpl_path($man_dir=false)
{
$preferred_dir=$this->get_tpl_dir();
$fallback_dir=$this->get_tpl_dir(true);
if(!$preferred_dir && $fallback_dir)
if(!$preferred_dir && $man_dir && $fallback_dir)
{
$this->halt(lang('No Savant2 template directories were found in:'.EGW_APP_ROOT));
}
@ -106,10 +106,15 @@
$this->addPath('template',$preferred_dir);
}
}
if($man_dir)
{
$this->addPath('template',$man_dir);
}
}
}
/*!
@function get_tpl_dir
@abstract get template dir of an application