forked from extern/egroupware
tplsavant enhancements needed for jinn and japie functionality
This commit is contained in:
parent
174124dd9c
commit
20d7921564
@ -23,7 +23,7 @@
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
|
||||
if(is_file(EGW_INCLUDE_ROOT.'/phpgwapi/inc/savant2/Savant2.php'))
|
||||
{
|
||||
include_once(EGW_INCLUDE_ROOT.'/phpgwapi/inc/savant2/Savant2.php');
|
||||
@ -79,18 +79,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*!
|
||||
@function set_tpl_path
|
||||
@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,6 +106,11 @@
|
||||
$this->addPath('template',$preferred_dir);
|
||||
}
|
||||
|
||||
if($man_dir)
|
||||
{
|
||||
$this->addPath('template',$man_dir);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -209,4 +214,17 @@
|
||||
unlink($tmpfname);
|
||||
}
|
||||
|
||||
/**
|
||||
* set_var the same as assign()
|
||||
*
|
||||
* @param mixed $tplvar
|
||||
* @param string $val
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function set_var($tplvar,$val='')
|
||||
{
|
||||
$this->assign($tplvar,$val);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user