Very low priority, I'm sure, but if a Squirrelmail
config.php is unreadable (permissions-wise) by a user
who runs conf.pl, they are presented with the "older
version" error message:
WARNING:
The file "config/config.php" was found, but it is for
an older version of SquirrelMail. It is possible to still
read the defaults from this file but be warned that many
preferences change between versions. It is
recommended that
you start with a clean config.php for each upgrade
that you
do. To do this, just move config/config.php out of
the way.
Continue loading with the old config.php [y/N]?
If the user continues, conf.pl is run with no
information, e.g. no defaults are selected in any of
the configuration dialogs. This dialog is misleading
because it's really due to a stoopid user, and not a
version discrepancy.
Suggest that instead of doing an existence test (-e) of
config.php, do a readable test (-r) or writable test
(-w). This way, if the user can't read config.php, the
system at least loads up config_default.php (with some
actual values) and doesn't give the "older version"
message. It also gives them a new extra seconds to type
away blissfully unaware that they don't have permission
to save their changes.
Relevant section of conf.pl:
############################################################
# First, lets read in the data already in there...
############################################################
if ( -w "config.php" ) {
open( FILE, "config.php" );
while ( $line = <FILE> ) {
Tomas Kuliavas
None
None
Public
|
Date: 2006-10-07 12:00 Logged In: YES |
| Field | Old Value | Date | By |
|---|---|---|---|
| status_id | Open | 2006-10-07 12:00 | tokul |
| resolution_id | None | 2006-10-07 12:00 | tokul |
| close_date | - | 2006-10-07 12:00 | tokul |
| assigned_to | nobody | 2006-10-05 05:20 | tokul |
Copyright © 2010 Geeknet, Inc. All rights reserved. Terms of Use