[pkg-horde] Bug#538027: horde3: saving prefs to files preserves the dirty flag

Aleš Smodiš aless at guru.si
Wed Jul 22 15:16:58 UTC 2009


Package: horde3
Version: 3.2.2+debian0-2
Severity: normal
Tags: patch

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 attached.

-- System Information:
Debian Release: 5.0.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=sl_SI.UTF-8, LC_CTYPE=sl_SI.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages horde3 depends on:
ii  apache2-mpm-prefor 2.2.9-10+lenny2       Apache HTTP Server - traditional n
ii  libapache2-mod-php 5.2.6.dfsg.1-1+lenny3 server-side, HTML-embedded scripti
ii  libjs-scriptaculou 1.8.1-5               JavaScript library for dynamic web
ii  php-log            1.10.0-1              Log module for PEAR
ii  php-mail           1.1.14-1              PHP PEAR module for sending email
ii  php-mail-mime      1.5.2-0.1             PHP PEAR module for creating MIME 
ii  php5-gd            5.2.6.dfsg.1-1+lenny3 GD module for php5
ii  php5-mcrypt        5.2.6.dfsg.1-1+lenny3 MCrypt module for php5

Versions of packages horde3 recommends:
ii  fckeditor          1:2.6.2-1             rich text format javascript web ed
ii  locales            2.7-18                GNU C Library: National Language (
ii  logrotate          3.7.1-5               Log rotation utility
ii  php-date           1.4.7-1               PHP PEAR module for date and time 
ii  php-db             1.7.13-2              PHP PEAR Database Abstraction Laye
ii  php-file           1.3.0-1               PHP Pear modules for common file a
ii  php-services-weath 1.4.2-2               acts as an interface to various on
ii  php5-cli           5.2.6.dfsg.1-1+lenny3 command-line interpreter for the p
ii  php5-ldap          5.2.6.dfsg.1-1+lenny3 LDAP module for php5
ii  php5-mysql         5.2.6.dfsg.1-1+lenny3 MySQL module for php5
ii  tinymce2           2.1.3-1               platform independent web based Jav

Versions of packages horde3 suggests:
pn  chora2             <none>                (no description available)
pn  enscript           <none>                (no description available)
pn  gettext            <none>                (no description available)
pn  gollem             <none>                (no description available)
ii  imp4               4.2-4                 webmail component for horde framew
ii  kronolith2         2.2-1                 calendar component for Horde Frame
pn  libgeoip1          <none>                (no description available)
pn  libwpd-tools       <none>                (no description available)
ii  mnemo2             2.2-2                 notes/memos component for Horde Fr
ii  php-net-imap       1.1.0beta2-1.1        PHP PEAR module implementing IMAP 
pn  php5-auth-pam      <none>                (no description available)
ii  php5-mhash         5.2.6.dfsg.1-1+lenny3 MHASH module for php5
pn  ppthtml            <none>                (no description available)
pn  rpm                <none>                (no description available)
pn  source-highlight   <none>                (no description available)
ii  turba2             2.2.1-2               contact management component for h
pn  unrtf              <none>                (no description available)
pn  webcpp             <none>                (no description available)
pn  wv                 <none>                (no description available)
pn  xlhtml             <none>                (no description available)

-- no debconf information
-------------- next part --------------
--- 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 pkg-horde-hackers mailing list