dont load cfs for template from stylite app

This commit is contained in:
Ralf Becker 2011-06-28 20:47:35 +00:00
parent bd7407ed88
commit 05a3ccb320

View File

@ -111,10 +111,10 @@ class customfields_widget
function pre_process($form_name,&$value,&$cell,&$readonlys,&$extension_data,etemplate $tmpl) function pre_process($form_name,&$value,&$cell,&$readonlys,&$extension_data,etemplate $tmpl)
{ {
list($app) = explode('.',$tmpl->name); list($app) = explode('.',$tmpl->name);
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 // 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 if ($app && $app != 'stylite' && $app != $this->appname && ($this->appname == 'etemplate' || !$this->customfields))
{ {
self::__construct(null,$app); self::__construct(null,$app); // app changed
} }
list($type2,$use_private,$field_names) = explode(',',$cell['size'],3); list($type2,$use_private,$field_names) = explode(',',$cell['size'],3);
$fields_with_vals=array(); $fields_with_vals=array();