Changeset 12723 for trunk/wp-admin/includes/class-wp-filesystem-ftpext.php
- Timestamp:
- 01/14/2010 09:23:53 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-filesystem-ftpext.php
r12369 r12723 112 112 return explode("\n", $this->get_contents($file)); 113 113 } 114 function put_contents($file, $contents, $type = '' ) { 115 if ( empty($type) ) 116 $type = $this->is_binary($contents) ? FTP_BINARY : FTP_ASCII; 117 114 115 function put_contents($file, $contents, $mode = false ) { 118 116 $temp = tmpfile(); 119 117 if ( ! $temp ) … … 123 121 fseek($temp, 0); //Skip back to the start of the file being written to 124 122 123 $type = $this->is_binary($contents) ? FTP_BINARY : FTP_ASCII; 125 124 $ret = @ftp_fput($this->link, $file, $temp, $type); 126 125 127 126 fclose($temp); 127 128 $this->chmod($file, $mode); 129 128 130 return $ret; 129 131 }
Note: See TracChangeset
for help on using the changeset viewer.