Make WordPress Core


Ignore:
Timestamp:
05/30/2008 04:14:05 PM (17 years ago)
Author:
ryan
Message:

WP_Filesystem updates from DD32. See #7059

File:
1 edited

Legend:

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

    r8009 r8018  
    55    var $errors = array();
    66    function WP_Filesystem_Direct($arg) {
     7        $this->method = 'direct';
    78        $this->errors = new WP_Error();
    89        $this->permission = umask();
     
    2021        return @file($file);
    2122    }
    22     function put_contents($file,$contents,$mode=false,$type='') {
    23         if ( ! ($fp = @fopen($file,'w' . $type)) )
    24             return false;
    25         @fwrite($fp,$contents);
     23    function put_contents($file, $contents, $mode = false, $type = '') {
     24        if ( ! ($fp = @fopen($file, 'w' . $type)) )
     25            return false;
     26        @fwrite($fp, $contents);
    2627        @fclose($fp);
    2728        $this->chmod($file,$mode);
     
    3435        return @chdir($dir);
    3536    }
    36     function chgrp($file,$group,$recursive=false) {
     37    function chgrp($file, $group, $recursive = false) {
    3738        if( ! $this->exists($file) )
    3839            return false;
     
    4950        return true;
    5051    }
    51     function chmod($file,$mode=false,$recursive=false) {
     52    function chmod($file, $mode = false, $recursive = false) {
    5253        if( ! $mode )
    5354            $mode = $this->permission;
Note: See TracChangeset for help on using the changeset viewer.