- Timestamp:
- 03/02/2008 08:17:30 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-filesystem-ftpsockets.php
r7126 r7130 5 5 var $errors; 6 6 var $options = array(); 7 7 8 8 var $wp_base = ''; 9 9 var $permission = null; 10 10 11 11 var $filetypes = array( 12 12 'php'=>FTP_ASCII, … … 17 17 'htm'=>FTP_ASCII, 18 18 'xml'=>FTP_ASCII, 19 19 20 20 'jpg'=>FTP_BINARY, 21 21 'png'=>FTP_BINARY, … … 23 23 'bmp'=>FTP_BINARY 24 24 ); 25 25 26 26 function WP_Filesystem_ftpsockets($opt='') { 27 27 $this->errors = new WP_Error(); … … 53 53 54 54 if ( empty ($opt['password']) ) 55 $this->errors->add('empty_password', __('FTP password is required')); 55 $this->errors->add('empty_password', __('FTP password is required')); 56 56 else 57 57 $this->options['password'] = $opt['password']; … … 91 91 if( empty( $base ) ) $base = '/'; 92 92 if( '/' != substr($base, -1) ) $base .= '/'; 93 93 94 94 if($echo) echo __('Changing to ') . $base .'<br>'; 95 95 if( false === $this->ftp->chdir($base) ) … … 158 158 } 159 159 $this->ftp->SetType($type); 160 160 161 161 $temp = tmpfile(); 162 162 fwrite($temp,$contents); … … 174 174 return false; 175 175 } 176 176 177 177 function chmod($file,$mode=false,$recursive=false){ 178 178 if( ! $mode ) … … 192 192 return true; 193 193 } 194 194 195 195 function chown($file,$owner,$recursive=false){ 196 196 return false; 197 197 } 198 198 199 199 function owner($file){ 200 200 $dir = $this->dirlist($file); 201 201 return $dir[$file]['owner']; 202 202 } 203 203 204 204 function getchmod($file){ 205 205 $dir = $this->dirlist($file); … … 235 235 $info = 'u'; 236 236 } 237 237 238 238 // Owner 239 239 $info .= (($perms & 0x0100) ? 'r' : '-'); … … 242 242 (($perms & 0x0800) ? 's' : 'x' ) : 243 243 (($perms & 0x0800) ? 'S' : '-')); 244 244 245 245 // Group 246 246 $info .= (($perms & 0x0020) ? 'r' : '-'); … … 249 249 (($perms & 0x0400) ? 's' : 'x' ) : 250 250 (($perms & 0x0400) ? 'S' : '-')); 251 251 252 252 // World 253 253 $info .= (($perms & 0x0004) ? 'r' : '-'); … … 386 386 $ret = array(); 387 387 foreach ( $list as $struc ) { 388 388 389 389 if ( 'd' == $struc['type'] ) { 390 390 $struc['files'] = array();
Note: See TracChangeset
for help on using the changeset viewer.