Make WordPress Core

Ticket #5984: 5984.wp-content_tmp.diff

File 5984.wp-content_tmp.diff, 621 bytes (added by hansengel, 17 years ago)

Uses wp-content/tmp as a temporary directory

  • wp-admin/includes/file.php

     
    182182        if( ! $url )
    183183                return false;
    184184
    185         $tmpfname = tempnam('/tmp', 'wpupdate');
     185        $tmpfname = tempnam(ABSPATH . 'wp-content/tmp', 'wpupdate');
    186186        if( ! $tmpfname )
    187187                return false;
    188188
     
    288288}
    289289
    290290function get_filesystem_method() {
    291         $tempFile = tempnam('/tmp', 'WPU');
     291        $tempFile = tempnam(ABSPATH . 'wp-content/tmp', 'WPU');
    292292
    293293        if ( getmyuid() == fileowner($tempFile) ) {
    294294                unlink($tempFile);