Make WordPress Core


Ignore:
Timestamp:
01/14/2010 09:23:53 AM (15 years ago)
Author:
dd32
Message:

Standardise WP_Filesystem_*::put_contents() arguments to support chmod reliably across all transports. Fixes #10889

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-filesystem-ssh2.php

    r11934 r12723  
    161161    }
    162162
    163     function put_contents($file, $contents, $type = '' ) {
    164         $file = ltrim($file, '/');
    165         return false !== file_put_contents('ssh2.sftp://' . $this->sftp_link . '/' . $file, $contents);
     163    function put_contents($file, $contents, $mode = false ) {
     164        $file = ltrim($file, '/');
     165        $ret = file_put_contents('ssh2.sftp://' . $this->sftp_link . '/' . $file, $contents);
     166
     167        $this->chmod($file, $mode);
     168
     169        return false !== $ret;
    166170    }
    167171
Note: See TracChangeset for help on using the changeset viewer.