mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 09:23:28 +01:00
backport the ability to manualy set the tpl path
This commit is contained in:
parent
b55f7db8ed
commit
3d6ef7ce57
@ -79,20 +79,20 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*!
|
||||
@function set_tpl_path
|
||||
@abstract sets the preferred and fallback template search paths
|
||||
@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);
|
||||
$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));
|
||||
$this->halt(lang('No Savant2 template directories were found in:'.EGW_APP_ROOT));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -100,16 +100,21 @@
|
||||
{
|
||||
$this->addPath('template',$fallback_dir);
|
||||
}
|
||||
// add preferred tpl dir last because savant set the last added first in the search array
|
||||
// add preferred tpl dir last because savant set the last added first in the search array
|
||||
if($preferred_dir)
|
||||
{
|
||||
$this->addPath('template',$preferred_dir);
|
||||
}
|
||||
|
||||
}
|
||||
if($man_dir)
|
||||
{
|
||||
$this->addPath('template',$man_dir);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
@function get_tpl_dir
|
||||
@abstract get template dir of an application
|
||||
|
Loading…
Reference in New Issue
Block a user