X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/7f1521bf193b382565eb753043c161f4cb3fcda7..53f4633144ed68c8b8fb5861f992b5489894a940:/wp-admin/includes/class-wp-filesystem-ftpsockets.php diff --git a/wp-admin/includes/class-wp-filesystem-ftpsockets.php b/wp-admin/includes/class-wp-filesystem-ftpsockets.php index ec85d36b..879a2e8c 100644 --- a/wp-admin/includes/class-wp-filesystem-ftpsockets.php +++ b/wp-admin/includes/class-wp-filesystem-ftpsockets.php @@ -20,7 +20,11 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base { */ public $ftp; - public function __construct($opt = '') { + /** + * + * @param array $opt + */ + public function __construct( $opt = '' ) { $this->method = 'ftpsockets'; $this->errors = new WP_Error(); @@ -52,6 +56,10 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base { $this->options['password'] = $opt['password']; } + /** + * + * @return bool + */ public function connect() { if ( ! $this->ftp ) return false; @@ -163,6 +171,10 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base { return $ret; } + /** + * + * @return string + */ public function cwd() { $cwd = $this->ftp->pwd(); if ( $cwd ) @@ -170,6 +182,11 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base { return $cwd; } + /** + * + * @param string $file + * @return bool + */ public function chdir($file) { return $this->ftp->chdir($file); } @@ -226,9 +243,9 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base { return $dir[$file]['group']; } /** - * @param string $source - * @param string $destination - * @param bool $overwrite + * @param string $source + * @param string $destination + * @param bool $overwrite * @param int|bool $mode * @return bool */ @@ -245,7 +262,7 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base { /** * @param string $source * @param string $destination - * @param bool $overwrite + * @param bool $overwrite * @return bool */ public function move($source, $destination, $overwrite = false ) { @@ -253,7 +270,7 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base { } /** * @param string $file - * @param bool $recursive + * @param bool $recursive * @param string $type * @return bool */ @@ -359,9 +376,9 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base { /** * @param string $path - * @param mixed $chmod - * @param mixed $chown - * @param mixed $chgrp + * @param mixed $chmod + * @param mixed $chown + * @param mixed $chgrp * @return bool */ public function mkdir($path, $chmod = false, $chown = false, $chgrp = false ) { @@ -387,8 +404,8 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base { /** * @param string $path - * @param bool $include_hidden - * @param bool $recursive + * @param bool $include_hidden + * @param bool $recursive * @return bool|array */ public function dirlist($path = '.', $include_hidden = true, $recursive = false ) { @@ -432,6 +449,9 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base { if ( $struc['islink'] ) $struc['name'] = preg_replace( '/(\s*->\s*.*)$/', '', $struc['name'] ); + // Add the Octal representation of the file permissions + $struc['permsn'] = $this->getnumchmodfromh( $struc['perms'] ); + $ret[ $struc['name'] ] = $struc; } @@ -440,6 +460,9 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base { return $ret; } + /** + * @access public + */ public function __destruct() { $this->ftp->quit(); }