mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-26 07:02:08 +01:00
if app changes while displaying content, be aware of that (as of addressbook infolog view)
This commit is contained in:
parent
4f910c4a5e
commit
796dba966d
@ -83,7 +83,7 @@ class customfields_widget
|
|||||||
var $advanced_search;
|
var $advanced_search;
|
||||||
|
|
||||||
|
|
||||||
function customfields_widget($ui,$appname=null)
|
function __construct($ui,$appname=null)
|
||||||
{
|
{
|
||||||
$this->appname = $appname ? $appname : $GLOBALS['egw_info']['flags']['currentapp'];
|
$this->appname = $appname ? $appname : $GLOBALS['egw_info']['flags']['currentapp'];
|
||||||
$this->customfields = config::get_customfields($this->appname);
|
$this->customfields = config::get_customfields($this->appname);
|
||||||
@ -92,11 +92,12 @@ class customfields_widget
|
|||||||
}
|
}
|
||||||
|
|
||||||
function pre_process($name,&$value,&$cell,&$readonlys,&$extension_data,&$tmpl)
|
function pre_process($name,&$value,&$cell,&$readonlys,&$extension_data,&$tmpl)
|
||||||
{
|
|
||||||
if ($this->appname == 'etemplate' || !$this->customfields) // if we are in the etemplate editor or the app has no cf's, load the cf's from the app the tpl belongs too
|
|
||||||
{
|
{
|
||||||
list($app) = explode('.',$tmpl->name);
|
list($app) = explode('.',$tmpl->name);
|
||||||
if ($app && $app != $this->appname) $this->customfields_widget(null,$app);
|
if ($this->appname == 'etemplate' || !$this->customfields || // if we are in the etemplate editor or the app has no cf's, load the cf's from the app the tpl belongs too
|
||||||
|
($app && $app != $this->appname) ) // app changed
|
||||||
|
{
|
||||||
|
self::__construct(null,$app);
|
||||||
}
|
}
|
||||||
list($type2,$use_private) = explode(',',$cell['size']);
|
list($type2,$use_private) = explode(',',$cell['size']);
|
||||||
$fields_with_vals=array();
|
$fields_with_vals=array();
|
||||||
|
Loading…
Reference in New Issue
Block a user