[dev] Today's little ldap schema witch project and a horde.schema diff.
Edwin Culp
eculp@encontacto.net
Sun, 14 Apr 2002 09:11:58 -0700
Quoting Jon Parise <jon@horde.org>:
| On Thu, Apr 11, 2002 at 06:10:28AM -0700, Edwin Culp wrote:
|
| > That is the work around that I have been using and is is very icky.
| >
| > What aboutthe equivalent of line +- 305 in turba/lib/ldap.php
| > $attributes = array_filter($attributes, array($this,
| 'cleanEmptyAttributes'));
| > function cleanEmptyAttributes($var)
| > {
| > if (!is_array($var)) {
| > return ($var != '');
| > } else {
| > foreach ($var as $v) {
| > return($v != '');
| > }
| > }
| > }
| >
| > while building the dirtyPrefs array arround line 285 in
| > horde/lib/Prefs/ldap.php. I was looking at that yesterday and feel like
| > it would work just by not including the prefs leaving the ldap directory
| > as before with no value, which is what I think we are after. AFAIK,
| > this is why turba and erase attributes.
|
| This still wouldn't allow for storing an empty string in the LDAP
| directory.
The way that I understand it and have always used it is that a non-
existent attribute is the "equivalent" of an empty existent attribute
in sql, but I have managed to confuse myself completely with this
problem. Which brings up the interesting point of storing pgp in ldap.
When I tried to enable pgp, I first got the impUsePgp attribute type
undefined so I added an attribute in imp.schema and then I got the
following:
slapd.log:
"Apr 14 08:39:14 slapd[77201]: conn=12 op=2 RESULT tag=103 err=21
text=impusepgp: value #0 invalid per syntax"
horde.log:
Apr 14 08:39:14 HORDE [emergency] [imp] Unable to modify preferences: [21]
Invalid syntax [on line 316 of "/usr/src/horde/lib/Prefs/ldap.php"]
Thought:
The defaults all work fine under ldap and they are not in the directory.
If you make a change, it works fine and is then included in the directory.
A classic example is hordeThemes. Then you can't go back to the default
because you can't erase the attribute which would be the equivalent of
assigning it an empty value that ldap doesn't accept. So you are stuck
with the Themes and can never go back to the original.
I felt that the solution was to just erase the empty-valued attributes,
but the pgp error above has me doubting again.
ed
-------------------------------------------------------------
http://insourcery.com - Mergence of Business and Technology
a "Griffin Plaza Partners, LLC" Company