[Tickets #8484] saving prefs to files preserves the dirty flag

bugs at horde.org bugs at horde.org
Sat Aug 8 01:12:17 UTC 2009


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/8484
------------------------------------------------------------------------------
  Ticket             | 8484
  Created By         | reg at debian.org
  Summary            | saving prefs to files preserves the dirty flag
  Queue              | Horde Framework Packages
  Version            | HEAD
  Type               | Bug
  State              | Unconfirmed
  Priority           | 2. Medium
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


reg at debian.org (2009-08-07 21:12) wrote:

Hi,

I forward you a bug reported by a Debian user
(http://bugs.debian.org/538027) :

The file backend of the Prefs subsystem (lib/Horde/Prefs/file.php) dumps
the content to a file as it is represented in memory (cache), including
the dirty flag. This has as a consequence that everything marked dirty
may prevent the user from subsequent changes: if there's another instance
of the Prefs class that's destroying after the instance that made the
changes, the changes will be overwritten with the original content and
seemingly nothing will have changed. I stumbled upon the bug when trying
out the cyrus, imp and kolab: I set up e-mail filters, but after logging
out and again logging in I couldn't add any more filters: they were added
in the GUI, but in fact they weren't written to the disk, which could be
confirmed by a logout/login cycle.
I changed the relevant file (lib/Horde/Prefs/file.php) so, that the
store() function clears dirty flags before writing the content to the
file. This removes the bug.
The relevant patch is:

--- lib/Horde/Prefs/file.php.orig	2008-09-10 12:31:51.000000000 +0200
+++ lib/Horde/Prefs/file.php	2009-07-22 16:56:27.000000000 +0200
@@ -209,6 +209,7 @@
                  }

                  $this->_file_cache[$scope][$name] = $pref;
+                $this->_file_cache[$scope][$name]['m'] &= ~_PREF_DIRTY;
              }
          }







More information about the bugs mailing list