Ticket #5984: 5984.diff

File 5984.diff, 1.2 kB (added by DD32, 9 months ago)
  • wp-admin/includes/file.php

    old new  
    182200        if( ! $url ) 
    183201                return false; 
    184202 
    185         $tmpfname = tempnam('/tmp', 'wpupdate'); 
     203        $tmpfname = tempnam(CACHEDIR, 'wpdownload'); 
    186204        if( ! $tmpfname ) 
    187205                return false; 
    188206 
     
    288306} 
    289307 
    290308function get_filesystem_method() { 
    291         $tempFile = tempnam('/tmp', 'WPU'); 
     309        $tempFile = tempnam(CACHEDIR, 'checkfile'); 
    292310 
    293311        if ( getmyuid() == fileowner($tempFile) ) { 
    294312                unlink($tempFile); 
  • wp-settings.php

    old new  
    323323 */ 
    324324if ( !defined('COOKIE_DOMAIN') ) 
    325325        define('COOKIE_DOMAIN', false); 
     326         
     327/** 
     328 * Cache directory for WordPress, Defined as Absolute to allow for non-WP directories 
     329 * It is possible to define this in wp-config.php 
     330 * @since 2.5.0 
     331 */ 
     332if( ! defined('CACHEDIR') ) 
     333        define('CACHEDIR', ABSPATH . 'wp-content/tmp/'); 
    326334 
    327335require (ABSPATH . WPINC . '/vars.php'); 
    328336