WordPress.org

Make WordPress Core

Ticket #18476: filesystem.diff

File filesystem.diff, 2.7 KB (added by kurtpayne, 7 years ago)
  • wp-admin/includes/class-wp-filesystem-ssh2.php

     
    206206                return $this->run_command(sprintf('chmod -R %o %s', $mode, escapeshellarg($file)), true);
    207207        }
    208208
     209        /**
     210         * Change the ownership of a file / folder.
     211         * @param string $file Path to the file.
     212         * @param mixed $owner A user name or number.
     213         * @param bool $recursive (optional) If set True changes file owner recursivly. Defaults to False.
     214         * @return bool Returns true on success or false on failure.
     215         */
    209216        function chown($file, $owner, $recursive = false ) {
    210217                if ( ! $this->exists($file) )
    211218                        return false;
  • wp-admin/includes/class-wp-filesystem-ftpsockets.php

     
    174174                return $this->ftp->chmod($file, $mode);
    175175        }
    176176
    177         function chown($file, $owner, $recursive = false ) {
    178                 return false;
    179         }
    180 
    181177        function owner($file) {
    182178                $dir = $this->dirlist($file);
    183179                return $dir[$file]['owner'];
  • wp-admin/includes/class-wp-filesystem-ftpext.php

     
    168168                        return (bool)@ftp_site($this->link, sprintf('CHMOD %o %s', $mode, $file));
    169169                return (bool)@ftp_chmod($this->link, $mode, $file);
    170170        }
    171         function chown($file, $owner, $recursive = false ) {
    172                 return false;
    173         }
    174171        function owner($file) {
    175172                $dir = $this->dirlist($file);
    176173                return $dir[$file]['owner'];
  • wp-admin/includes/class-wp-filesystem-base.php

     
    327327        function is_binary( $text ) {
    328328                return (bool) preg_match('|[^\x20-\x7E]|', $text); //chr(32)..chr(127)
    329329        }
     330
     331        /**
     332         * Change the ownership of a file / folder.
     333         * Default behavior is to do nothing, override this in your subclass, if desired
     334         * @param string $file Path to the file.
     335         * @param mixed $owner A user name or number.
     336         * @param bool $recursive (optional) If set True changes file owner recursivly. Defaults to False.
     337         * @return bool Returns true on success or false on failure.
     338         */
     339        function chown($file, $owner, $recursive = false ) {
     340                return false;
     341        }
    330342}
    331343
    332344?>