forked from extern/egroupware
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
|
@function set_tpl_path
|
||||||
@abstract sets the preferred and fallback template search paths
|
@abstract sets the preferred and fallback template search paths
|
||||||
@return void
|
@return void
|
||||||
*/
|
*/
|
||||||
function set_tpl_path()
|
function set_tpl_path($man_dir=false)
|
||||||
{
|
{
|
||||||
$preferred_dir=$this->get_tpl_dir();
|
$preferred_dir=$this->get_tpl_dir();
|
||||||
$fallback_dir=$this->get_tpl_dir(true);
|
$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
|
else
|
||||||
{
|
{
|
||||||
@ -100,16 +100,21 @@
|
|||||||
{
|
{
|
||||||
$this->addPath('template',$fallback_dir);
|
$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)
|
if($preferred_dir)
|
||||||
{
|
{
|
||||||
$this->addPath('template',$preferred_dir);
|
$this->addPath('template',$preferred_dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
if($man_dir)
|
||||||
|
{
|
||||||
|
$this->addPath('template',$man_dir);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@function get_tpl_dir
|
@function get_tpl_dir
|
||||||
@abstract get template dir of an application
|
@abstract get template dir of an application
|
||||||
|
Loading…
Reference in New Issue
Block a user