Browse Source

Be somewhat clearer in the error message: default_pref not readable
should not return the error dat data_dir is not writable... fixes
#618924.

Thijs Kinkhorst 23 years ago
parent
commit
b93cf928ab
1 changed files with 2 additions and 2 deletions
  1. 2 2
      functions/file_prefs.php

+ 2 - 2
functions/file_prefs.php

@@ -179,9 +179,9 @@ function checkForPrefs($data_dir, $username, $filename = '') {
 
 
         /* Otherwise, report an error. */
         /* Otherwise, report an error. */
         $errTitle = sprintf( _("Error opening %s"), $default_pref );
         $errTitle = sprintf( _("Error opening %s"), $default_pref );
-        if (!file_exists($default_pref)) {
+        if (!is_readable($default_pref)) {
             $errString = $errTitle . "<br>\n" .
             $errString = $errTitle . "<br>\n" .
-                         _("Default preference file not found!") . "<br>\n" .
+                         _("Default preference file not found or not readable!") . "<br>\n" .
                          _("Please contact your system administrator and report this error.") . "<br>\n";
                          _("Please contact your system administrator and report this error.") . "<br>\n";
             include_once(SM_PATH . 'functions/display_messages.php' );
             include_once(SM_PATH . 'functions/display_messages.php' );
             logout_error( $errString, $errTitle );
             logout_error( $errString, $errTitle );