SF Feature #2827191 - warnings for missing objectClass could be disabled
This commit is contained in:
parent
a5b9e43a57
commit
803a4c821a
@ -145,6 +145,9 @@ $config->custom->commands['script'] = array(
|
|||||||
/* Disable the default template. */
|
/* Disable the default template. */
|
||||||
// $config->custom->appearance['disable_default_template'] = false;
|
// $config->custom->appearance['disable_default_template'] = false;
|
||||||
|
|
||||||
|
/* Hide the warnings for invalid objectClasses/attributes in templates. */
|
||||||
|
// $config->custom->appearance['hide_template_warning'] = false;
|
||||||
|
|
||||||
/* Configure what objects are shown in left hand tree */
|
/* Configure what objects are shown in left hand tree */
|
||||||
// $config->custom->appearance['tree_filter'] = '(objectclass=*)';
|
// $config->custom->appearance['tree_filter'] = '(objectclass=*)';
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ class Template extends xmlTemplate {
|
|||||||
if (is_object($soc) && ! in_array($soc->getName(),$objectclasses))
|
if (is_object($soc) && ! in_array($soc->getName(),$objectclasses))
|
||||||
array_push($objectclasses,$soc->getName(false));
|
array_push($objectclasses,$soc->getName(false));
|
||||||
|
|
||||||
elseif (! is_object($soc))
|
elseif (! is_object($soc) && ! $_SESSION[APPCONFIG]->getValue('appearance','hide_template_warning'))
|
||||||
system_message(array(
|
system_message(array(
|
||||||
'title'=>_('Automatically removed objectClass from template'),
|
'title'=>_('Automatically removed objectClass from template'),
|
||||||
'body'=>sprintf('%s: <b>%s</b> %s',$this->getTitle(),$details,_('removed from template as it is not defined in the schema')),
|
'body'=>sprintf('%s: <b>%s</b> %s',$this->getTitle(),$details,_('removed from template as it is not defined in the schema')),
|
||||||
@ -1222,10 +1222,11 @@ class Template extends xmlTemplate {
|
|||||||
&& (! in_array_ignore_case('extensibleobject',$this->getObjectClasses()))) {
|
&& (! in_array_ignore_case('extensibleobject',$this->getObjectClasses()))) {
|
||||||
unset($this->attributes[$index]);
|
unset($this->attributes[$index]);
|
||||||
|
|
||||||
system_message(array(
|
if (! $_SESSION[APPCONFIG]->getValue('appearance','hide_template_warning'))
|
||||||
'title'=>_('Automatically removed attribute from template'),
|
system_message(array(
|
||||||
'body'=>sprintf('%s: <b>%s</b> %s',$this->getTitle(),$attribute->getName(false),_('removed from template as it is not defined by an ObjectClass')),
|
'title'=>_('Automatically removed attribute from template'),
|
||||||
'type'=>'warn'));
|
'body'=>sprintf('%s: <b>%s</b> %s',$this->getTitle(),$attribute->getName(false),_('removed from template as it is not defined by an ObjectClass')),
|
||||||
|
'type'=>'warn'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,6 +105,10 @@ class Config {
|
|||||||
'desc'=>'Hide the features that may provide sensitive debugging information to the browser',
|
'desc'=>'Hide the features that may provide sensitive debugging information to the browser',
|
||||||
'default'=>true);
|
'default'=>true);
|
||||||
|
|
||||||
|
$this->default->appearance['hide_template_warning'] = array(
|
||||||
|
'desc'=>'Hide template errors from being displayed',
|
||||||
|
'default'=>false);
|
||||||
|
|
||||||
/** Language
|
/** Language
|
||||||
* The language setting. If you set this to 'auto', phpLDAPadmin will
|
* The language setting. If you set this to 'auto', phpLDAPadmin will
|
||||||
* attempt to determine your language automatically. Otherwise, set
|
* attempt to determine your language automatically. Otherwise, set
|
||||||
|
Loading…
Reference in New Issue
Block a user