Changeset 7055

Show
Ignore:
Timestamp:
02/27/08 00:36:33 (9 months ago)
Author:
ryan
Message:

Revert [7054]. No idea how I managed that.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/includes/file.php

    r7054 r7055  
    4141 
    4242    return $real_file; 
    43 } 
    44  
    45 function get_temp_dir() { 
    46     if ( defined('WP_TEMP_DIR') ) 
    47         return trailingslashit(WP_TEMP_DIR); 
    48  
    49     $temp = ABSPATH . 'wp-content/'; 
    50     if ( is_dir($temp) && is_writable($temp) ) 
    51         return $temp; 
    52  
    53     if  ( function_exists('sys_get_temp_dir') ) 
    54         return trailingslashit(sys_get_temp_dir()); 
    55  
    56     return '/tmp/'; 
    5743} 
    5844 
     
    197183        return false; 
    198184 
    199     $tmpfname = tempnam(get_temp_dir(), 'wpupdate'); 
     185    $tmpfname = tempnam('/tmp', 'wpupdate'); 
    200186    if( ! $tmpfname ) 
    201187        return false; 
     
    303289 
    304290function get_filesystem_method() { 
    305     $tempFile = tempnam(get_temp_dir(), 'WPU'); 
     291    $tempFile = tempnam('/tmp', 'WPU'); 
    306292 
    307293    if ( getmyuid() == fileowner($tempFile) ) { 
  • trunk/wp-includes/formatting.php

    r7054 r7055  
    8484    $pee = preg_replace('!(</?' . $allblocks . '[^>]*>)\s*</p>!', "$1", $pee); 
    8585    if ($br) { 
    86         $pee = preg_replace_callback('/<(script|style).*?<\/\\1>/s', create_function('$matches', 'str_replace("\n", "<WPPreserveNewline />", $matches[1])'), $pee); 
     86        $pee = preg_replace('/<(script|style).*?<\/\\1>/se', 'str_replace("\n", "<WPPreserveNewline />", "\\0")', $pee); 
    8787        $pee = preg_replace('|(?<!<br />)\s*\n|', "<br />\n", $pee); // optionally make line breaks 
    8888        $pee = str_replace('<WPPreserveNewline />', "\n", $pee);