projects
/
squirrelmail.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implement sqextractGlobalVar with sqgetGlobalVar
[squirrelmail.git]
/
functions
/
file_prefs.php
diff --git
a/functions/file_prefs.php
b/functions/file_prefs.php
index c707d52f143988e8a269620aa772ddcebf4d509d..812853d280032e83e46f64f40716f55bba768819 100644
(file)
--- a/
functions/file_prefs.php
+++ b/
functions/file_prefs.php
@@
-3,7
+3,7
@@
/**
* file_prefs.php
*
/**
* file_prefs.php
*
- * Copyright (c) 1999-200
2
The SquirrelMail Project Team
+ * Copyright (c) 1999-200
3
The SquirrelMail Project Team
* Licensed under the GNU GPL. For full terms see the file COPYING.
*
* This contains functions for manipulating user preferences in files
* Licensed under the GNU GPL. For full terms see the file COPYING.
*
* This contains functions for manipulating user preferences in files
@@
-49,7
+49,15
@@
function cachePrefValues($data_dir, $username) {
/* Read in the preferences. */
$highlight_num = 0;
while (! feof($file)) {
/* Read in the preferences. */
$highlight_num = 0;
while (! feof($file)) {
- $pref = trim(fgets($file, 1024));
+ $pref = '';
+ /* keep reading a pref until we reach an eol (\n (or \r for macs)) */
+ while($read = fgets($file, 1024))
+ {
+ $pref .= $read;
+ if(strpos($read,"\n") || strpos($read,"\r"))
+ break;
+ }
+ $pref = trim($pref);
$equalsAt = strpos($pref, '=');
if ($equalsAt > 0) {
$key = substr($pref, 0, $equalsAt);
$equalsAt = strpos($pref, '=');
if ($equalsAt > 0) {
$key = substr($pref, 0, $equalsAt);