From cddf783c27ffb364c1263abb53b1c6bc20f0a362 Mon Sep 17 00:00:00 2001 From: Deon George Date: Thu, 6 Oct 2011 16:16:27 +1100 Subject: [PATCH] Add an alert when RFC3866 tags are being used --- lib/xmlTemplates.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/xmlTemplates.php b/lib/xmlTemplates.php index 0da73a9..1749bac 100644 --- a/lib/xmlTemplates.php +++ b/lib/xmlTemplates.php @@ -437,6 +437,12 @@ abstract class xmlTemplate { # Initialise the Attribute Factory. $attribute_factory = new AttributeFactory(); + if (preg_match('/;/',$name)) + system_message(array( + 'title'=>'phpLDAPadmin doesnt support RFC3866.', + 'body'=>sprintf('%s {%s} (%s)','PLA might not do what you expect...',$name,(is_array($value) ? serialize($value) : $value)), + 'type'=>'warn')); + # If there isnt a schema item for this attribute $attribute = $attribute_factory->newAttribute($name,$value,$server->getIndex(),$source); @@ -444,8 +450,6 @@ abstract class xmlTemplate { if (is_null($attrid)) array_push($this->attributes,$attribute); - else - debug_dump_backtrace(sprintf('There was a request to add an attribute (%s), but it was already defined? (%s)',$attrid,__METHOD__),true); return $attribute; }