_wfile readability

This commit is contained in:
William Knauss
2014-05-13 18:23:27 -04:00
parent 0457fbfba2
commit 0f39cfa75a

View File

@@ -1062,6 +1062,8 @@ class parseCSV {
/**
* Write to local file
*
* @access public
* @param file local filename
* @param string data to write to file
* @param mode fopen() mode
@@ -1071,13 +1073,15 @@ class parseCSV {
function _wfile ($file, $string = '', $mode = 'wb', $lock = 2) {
if ( $fp = fopen($file, $mode) ) {
flock($fp, $lock);
$re = fwrite($fp, $string);
$re = fwrite($fp, $string);
$re2 = fclose($fp);
if ( $re != false && $re2 != false ) return true;
if ( $re != false && $re2 != false ) {
return true;
}
}
return false;
}
}
?>