From: pdontthink Date: Fri, 21 Nov 2008 02:51:13 +0000 (+0000) Subject: Use sq_is_writable() X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=0a496c763fc9c26c8d5915ad64dbf1e9bdba62b3;p=squirrelmail.git Use sq_is_writable() git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13325 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/abook_local_file.php b/functions/abook_local_file.php index 22a7932b..d29474f6 100644 --- a/functions/abook_local_file.php +++ b/functions/abook_local_file.php @@ -151,7 +151,7 @@ class abook_local_file extends addressbook_backend { $this->error = ''; $file = $this->filename; $create = $this->create; - $fopenmode = (($this->writeable && is_writable($file)) ? 'a+' : 'r'); + $fopenmode = (($this->writeable && sq_is_writable($file)) ? 'a+' : 'r'); /* Return true is file is open and $new is unset */ if($this->filehandle && !$new) { diff --git a/src/configtest.php b/src/configtest.php index d86f0643..095164c2 100644 --- a/src/configtest.php +++ b/src/configtest.php @@ -342,7 +342,7 @@ if(!isset($data_dir_error) && !is_dir($data_dir)) { } } // datadir should be executable - but no clean way to test on that -if(!isset($data_dir_error) && !is_writable($data_dir)) { +if(!isset($data_dir_error) && !sq_is_writable($data_dir)) { if (!empty($prefs_dsn)) { $data_dir_error = "Data dir ($data_dir) is not writable!\n"; echo $IND . 'ERROR: ' . $data_dir_error; @@ -370,7 +370,7 @@ if($data_dir == $attachment_dir) { if (!is_dir($attachment_dir)) { do_err("Attachment dir ($attachment_dir) is not a directory!"); } - if (!is_writable($attachment_dir)) { + if (!sq_is_writable($attachment_dir)) { do_err("I cannot write to attachment dir ($attachment_dir)!"); } echo $IND . "Attachment dir OK.
\n";