[dev] Today's little ldap schema witch project and a horde.schema diff.

Edwin Culp eculp@encontacto.net
Thu, 11 Apr 2002 06:10:28 -0700


Quoting Jon Parise <jon@horde.org>:

| On Fri, Apr 05, 2002 at 07:36:36PM -0800, Edwin Culp wrote:
| 
<SNIP>
| Because we can't save an empty string, the kludgy solution would
| be to define some new string constant (e.g. 'HORDE-EMPTY-STRING')
| and store that as the equivalent of an empty preference.  Upon
| reading the preferences back in, we'd check for that special
| string and convert it into an empty string value in PHP code.
| 
| That seems icky, but I don't know how empty strings are supported
| to be stored in LDAP.

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.

I tried applying it last night and wasn't successful.  I did it quickly and
probably did something dumb.  I didn't write down the message because I 
meant to try again tonight.

Thanks,

ed

| 
| Comments on this would be appreciated.
| 
| -- 
| Jon Parise (jon@csh.rit.edu)  .  Information Technology (2001)
| http://www.csh.rit.edu/~jon/  :  Computer Science House Member
| 
| -- 
| Horde Developers mailing list: http://horde.org/
| Frequently Asked Questions: http://horde.org/faq/
| To unsubscribe, mail: dev-unsubscribe@lists.horde.org
| 
| 

-------------------------------------------------------------
 http://insourcery.com - Mergence of Business and Technology  
          a "Griffin Plaza Partners, LLC" Company