[dev] [cvs] commit: mnemo/lib base.php

Michael M Slusarz slusarz at horde.org
Thu Jun 29 07:41:13 PDT 2006


Quoting Jan Schneider <jan at horde.org>:

> Zitat von Michael M Slusarz <slusarz at horde.org>:
>
>> slusarz     2006-06-29 00:29:20 PDT
>>
>>  Modified files:
>>    lib                  base.php
>>  Log:
>>  Save completely unnecessary preference update, if possible (would   
>>   cause a DB
>>  write on every IMP page load, for example, even though no data had  
>>    changed).
>>
>>  Revision  Changes    Path
>>  1.53      +7 -2      mnemo/lib/base.php
>
> No, setValue() only sets the dirty flag if the value is different from
> the old value, and only then the preference is written to the
> database. See Prefs.php line 280.

Ugh.  This is why you don't work on this stuff at 2 AM when you can't  
sleep.  You are right about the DB update.  But we are still calling  
cacheUpdate() needlessly when setting a preference and it doesn't  
change.  However, a well placed isDirty() check in Prefs.php seems to  
fix this so this should be fixed correctly now.

michael

___________________________________
Michael Slusarz [slusarz at horde.org]


More information about the dev mailing list