Make WordPress Core

Changeset 11930


Ignore:
Timestamp:
09/14/2009 02:03:32 PM (15 years ago)
Author:
ryan
Message:

Remove trailing whitespace

Location:
trunk
Files:
44 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/comment.php

    r11793 r11930  
    4747    if ( 'trash' == $comment->comment_approved )
    4848        comment_footer_die( __('This comment is in the Trash. Please move it out of the Trash if you want to edit it.') );
    49    
     49
    5050    $comment = get_comment_to_edit( $comment_id );
    5151
     
    171171    $comment_id = absint( $_REQUEST['c'] );
    172172    $noredir = isset($_REQUEST['noredir']);
    173    
     173
    174174    if (!$comment = get_comment($comment_id))
    175175        comment_footer_die( __('Oops, no comment with this ID.') . sprintf(' <a href="%s">'.__('Go back').'</a>!', 'edit-comments.php') );
    176176    if (!current_user_can('edit_post', $comment->comment_post_ID ))
    177177        comment_footer_die( __('You are not allowed to edit comments on this post.') );
    178    
     178
    179179    if ($action == 'trashcomment') {
    180180        check_admin_referer( 'trash-comment_' . $comment_id );
     
    185185        wp_untrash_comment($comment_id);
    186186    }
    187    
     187
    188188    if ('' != wp_get_referer() && false == $noredir && false === strpos(wp_get_referer(), 'comment.php' ))
    189189        wp_redirect( wp_get_referer() );
  • trunk/wp-admin/edit-comments.php

    r11841 r11930  
    2020if ( isset($_REQUEST['doaction']) ||  isset($_REQUEST['doaction2']) || isset($_REQUEST['delete_all']) || isset($_REQUEST['delete_all2']) ) {
    2121    check_admin_referer('bulk-comments');
    22    
     22
    2323    if ((isset($_REQUEST['delete_all']) || isset($_REQUEST['delete_all2'])) && !empty($_REQUEST['pagegen_timestamp'])) {
    2424        $comment_status = $wpdb->escape($_REQUEST['comment_status']);
     
    3030        $doaction = ($_REQUEST['action'] != -1) ? $_REQUEST['action'] : $_REQUEST['action2'];
    3131    } else wp_redirect($_SERVER['HTTP_REFERER']);
    32    
     32
    3333    $approved = $unapproved = $spammed = $trashed = $untrashed = $deleted = 0;
    34    
     34
    3535    foreach ($comment_ids as $comment_id) { // Check the permissions on each
    3636        $_post_id = (int) $wpdb->get_var( $wpdb->prepare( "SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID = %d", $comment_id) );
  • trunk/wp-admin/edit-pages.php

    r11807 r11930  
    4141                if ( !wp_trash_post($post_id) )
    4242                    wp_die( __('Error in moving to trash...') );
    43                
     43
    4444                $trashed++;
    4545            }
     
    5454                if ( !wp_untrash_post($post_id) )
    5555                    wp_die( __('Error in restoring from trash...') );
    56                
     56
    5757                $untrashed++;
    5858            }
  • trunk/wp-admin/edit.php

    r11843 r11930  
    4949                if ( !wp_trash_post($post_id) )
    5050                    wp_die( __('Error in moving to trash...') );
    51                
     51
    5252                $trashed++;
    5353            }
     
    6262                if ( !wp_untrash_post($post_id) )
    6363                    wp_die( __('Error in restoring from trash...') );
    64                
     64
    6565                $untrashed++;
    6666            }
  • trunk/wp-admin/includes/class-pclzip.php

    r11056 r11930  
    3030    define( 'PCLZIP_READ_BLOCK_SIZE', 2048 );
    3131  }
    32  
     32
    3333  // ----- File list separator
    3434  // In version 1.x of PclZip, the separator for file list is a space
     
    6969  // ----- Optional threshold ratio for use of temporary files
    7070  //       Pclzip sense the size of the file to add/extract and decide to
    71   //       use or not temporary file. The algorythm is looking for 
     71  //       use or not temporary file. The algorythm is looking for
    7272  //       memory_limit of PHP and apply a ratio.
    7373  //       threshold = memory_limit * ratio.
     
    153153  define( 'PCLZIP_OPT_TEMP_FILE_OFF', 77022 );
    154154  define( 'PCLZIP_OPT_ADD_TEMP_FILE_OFF', 77022 ); // alias
    155  
     155
    156156  // ----- File description attributes
    157157  define( 'PCLZIP_ATT_FILE_NAME', 79001 );
     
    199199    var $error_code = 1;
    200200    var $error_string = '';
    201    
     201
    202202    // ----- Current status of the magic_quotes_runtime
    203203    // This value store the php configuration for magic_quotes
     
    342342      }
    343343    }
    344    
     344
    345345    // ----- Look for default option values
    346346    $this->privOptionDefaultThreshold($v_options);
     
    351351    $v_filedescr_list = array();
    352352    $p_result_list = array();
    353    
     353
    354354    // ----- Look if the $p_filelist is really an array
    355355    if (is_array($p_filelist)) {
    356    
     356
    357357      // ----- Look if the first element is also an array
    358358      //       This will mean that this is a file description entry
     
    360360        $v_att_list = $p_filelist;
    361361      }
    362      
     362
    363363      // ----- The list is a list of string names
    364364      else {
     
    379379      return 0;
    380380    }
    381    
     381
    382382    // ----- Reformat the string list
    383383    if (sizeof($v_string_list) != 0) {
     
    391391      }
    392392    }
    393    
     393
    394394    // ----- For each file in the list check the attributes
    395395    $v_supported_attributes
     
    550550    $v_filedescr_list = array();
    551551    $p_result_list = array();
    552    
     552
    553553    // ----- Look if the $p_filelist is really an array
    554554    if (is_array($p_filelist)) {
    555    
     555
    556556      // ----- Look if the first element is also an array
    557557      //       This will mean that this is a file description entry
     
    559559        $v_att_list = $p_filelist;
    560560      }
    561      
     561
    562562      // ----- The list is a list of string names
    563563      else {
     
    578578      return 0;
    579579    }
    580    
     580
    581581    // ----- Reformat the string list
    582582    if (sizeof($v_string_list) != 0) {
     
    585585      }
    586586    }
    587    
     587
    588588    // ----- For each file in the list check the attributes
    589589    $v_supported_attributes
     
    10501050  //   PCLZIP_OPT_BY_INDEX :
    10511051  //   PCLZIP_OPT_BY_NAME :
    1052   //   PCLZIP_OPT_BY_EREG : 
     1052  //   PCLZIP_OPT_BY_EREG :
    10531053  //   PCLZIP_OPT_BY_PREG :
    10541054  // Return Values :
     
    11251125  {
    11261126    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::deleteByIndex", "index='$p_index'");
    1127    
     1127
    11281128    $p_list = $this->delete(PCLZIP_OPT_BY_INDEX, $p_index);
    11291129
     
    11791179      {
    11801180        $this->privSwapBackMagicQuotes();
    1181        
     1181
    11821182        // ----- Error log
    11831183        PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode');
     
    15081508    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privParseOptions", "");
    15091509    $v_result=1;
    1510    
     1510
    15111511    // ----- Read the options
    15121512    $i=0;
     
    15531553            return PclZip::errorCode();
    15541554          }
    1555          
     1555
    15561556          // ----- Check for incompatible options
    15571557          if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_OFF])) {
     
    15601560            return PclZip::errorCode();
    15611561          }
    1562          
     1562
    15631563          // ----- Check the value
    15641564          $v_value = $p_options_list[$i+1];
     
    15821582            return PclZip::errorCode();
    15831583          }
    1584          
     1584
    15851585          $v_result_list[$p_options_list[$i]] = true;
    15861586          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'");
     
    16001600            return PclZip::errorCode();
    16011601          }
    1602          
     1602
    16031603          $v_result_list[$p_options_list[$i]] = true;
    16041604          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'");
     
    17641764            return PclZip::errorCode();
    17651765          }
    1766          
     1766
    17671767          // ----- Reduce the index list
    17681768          // each index item in the list must be a couple with a start and
     
    17751775              $v_item_list = explode("-", $v_work_list[$j]);
    17761776              $v_size_item_list = sizeof($v_item_list);
    1777              
     1777
    17781778              // ----- TBC : Here we might check that each item is a
    17791779              // real integer ...
    1780              
     1780
    17811781              // ----- Look for single value
    17821782              if ($v_size_item_list == 1) {
     
    18161816              $v_sort_value = $v_result_list[$p_options_list[$i]][$j]['start'];
    18171817          }
    1818          
     1818
    18191819          // ----- Sort the items
    18201820          if ($v_sort_flag) {
     
    19291929      }
    19301930    }
    1931    
     1931
    19321932    // ----- Look for default values
    19331933    if (!isset($v_result_list[PCLZIP_OPT_TEMP_FILE_THRESHOLD])) {
    19341934      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3,"Calculate auto threshold");
    1935      
     1935
    19361936    }
    19371937
     
    19521952    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privOptionDefaultThreshold", "");
    19531953    $v_result=1;
    1954    
     1954
    19551955    if (isset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD])
    19561956        || isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF])) {
     
    19581958      return $v_result;
    19591959    }
    1960    
     1960
    19611961    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3,"Create an auto-threshold for use of temporay files");
    19621962    // ----- Get 'memory_limit' configuration value
     
    19641964    $v_memory_limit = trim($v_memory_limit);
    19651965    $last = strtolower(substr($v_memory_limit, -1));
    1966  
     1966
    19671967    if($last == 'g')
    19681968        //$v_memory_limit = $v_memory_limit*1024*1024*1024;
     
    19731973    if($last == 'k')
    19741974        $v_memory_limit = $v_memory_limit*1024;
    1975            
     1975
    19761976    $p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] = floor($v_memory_limit*PCLZIP_TEMPORARY_FILE_RATIO);
    1977    
     1977
    19781978    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3,"Current memory usage : ".memory_get_usage(TRUE)." bytes");
    19791979    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3,"Threshold value is : ".$p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]." bytes");
     
    19841984      unset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]);
    19851985    }
    1986          
     1986
    19871987    // ----- Return
    19881988    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
     
    20032003    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privFileDescrParseAtt", "");
    20042004    $v_result=1;
    2005    
     2005
    20062006    // ----- For each file in the list check the attributes
    20072007    foreach ($p_file_list as $v_key => $v_value) {
    2008    
     2008
    20092009      // ----- Check if the option is supported
    20102010      if (!isset($v_requested_options[$v_key])) {
     
    20282028          $p_filedescr['filename'] = PclZipUtilPathReduction($v_value);
    20292029          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($v_key)." = '".$v_value."'");
    2030          
     2030
    20312031          if ($p_filedescr['filename'] == '') {
    20322032            PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty filename for attribute '".PclZipUtilOptionText($v_key)."'");
     
    21242124        }
    21252125      }
    2126    
     2126
    21272127    // end foreach
    21282128    }
    2129    
     2129
    21302130    // ----- Return
    21312131    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
     
    21412141  //   just ignore the item.
    21422142  //   Then prepare the information that will be stored for that file.
    2143   //   When its a folder, expand the folder with all the files that are in that 
     2143  //   When its a folder, expand the folder with all the files that are in that
    21442144  //   folder (recursively).
    21452145  // Parameters :
     
    21522152    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privFileDescrExpand", "");
    21532153    $v_result=1;
    2154    
     2154
    21552155    // ----- Create a result list
    21562156    $v_result_list = array();
    2157    
     2157
    21582158    // ----- Look each entry
    21592159    for ($i=0; $i<sizeof($p_filedescr_list); $i++) {
    21602160      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Looking for file ".$i.".");
    2161      
     2161
    21622162      // ----- Get filedescr
    21632163      $v_descr = $p_filedescr_list[$i];
    2164      
     2164
    21652165      // ----- Reduce the filename
    21662166      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filedescr before reduction :'".$v_descr['filename']."'");
     
    21682168      $v_descr['filename'] = PclZipUtilPathReduction($v_descr['filename']);
    21692169      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filedescr after reduction :'".$v_descr['filename']."'");
    2170      
     2170
    21712171      // ----- Look for real file or folder
    21722172      if (file_exists($v_descr['filename'])) {
     
    21902190        }
    21912191      }
    2192      
     2192
    21932193      // ----- Look for string added as file
    21942194      else if (isset($v_descr['content'])) {
     
    21962196        $v_descr['type'] = 'virtual_file';
    21972197      }
    2198      
     2198
    21992199      // ----- Missing file
    22002200      else {
     
    22072207        return PclZip::errorCode();
    22082208      }
    2209      
     2209
    22102210      // ----- Calculate the stored filename
    22112211      $this->privCalculateStoredFilename($v_descr, $p_options);
    2212      
     2212
    22132213      // ----- Add the descriptor in result list
    22142214      $v_result_list[sizeof($v_result_list)] = $v_descr;
    2215      
     2215
    22162216      // ----- Look for folder
    22172217      if ($v_descr['type'] == 'folder') {
     
    22272227                continue;
    22282228            }
    2229            
     2229
    22302230            // ----- Compose the full filename
    22312231            $v_dirlist_descr[$v_dirlist_nb]['filename'] = $v_descr['filename'].'/'.$v_item_handler;
    2232            
     2232
    22332233            // ----- Look for different stored filename
    22342234            // Because the name of the folder was changed, the name of the
     
    22422242              }
    22432243            }
    2244      
     2244
    22452245            $v_dirlist_nb++;
    22462246          }
    2247          
     2247
    22482248          @closedir($v_folder_handler);
    22492249        }
     
    22522252          // TBC : unable to open folder in read mode
    22532253        }
    2254        
     2254
    22552255        // ----- Expand each element of the list
    22562256        if ($v_dirlist_nb != 0) {
     
    22602260            return $v_result;
    22612261          }
    2262          
     2262
    22632263          // ----- Concat the resulting list
    22642264          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Merging result list (size '".sizeof($v_result_list)."') with dirlist (size '".sizeof($v_dirlist_descr)."')");
     
    22692269          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Nothing in this folder to expand.");
    22702270        }
    2271          
     2271
    22722272        // ----- Free local array
    22732273        unset($v_dirlist_descr);
    22742274      }
    22752275    }
    2276    
     2276
    22772277    // ----- Get the result list
    22782278    $p_filedescr_list = $v_result_list;
     
    22952295    $v_result=1;
    22962296    $v_list_detail = array();
    2297    
     2297
    22982298    // ----- Magic quotes trick
    22992299    $this->privDisableMagicQuotes();
     
    26562656  // Description :
    26572657  // Parameters :
    2658   //   $p_filedescr_list : An array containing the file description 
     2658  //   $p_filedescr_list : An array containing the file description
    26592659  //                      or directory names to add in the zip
    26602660  //   $p_result_list : list of added files with their properties (specially the status field)
     
    26762676      $p_filedescr_list[$j]['filename']
    26772677      = PclZipUtilTranslateWinPath($p_filedescr_list[$j]['filename'], false);
    2678      
     2678
    26792679      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Looking for file '".$p_filedescr_list[$j]['filename']."'");
    26802680
     
    27362736    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privAddFile", "filename='".$p_filedescr['filename']."'");
    27372737    $v_result=1;
    2738    
     2738
    27392739    // ----- Working variable
    27402740    $p_filename = $p_filedescr['filename'];
     
    27492749      return PclZip::errorCode();
    27502750    }
    2751  
    2752     // ----- Look for a stored different filename 
     2751
     2752    // ----- Look for a stored different filename
    27532753    /* TBC : Removed
    27542754    if (isset($p_filedescr['stored_filename'])) {
     
    27872787      $p_header['size'] = filesize($p_filename);
    27882788    }
    2789    
     2789
    27902790    // ----- Look for regular folder
    27912791    else if ($p_filedescr['type']=='folder') {
     
    27942794      $p_header['size'] = filesize($p_filename);
    27952795    }
    2796    
     2796
    27972797    // ----- Look for virtual file
    27982798    else if ($p_filedescr['type'] == 'virtual_file') {
     
    28002800      $p_header['size'] = strlen($p_filedescr['content']);
    28012801    }
    2802    
     2802
    28032803    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Header external extension '".sprintf("0x%X",$p_header['external'])."'");
    28042804
     
    28562856      $p_header['status'] = "filtered";
    28572857    }
    2858    
     2858
    28592859    // ----- Check the path length
    28602860    if (strlen($p_header['stored_filename']) > 0xFF) {
     
    28682868      if ($p_filedescr['type'] == 'file') {
    28692869        // ----- Look for using temporary file to zip
    2870         if ( (!isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF])) 
     2870        if ( (!isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF]))
    28712871            && (isset($p_options[PCLZIP_OPT_TEMP_FILE_ON])
    28722872                || (isset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD])
     
    28772877          }
    28782878        }
    2879        
     2879
    28802880        // ----- Use "in memory" zip algo
    28812881        else {
    2882           //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2,"In memory compression.");     
    2883           //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2,"Current memory usage : ".memory_get_usage(TRUE)." bytes");     
    2884           //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2,"Current memory peak : ".memory_get_peak_usage(TRUE)." bytes");     
     2882          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2,"In memory compression.");
     2883          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2,"Current memory usage : ".memory_get_usage(TRUE)." bytes");
     2884          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2,"Current memory peak : ".memory_get_peak_usage(TRUE)." bytes");
    28852885          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "'".$p_filename."' is a file");
    28862886
     
    28942894        // ----- Read the file content
    28952895        $v_content = @fread($v_file, $p_header['size']);
    2896         //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2,"Memory usage after reading file : ".memory_get_usage(TRUE)." bytes");     
    2897         //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2,"Memory peak after reading file : ".memory_get_peak_usage(TRUE)." bytes");     
     2896        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2,"Memory usage after reading file : ".memory_get_usage(TRUE)." bytes");
     2897        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2,"Memory peak after reading file : ".memory_get_peak_usage(TRUE)." bytes");
    28982898
    28992899        // ----- Close the file
     
    29022902        // ----- Calculate the CRC
    29032903        $p_header['crc'] = @crc32($v_content);
    2904        
     2904
    29052905        // ----- Look for no compression
    29062906        if ($p_options[PCLZIP_OPT_NO_COMPRESSION]) {
     
    29102910          $p_header['compression'] = 0;
    29112911        }
    2912        
     2912
    29132913        // ----- Look for normal compression
    29142914        else {
     
    29162916          // ----- Compress the content
    29172917          $v_content = @gzdeflate($v_content);
    2918           //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2,"Memory usage after gzdeflate : ".memory_get_usage(TRUE)." bytes");     
    2919           //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2,"Memory peak after gzdeflate : ".memory_get_peak_usage(TRUE)." bytes");     
     2918          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2,"Memory usage after gzdeflate : ".memory_get_usage(TRUE)." bytes");
     2919          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2,"Memory peak after gzdeflate : ".memory_get_peak_usage(TRUE)." bytes");
    29202920
    29212921          // ----- Set header parameters
     
    29232923          $p_header['compression'] = 8;
    29242924        }
    2925        
     2925
    29262926        // ----- Call the header generation
    29272927        if (($v_result = $this->privWriteFileHeader($p_header)) != 1) {
     
    29402940      // ----- Look for a virtual file (a file from string)
    29412941      else if ($p_filedescr['type'] == 'virtual_file') {
    2942          
     2942
    29432943        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Add by string");
    29442944        $v_content = $p_filedescr['content'];
     
    29462946        // ----- Calculate the CRC
    29472947        $p_header['crc'] = @crc32($v_content);
    2948        
     2948
    29492949        // ----- Look for no compression
    29502950        if ($p_options[PCLZIP_OPT_NO_COMPRESSION]) {
     
    29542954          $p_header['compression'] = 0;
    29552955        }
    2956        
     2956
    29572957        // ----- Look for normal compression
    29582958        else {
     
    29652965          $p_header['compression'] = 8;
    29662966        }
    2967        
     2967
    29682968        // ----- Call the header generation
    29692969        if (($v_result = $this->privWriteFileHeader($p_header)) != 1) {
     
    30363036    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privAddFileUsingTempFile", "filename='".$p_filedescr['filename']."'");
    30373037    $v_result=PCLZIP_ERR_NO_ERROR;
    3038    
     3038
    30393039    // ----- Working variable
    30403040    $p_filename = $p_filedescr['filename'];
     
    31543154    // ----- Unlink the temporary file
    31553155    @unlink($v_gzip_temp_name);
    3156    
     3156
    31573157    // ----- Return
    31583158    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
     
    31733173    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCalculateStoredFilename", "filename='".$p_filedescr['filename']."'");
    31743174    $v_result=1;
    3175    
     3175
    31763176    // ----- Working variables
    31773177    $p_filename = $p_filedescr['filename'];
     
    32023202      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Changing full name of '".$p_filename."' for '".$v_stored_filename."'");
    32033203    }
    3204    
     3204
    32053205    // ----- Look for path and/or short name change
    32063206    else {
     
    32353235        if (   (substr($p_filename, 0, 2) == "./")
    32363236            || (substr($p_remove_dir, 0, 2) == "./")) {
    3237            
     3237
    32383238          if (   (substr($p_filename, 0, 2) == "./")
    32393239              && (substr($p_remove_dir, 0, 2) != "./")) {
     
    32613261        }
    32623262      }
    3263      
     3263
    32643264      // ----- Remove drive letter if any
    32653265      $v_stored_filename = PclZipUtilTranslateWinPath($v_stored_filename);
    3266      
     3266
    32673267      // ----- Look for path to add
    32683268      if ($p_add_dir != "") {
     
    32793279    $p_filedescr['stored_filename'] = $v_stored_filename;
    32803280    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Stored filename will be '".$p_filedescr['stored_filename']."', strlen ".strlen($p_filedescr['stored_filename']));
    3281    
     3281
    32823282    // ----- Return
    32833283    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
     
    34443444      // ----- Magic quotes trick
    34453445      $this->privSwapBackMagicQuotes();
    3446      
     3446
    34473447      // ----- Error log
    34483448      PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode');
     
    37273727               && ($p_options[PCLZIP_OPT_BY_INDEX] != 0)) {
    37283728          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByIndex'");
    3729          
     3729
    37303730          // ----- Look if the index is in the list
    37313731          for ($j=$j_start; ($j<sizeof($p_options[PCLZIP_OPT_BY_INDEX])) && (!$v_extract); $j++) {
     
    37673767
    37683768              $this->privSwapBackMagicQuotes();
    3769              
     3769
    37703770              PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_COMPRESSION,
    37713771                                   "Filename '".$v_header['stored_filename']."' is "
     
    37773777          }
    37783778      }
    3779      
     3779
    37803780      // ----- Check encrypted files
    37813781      if (($v_extract) && (($v_header['flag'] & 1) == 1)) {
     
    38143814          $v_extract = false;
    38153815      }
    3816      
     3816
    38173817      // ----- Look for real extraction
    38183818      if ($v_extract)
     
    38683868          // ----- Next extracted file
    38693869          $v_nb_extracted++;
    3870          
     3870
    38713871          // ----- Look for user callback abort
    38723872          if ($v_result1 == 2) {
     
    40204020      $p_entry['filename'] = $p_path."/".$p_entry['filename'];
    40214021    }
    4022    
     4022
    40234023    // ----- Check a base_dir_restriction
    40244024    if (isset($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION])) {
     
    40264026      $v_inclusion
    40274027      = PclZipUtilPathInclusion($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION],
    4028                                 $p_entry['filename']); 
     4028                                $p_entry['filename']);
    40294029      if ($v_inclusion == 0) {
    40304030        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_EXTRACT_DIR_RESTRICTION is selected, file is outside restriction");
     
    40564056        $v_result = 1;
    40574057      }
    4058      
     4058
    40594059      // ----- Look for abort result
    40604060      if ($v_result == 2) {
     
    40884088        // ----- Change the file status
    40894089        $p_entry['status'] = "already_a_directory";
    4090        
     4090
    40914091        // ----- Look for PCLZIP_OPT_STOP_ON_ERROR
    40924092        // For historical reason first PclZip implementation does not stop
     
    41734173        if (($v_result = $this->privDirCheck($v_dir_to_check, (($p_entry['external']&0x00000010)==0x00000010))) != 1) {
    41744174          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unable to create path for '".$p_entry['filename']."'");
    4175  
     4175
    41764176          // ----- Change the file status
    41774177          $p_entry['status'] = "path_creation_fail";
    4178  
     4178
    41794179          // ----- Return
    41804180          ////--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
     
    42214221            @fwrite($v_dest_file, $v_binary_data, $v_read_size);
    42224222            */
    4223             @fwrite($v_dest_file, $v_buffer, $v_read_size);           
     4223            @fwrite($v_dest_file, $v_buffer, $v_read_size);
    42244224            $v_size -= $v_read_size;
    42254225          }
     
    42304230          // ----- Change the file mtime
    42314231          touch($p_entry['filename'], $p_entry['mtime']);
    4232          
     4232
    42334233
    42344234        }
     
    42464246
    42474247          // ----- Look for using temporary file to unzip
    4248           if ( (!isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF])) 
     4248          if ( (!isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF]))
    42494249              && (isset($p_options[PCLZIP_OPT_TEMP_FILE_ON])
    42504250                  || (isset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD])
     
    42554255            }
    42564256          }
    4257          
     4257
    42584258          // ----- Look for extract in memory
    42594259          else {
    42604260
    42614261            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Read '".$p_entry['compressed_size']."' compressed bytes");
    4262          
     4262
    42634263            // ----- Read the compressed file in a buffer (one shot)
    42644264            $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']);
    4265            
     4265
    42664266            // ----- Decompress the file
    42674267            $v_file_content = @gzinflate($v_buffer);
     
    42694269            if ($v_file_content === FALSE) {
    42704270              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unable to inflate compressed file");
    4271  
     4271
    42724272              // ----- Change the file status
    42734273              // TBC
    42744274              $p_entry['status'] = "error";
    4275              
     4275
    42764276              //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
    42774277              return $v_result;
    42784278            }
    4279            
     4279
    42804280            // ----- Opening destination file
    42814281            if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) {
    42824282              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Error while opening '".$p_entry['filename']."' in write binary mode");
    4283  
     4283
    42844284              // ----- Change the file status
    42854285              $p_entry['status'] = "write_error";
    4286  
     4286
    42874287              //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
    42884288              return $v_result;
    42894289            }
    4290  
     4290
    42914291            // ----- Write the uncompressed data
    42924292            @fwrite($v_dest_file, $v_file_content, $p_entry['size']);
    42934293            unset($v_file_content);
    4294  
     4294
    42954295            // ----- Closing the destination file
    42964296            @fclose($v_dest_file);
    4297            
     4297
    42984298          }
    42994299
     
    43184318      $p_entry['status'] = "skipped";
    43194319    }
    4320    
     4320
    43214321    // ----- Look for post-extract callback
    43224322    elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) {
     
    43554355    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privExtractFileUsingTempFile', "filename='".$p_entry['filename']."'");
    43564356    $v_result=1;
    4357        
     4357
    43584358    // ----- Creates a temporary file
    43594359    $v_gzip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.gz';
     
    44274427    // ----- Delete the temporary file
    44284428    @unlink($v_gzip_temp_name);
    4429    
     4429
    44304430    // ----- Return
    44314431    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
     
    45164516          // ----- Read the compressed file in a buffer (one shot)
    45174517          $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']);
    4518          
     4518
    45194519          // ----- Decompress the file
    45204520          $v_file_content = gzinflate($v_buffer);
     
    46054605        // ----- Reading the file
    46064606        $v_data = @fread($this->zip_fd, $p_entry['compressed_size']);
    4607        
     4607
    46084608        // ----- Decompress the file
    46094609        if (($p_string = @gzinflate($v_data)) === FALSE) {
     
    49224922          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Bad check "filename_len" : TBC To Be Completed');
    49234923    }
    4924  
     4924
    49254925    // ----- Look for flag bit 3
    49264926    if (($p_local_header['flag'] & 8) == 8) {
     
    50275027        // -----  Add the byte
    50285028        // $v_bytes = ($v_bytes << 8) | Ord($v_byte);
    5029         // Note we mask the old value down such that once shifted we can never end up with more than a 32bit number 
    5030         // Otherwise on systems where we have 64bit integers the check below for the magic number will fail. 
    5031         $v_bytes = ( ($v_bytes & 0xFFFFFF) << 8) | Ord($v_byte); 
     5029        // Note we mask the old value down such that once shifted we can never end up with more than a 32bit number
     5030        // Otherwise on systems where we have 64bit integers the check below for the magic number will fail.
     5031        $v_bytes = ( ($v_bytes & 0xFFFFFF) << 8) | Ord($v_byte);
    50325032
    50335033        // ----- Compare the bytes
     
    53645364                return $v_result;
    53655365            }
    5366            
     5366
    53675367            // ----- Check that local file header is same as central file header
    53685368            if ($this->privCheckFileHeaders($v_local_header,
     
    54575457        //@rename($v_zip_temp_name, $this->zipname);
    54585458        PclZipUtilRename($v_zip_temp_name, $this->zipname);
    5459    
     5459
    54605460        // ----- Destroy the temporary archive
    54615461        unset($v_temp_zip);
    54625462    }
    5463    
     5463
    54645464    // ----- Remove every files : reset the file
    54655465    else if ($v_central_dir['entries'] != 0) {
     
    60096009        }
    60106010      }
    6011      
     6011
    60126012      // ----- Look for skip
    60136013      if ($v_skip > 0) {
     
    60446044    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilPathInclusion", "dir='$p_dir', path='$p_path'");
    60456045    $v_result = 1;
    6046    
     6046
    60476047    // ----- Look for path beginning by ./
    60486048    if (   ($p_dir == '.')
     
    62356235  {
    62366236    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilOptionText", "option='".$p_option."'");
    6237    
     6237
    62386238    $v_list = get_defined_constants();
    62396239    for (reset($v_list); $v_key = key($v_list); next($v_list)) {
     
    62476247        }
    62486248    }
    6249    
     6249
    62506250    $v_result = 'Unknown';
    62516251
  • trunk/wp-admin/includes/class-wp-filesystem-direct.php

    r11831 r11930  
    1919    /**
    2020     * constructor
    21      * 
     21     *
    2222     * @param $arg mixed ingored argument
    2323     */
     
    2828    /**
    2929     * connect filesystem.
    30      * 
     30     *
    3131     * @return bool Returns true on success or false on failure (always true for WP_Filesystem_Direct).
    3232     */
     
    3636    /**
    3737     * Reads entire file into a string
    38      * 
     38     *
    3939     * @param $file string Name of the file to read.
    40      * @return string|bool The function returns the read data or false on failure. 
     40     * @return string|bool The function returns the read data or false on failure.
    4141     */
    4242    function get_contents($file) {
     
    4545    /**
    4646     * Reads entire file into an array
    47      * 
    48      * @param $file string Path to the file. 
    49      * @return array|bool the file contents in an array or false on failure. 
     47     *
     48     * @param $file string Path to the file.
     49     * @return array|bool the file contents in an array or false on failure.
    5050     */
    5151    function get_contents_array($file) {
     
    5454    /**
    5555     * Write a string to a file
    56      * 
    57      * @param $file string Path to the file where to write the data. 
     56     *
     57     * @param $file string Path to the file where to write the data.
    5858     * @param $contents string The data to write.
    5959     * @param $mode int (optional) The file permissions as octal number, usually 0644.
     
    7171    /**
    7272     * Gets the current working directory
    73      * 
    74      * @return string|bool the current working directory on success, or false on failure. 
     73     *
     74     * @return string|bool the current working directory on success, or false on failure.
    7575     */
    7676    function cwd() {
     
    8080     * Change directory
    8181     *
    82      * @param $dir string The new current directory. 
     82     * @param $dir string The new current directory.
    8383     * @return bool Returns true on success or false on failure.
    8484     */
     
    8888    /**
    8989     * Changes file group
    90      * 
    91      * @param $file string Path to the file. 
     90     *
     91     * @param $file string Path to the file.
    9292     * @param $group mixed A group name or number.
    93      * @param $recursive bool (optional) If set True changes file group recursivly. Defaults to False. 
     93     * @param $recursive bool (optional) If set True changes file group recursivly. Defaults to False.
    9494     * @return bool Returns true on success or false on failure.
    9595     */
     
    111111    /**
    112112     * Changes filesystem permissions
    113      * 
     113     *
    114114     * @param $file string Path to the file.
    115115     * @param $mode int (optional) The permissions as octal number, usually 0644 for files, 0755 for dirs.
    116      * @param $recursive bool (optional) If set True changes file group recursivly. Defaults to False. 
     116     * @param $recursive bool (optional) If set True changes file group recursivly. Defaults to False.
    117117     * @return bool Returns true on success or false on failure.
    118118     */
     
    127127                $mode = FS_CHMOD_DIR;
    128128            else
    129                 return false;   
     129                return false;
    130130        }
    131131
     
    144144    /**
    145145     * Changes file owner
    146      * 
    147      * @param $file string Path to the file. 
     146     *
     147     * @param $file string Path to the file.
    148148     * @param $owner mixed A user name or number.
    149      * @param $recursive bool (optional) If set True changes file owner recursivly. Defaults to False. 
     149     * @param $recursive bool (optional) If set True changes file owner recursivly. Defaults to False.
    150150     * @return bool Returns true on success or false on failure.
    151151     */
     
    166166    /**
    167167     * Gets file owner
    168      * 
    169      * @param $file string Path to the file. 
     168     *
     169     * @param $file string Path to the file.
    170170     * @return string Username of the user.
    171171     */
     
    181181    /**
    182182     * Gets file permissions
    183      * 
     183     *
    184184     * FIXME does not handle errors in fileperms()
    185      * 
    186      * @param $file string Path to the file. 
     185     *
     186     * @param $file string Path to the file.
    187187     * @return string Mode of the file (last 4 digits).
    188188     */
  • trunk/wp-admin/includes/class-wp-filesystem-ftpext.php

    r11831 r11930  
    150150                $mode = FS_CHMOD_DIR;
    151151            else
    152                 return false;   
     152                return false;
    153153        }
    154154
  • trunk/wp-admin/includes/class-wp-filesystem-ftpsockets.php

    r11831 r11930  
    161161                $mode = FS_CHMOD_DIR;
    162162            else
    163                 return false;   
     163                return false;
    164164        }
    165165
  • trunk/wp-admin/includes/class-wp-filesystem-ssh2.php

    r11831 r11930  
    195195                $mode = FS_CHMOD_DIR;
    196196            else
    197                 return false;   
     197                return false;
    198198        }
    199199
  • trunk/wp-admin/includes/class-wp-upgrader.php

    r11926 r11930  
    571571            return false;
    572572        }
    573        
     573
    574574        $r = $current->response[ $theme ];
    575575
     
    10071007            $stylesheet = $this->upgrader->result['destination_name'];
    10081008            $template = !empty($theme_info['Template']) ? $theme_info['Template'] : $stylesheet;
    1009    
     1009
    10101010            $preview_link = htmlspecialchars( add_query_arg( array('preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'TB_iframe' => 'true' ), trailingslashit(esc_url(get_option('home'))) ) );
    10111011            $activate_link = wp_nonce_url("themes.php?action=activate&amp;template=" . urlencode($template) . "&amp;stylesheet=" . urlencode($stylesheet), 'switch-theme_' . $template);
    1012    
     1012
    10131013            $update_actions =  array(
    10141014                'preview' => '<a href="' . $preview_link . '" class="thickbox thickbox-preview" title="' . esc_attr(sprintf(__('Preview &#8220;%s&#8221;'), $name)) . '">' . __('Preview') . '</a>',
  • trunk/wp-admin/includes/export.php

    r11774 r11930  
    269269            if ( 'revision' == $post->post_type )
    270270                continue;
    271             setup_postdata($post); 
     271            setup_postdata($post);
    272272
    273273            $is_sticky = 0;
  • trunk/wp-admin/includes/file.php

    r11823 r11930  
    599599        if( ! file_exists($abstraction_file) )
    600600            return;
    601    
     601
    602602        require_once($abstraction_file);
    603603    }
  • trunk/wp-admin/includes/image-edit.php

    r11911 r11930  
    4343        <div onclick="imageEdit.flip(1, <?php echo "$post_id, '$nonce'"; ?>)" class="imgedit-fliph" title="<?php echo esc_attr__( 'Flip horizontally' ); ?>"></div>
    4444        <div onclick="imageEdit.flip(2, <?php echo "$post_id, '$nonce'"; ?>)" class="imgedit-flipv" title="<?php echo esc_attr__( 'Flip vertically' ); ?>"></div>
    45        
     45
    4646        <div id="image-undo-<?php echo $post_id; ?>" onclick="imageEdit.undo(<?php echo "$post_id, '$nonce'"; ?>)" class="imgedit-undo disabled" title="<?php echo esc_attr__( 'Undo' ); ?>"></div>
    4747        <div id="image-redo-<?php echo $post_id; ?>" onclick="imageEdit.redo(<?php echo "$post_id, '$nonce'"; ?>)" class="imgedit-redo disabled" title="<?php echo esc_attr__( 'Redo' ); ?>"></div>
  • trunk/wp-admin/includes/plugin.php

    r11909 r11930  
    616616        $menu[$position] = $new_menu;
    617617    }
    618    
     618
    619619    $_registered_pages[$hookname] = true;
    620620
     
    624624function add_object_page( $page_title, $menu_title, $access_level, $file, $function = '', $icon_url = '') {
    625625    global $_wp_last_object_menu;
    626    
     626
    627627    $_wp_last_object_menu++;
    628    
     628
    629629    return add_menu_page($page_title, $menu_title, $access_level, $file, $function, $icon_url, $_wp_last_object_menu);
    630630}
     
    632632function add_utility_page( $page_title, $menu_title, $access_level, $file, $function = '', $icon_url = '') {
    633633    global $_wp_last_utility_menu;
    634    
     634
    635635    $_wp_last_utility_menu++;
    636    
     636
    637637    return add_menu_page($page_title, $menu_title, $access_level, $file, $function, $icon_url, $_wp_last_utility_menu);
    638638}
     
    675675    $_registered_pages[$hookname] = true;
    676676    // backwards-compatibility for plugins using add_management page.  See wp-admin/admin.php for redirect from edit.php to tools.php
    677     if ( 'tools.php' == $parent ) 
     677    if ( 'tools.php' == $parent )
    678678        $_registered_pages[get_plugin_page_hookname( $file, 'edit.php')] = true;
    679679
  • trunk/wp-admin/includes/post.php

    r11928 r11930  
    10791079/**
    10801080 * Outputs the notice message to say that someone else is editing this post at the moment.
    1081  * 
     1081 *
    10821082 * @since 2.9.0
    10831083 * @return none
     
    10871087    $last_user = get_userdata( get_post_meta( $post->ID, '_edit_last', true ) );
    10881088    $last_user_name = $last_user ? $last_user->display_name : __('Somebody');
    1089    
     1089
    10901090    switch ($post->post_type) {
    10911091        case 'post':
     
    10981098            $message = __( 'Warning: %s is currently editing this.' );
    10991099    }
    1100    
     1100
    11011101    $message = sprintf( $message, esc_html( $last_user_name ) );
    1102     echo "<div class='error'><p>$message</p></div>";   
     1102    echo "<div class='error'><p>$message</p></div>";
    11031103}
    11041104
  • trunk/wp-admin/includes/template.php

    r11929 r11930  
    20662066        $query .= "AND $approved $post $typesql";
    20672067    }
    2068    
     2068
    20692069    $comments = $wpdb->get_results("SELECT * $query $orderby");
    20702070    if ( '' === $total )
  • trunk/wp-admin/install.php

    r11834 r11930  
    5555        $blog_public = isset($_POST['blog_public']);
    5656    }
    57    
     57
    5858    if ( ! is_null( $error ) ) {
    5959?>
  • trunk/wp-admin/media.php

    r11911 r11930  
    6161    if ( empty($att->ID) ) wp_die( __('You attempted to edit an attachment that doesn&#8217;t exist. Perhaps it was deleted?') );
    6262    if ( $att->post_status == 'trash' ) wp_die( __('You can&#8217;t edit this attachment because it is in the Trash. Please move it out of the Trash and try again.') );
    63    
     63
    6464    add_filter('attachment_fields_to_edit', 'media_single_attachment_fields_to_edit', 10, 2);
    6565
  • trunk/wp-admin/menu-header.php

    r11582 r11930  
    132132                if ( ( ('index.php' != $sub_item[2]) && file_exists(WP_PLUGIN_DIR . "/$sub_file") ) || ! empty($menu_hook) ) {
    133133                    // If admin.php is the current page or if the parent exists as a file in the plugins or admin dir
    134                    
     134
    135135                    $parent_exists = (!$admin_is_parent && file_exists(WP_PLUGIN_DIR . "/$menu_file") && !is_dir(WP_PLUGIN_DIR . "/{$item[2]}") ) || file_exists($menu_file);
    136136                    if ( $parent_exists )
  • trunk/wp-admin/plugins.php

    r11761 r11930  
    6262            if ( ! current_user_can('activate_plugins') )
    6363                wp_die(__('You do not have sufficient permissions to activate plugins for this blog.'));
    64            
     64
    6565            check_admin_referer('bulk-manage-plugins');
    6666
  • trunk/wp-admin/upgrade.php

    r11610 r11930  
    6969    case 1:
    7070        wp_upgrade();
    71            
     71
    7272            $backto = empty($_GET['backto']) ? '' : $_GET['backto'] ;
    7373            $backto = stripslashes( urldecode( $backto ) );
  • trunk/wp-admin/upload.php

    r11841 r11930  
    7070} elseif ( isset($_GET['doaction']) || isset($_GET['doaction2']) || isset($_GET['delete_all']) || isset($_GET['delete_all2']) ) {
    7171    check_admin_referer('bulk-media');
    72    
     72
    7373    if ( isset($_GET['delete_all']) || isset($_GET['delete_all2']) ) {
    7474        $post_ids = $wpdb->get_col( "SELECT ID FROM $wpdb->posts WHERE post_type='attachment' AND post_status = 'trash'" );
     
    7979    } else
    8080        wp_redirect($_SERVER['HTTP_REFERER']);
    81    
     81
    8282    $location = 'upload.php';
    8383    if ( $referer = wp_get_referer() ) {
     
    9191                if ( !current_user_can('delete_post', $post_id) )
    9292                    wp_die( __('You are not allowed to move this post to the trash.') );
    93                
     93
    9494                if ( !wp_trash_post($post_id) )
    9595                    wp_die( __('Error in moving to trash...') );
     
    101101                if ( !current_user_can('delete_post', $post_id) )
    102102                    wp_die( __('You are not allowed to move this post out of the trash.') );
    103                
     103
    104104                if ( !wp_untrash_post($post_id) )
    105105                    wp_die( __('Error in restoring from trash...') );
     
    111111                if ( !current_user_can('delete_post', $post_id_del) )
    112112                    wp_die( __('You are not allowed to delete this post.') );
    113    
     113
    114114                if ( !wp_delete_attachment($post_id_del) )
    115115                    wp_die( __('Error in deleting...') );
  • trunk/wp-admin/user-edit.php

    r11929 r11930  
    274274    <th><label for="<?php echo $name; ?>"><?php echo apply_filters('user_'.$name.'_label', $desc); ?></label></th>
    275275    <td><input type="text" name="<?php echo $name; ?>" id="<?php echo $name; ?>" value="<?php echo esc_attr($profileuser->$name) ?>" class="regular-text" /></td>
    276 </tr>   
     276</tr>
    277277<?php
    278278    }
  • trunk/wp-app.php

    r11812 r11930  
    782782
    783783        $location = get_post_meta($entry['ID'], '_wp_attached_file', true);
    784         $location = get_option ('upload_path') . '/' . $location; 
     784        $location = get_option ('upload_path') . '/' . $location;
    785785        $filetype = wp_check_filetype($location);
    786786
     
    792792        header('Connection: close');
    793793
    794         if ($fp = fopen($location, "rb")) { 
    795             status_header('200'); 
    796             header('Content-Type: ' . $entry['post_mime_type']); 
     794        if ($fp = fopen($location, "rb")) {
     795            status_header('200');
     796            header('Content-Type: ' . $entry['post_mime_type']);
    797797            header('Connection: close');
    798798
  • trunk/wp-includes/canonical.php

    r11869 r11930  
    9696            }
    9797        } elseif ( is_single() && !empty($_GET['name'])  && ! $redirect_url ) {
    98             if ( $redirect_url = get_permalink( $wp_query->get_queried_object_id() ) ) 
    99                 $redirect['query'] = remove_query_arg('name', $redirect['query']); 
     98            if ( $redirect_url = get_permalink( $wp_query->get_queried_object_id() ) )
     99                $redirect['query'] = remove_query_arg('name', $redirect['query']);
    100100        } elseif ( is_page() && !empty($_GET['page_id']) && ! $redirect_url ) {
    101101            if ( $redirect_url = get_permalink(get_query_var('page_id')) )
  • trunk/wp-includes/class-json.php

    r11877 r11930  
    267267    function _encode($var)
    268268    {
    269        
     269
    270270        switch (gettype($var)) {
    271271            case 'boolean':
  • trunk/wp-includes/classes.php

    r11853 r11930  
    215215                    // Trim the query of everything up to the '?'.
    216216                    $query = preg_replace("!^.+\?!", '', $query);
    217                                        
     217
    218218                    // Substitute the substring matches into the query.
    219219                    $query = addslashes(WP_MatchesMapRegex::apply($query, $matches));
     
    15951595/**
    15961596 * Helper class to remove the need to use eval to replace $matches[] in query strings.
    1597  * 
     1597 *
    15981598 * @since 2.9.0
    15991599 */
     
    16011601    /**
    16021602     * store for matches
    1603      * 
     1603     *
    16041604     * @access private
    16051605     * @var array
    16061606     */
    16071607    var $_matches;
    1608    
     1608
    16091609    /**
    16101610     * store for mapping result
    1611      * 
     1611     *
    16121612     * @access public
    16131613     * @var string
    16141614     */
    16151615    var $output;
    1616    
     1616
    16171617    /**
    16181618     * subject to perform mapping on (query string containing $matches[] references
    1619      * 
     1619     *
    16201620     * @access private
    16211621     * @var string
    16221622     */
    16231623    var $_subject;
    1624    
    1625     /**
    1626      * regexp pattern to match $matches[] references 
    1627      * 
     1624
     1625    /**
     1626     * regexp pattern to match $matches[] references
     1627     *
    16281628     * @var string
    16291629     */
    16301630    var $_pattern = '(\$matches\[[1-9]+[0-9]*\])'; // magic number
    1631    
     1631
    16321632    /**
    16331633     * constructor
    1634      * 
     1634     *
    16351635     * @param string $subject subject if regex
    16361636     * @param array  $matches data to use in map
    16371637     * @return self
    1638      */                     
     1638     */
    16391639    function WP_MatchesMapRegex($subject, $matches) {
    16401640        $this->_subject = $subject;
    16411641        $this->_matches = $matches;
    1642         $this->output = $this->_map();             
    1643     }
    1644    
     1642        $this->output = $this->_map();
     1643    }
     1644
    16451645    /**
    16461646     * Substitute substring matches in subject.
    1647      * 
     1647     *
    16481648     * static helper function to ease use
    1649      * 
     1649     *
    16501650     * @access public
    16511651     * @param string $subject subject
     
    16551655    function apply($subject, $matches) {
    16561656        $oSelf =& new WP_MatchesMapRegex($subject, $matches);
    1657         return $oSelf->output;                                                             
    1658     }
    1659    
    1660     /**
    1661      * do the actual mapping 
    1662      * 
     1657        return $oSelf->output;
     1658    }
     1659
     1660    /**
     1661     * do the actual mapping
     1662     *
    16631663     * @access private
    16641664     * @return string
     
    16681668        return preg_replace_callback($this->_pattern, $callback, $this->_subject);
    16691669    }
    1670    
     1670
    16711671    /**
    16721672     * preg_replace_callback hook
    1673      * 
     1673     *
    16741674     * @access public
    16751675     * @param  array $matches preg_replace regexp matches
     
    16801680        return ( isset( $this->_matches[$index] ) ? $this->_matches[$index] : '' );
    16811681    }
    1682    
     1682
    16831683}
    16841684
  • trunk/wp-includes/comment-template.php

    r11895 r11930  
    836836    /**
    837837     * The email address of the current comment author escaped for use in attributes.
    838      */ 
     838     */
    839839    $comment_author_email = $commenter['comment_author_email'];  // Escaped by sanitize_comment_cookies()
    840840
    841841    /**
    842842     * The url of the current comment author escaped for use in attributes.
    843      */ 
     843     */
    844844    $comment_author_url = esc_url($commenter['comment_author_url']);
    845845
  • trunk/wp-includes/comment.php

    r11860 r11930  
    735735    if (wp_get_comment_status($comment_id) != 'trash' && wp_get_comment_status($comment_id) != 'spam' && EMPTY_TRASH_DAYS > 0)
    736736        return wp_trash_comment($comment_id);
    737    
     737
    738738    do_action('delete_comment', $comment_id);
    739    
     739
    740740    $trash_meta = get_option('wp_trash_meta');
    741741    if (is_array($trash_meta) && isset($trash_meta['comments'][$comment_id])) {
     
    10941094function wp_set_comment_status($comment_id, $comment_status, $wp_error = false) {
    10951095    global $wpdb;
    1096        
     1096
    10971097    $status = '0';
    10981098    switch ( $comment_status ) {
  • trunk/wp-includes/formatting.php

    r11929 r11930  
    3333    $textarr = preg_split('/(<.*>|\[.*\])/Us', $text, -1, PREG_SPLIT_DELIM_CAPTURE);
    3434    $stop = count($textarr);
    35    
     35
    3636    /* translators: opening curly quote */
    3737    $opening_quote = _x('&#8220;', 'opening curly quote');
    3838    /* translators: closing curly quote */
    3939    $closing_quote = _x('&#8221;', 'closing curly quote');
    40    
     40
    4141    $no_texturize_tags = apply_filters('no_texturize_tags', array('pre', 'code', 'kbd', 'style', 'script', 'tt'));
    4242    $no_texturize_shortcodes = apply_filters('no_texturize_shortcodes', array('code'));
     
    13271327    $img = $wpsmiliestrans[$smiley];
    13281328    $smiley_masked = esc_attr($smiley);
    1329    
     1329
    13301330    $srcurl = apply_filters('smilies_src', "$siteurl/wp-includes/images/smilies/$img", $img, $siteurl);
    13311331
     
    20882088/**
    20892089 * Perform a deep string replace operation to ensure the values in $search are no longer present
    2090  * 
     2090 *
    20912091 * Repeats the replacement operation until it no longer replaces anything so as to remove "nested" values
    20922092 * e.g. $subject = '%0%0%0DDD', $search ='%0D', $result ='' rather than the '%0%0DD' that
    20932093 * str_replace would return
    2094  * 
     2094 *
    20952095 * @since 2.8.1
    20962096 * @access private
    2097  * 
     2097 *
    20982098 * @param string|array $search
    20992099 * @param string $subject
     
    21112111        }
    21122112    }
    2113    
     2113
    21142114    return $subject;
    21152115}
  • trunk/wp-includes/functions.php

    r11903 r11930  
    33093309        } else {
    33103310            // It's inside a continent group
    3311            
     3311
    33123312            // Continent optgroup
    33133313            if ( !isset( $zonen[$key - 1] ) || $zonen[$key - 1]['continent'] !== $zone['continent'] ) {
     
    33153315                $structure[] = '<optgroup label="'. esc_attr( $label ) .'">';
    33163316            }
    3317            
     3317
    33183318            // Add the city to the value
    33193319            $value[] = $zone['city'];
     
    33433343        }
    33443344        $structure[] = '<option ' . $selected . 'value="' . esc_attr( $value ) . '">' . esc_html( $display ) . "</option>";
    3345        
     3345
    33463346        // Close continent optgroup
    33473347        if ( !empty( $zone['city'] ) && ( !isset($zonen[$key + 1]) || (isset( $zonen[$key + 1] ) && $zonen[$key + 1]['continent'] !== $zone['continent']) ) ) {
     
    33653365/**
    33663366 * Permanently deletes posts, pages, attachments, and comments which have been in the trash for EMPTY_TRASH_DAYS.
    3367  * 
     3367 *
    33683368 * @since 2.9.0
    33693369 *
     
    33743374
    33753375    $delete_timestamp = time() - (60*60*24*EMPTY_TRASH_DAYS);
    3376    
     3376
    33773377    $posts_to_delete = $wpdb->get_results($wpdb->prepare("SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_wp_trash_meta_time' AND meta_value < '%d'", $delete_timestamp), ARRAY_A);
    3378    
     3378
    33793379    foreach ( (array) $posts_to_delete as $post ) {
    33803380        wp_delete_post($post['post_id']);
     
    33823382
    33833383    //Trashed Comments
    3384     //TODO Come up with a better store for the comment trash meta. 
     3384    //TODO Come up with a better store for the comment trash meta.
    33853385    $trash_meta = get_option('wp_trash_meta');
    33863386    if ( !is_array($trash_meta) )
  • trunk/wp-includes/http.php

    r11835 r11930  
    18141814     * Decompression of deflated string while staying compatible with the majority of servers.
    18151815     *
    1816      * Certain Servers will return deflated data with headers which PHP's gziniflate() 
     1816     * Certain Servers will return deflated data with headers which PHP's gziniflate()
    18171817     * function cannot handle out of the box. The following function lifted from
    1818      * http://au2.php.net/manual/en/function.gzinflate.php#77336 will attempt to deflate 
    1819      * the various return forms used. 
     1818     * http://au2.php.net/manual/en/function.gzinflate.php#77336 will attempt to deflate
     1819     * the various return forms used.
    18201820     *
    18211821     * @since 2.8.1
  • trunk/wp-includes/kses.php

    r11828 r11930  
    11771177
    11781178    $css_array = split( ';', trim( $css ) );
    1179     $allowed_attr = apply_filters( 'safe_style_css', array( 'text-align', 'margin', 'color', 'float', 
    1180     'border', 'background', 'background-color', 'border-bottom', 'border-bottom-color', 
     1179    $allowed_attr = apply_filters( 'safe_style_css', array( 'text-align', 'margin', 'color', 'float',
     1180    'border', 'background', 'background-color', 'border-bottom', 'border-bottom-color',
    11811181    'border-bottom-style', 'border-bottom-width', 'border-collapse', 'border-color', 'border-left',
    1182     'border-left-color', 'border-left-style', 'border-left-width', 'border-right', 'border-right-color', 
    1183     'border-right-style', 'border-right-width', 'border-spacing', 'border-style', 'border-top', 
    1184     'border-top-color', 'border-top-style', 'border-top-width', 'border-width', 'caption-side', 
    1185     'clear', 'cursor', 'direction', 'font', 'font-family', 'font-size', 'font-style', 
    1186     'font-variant', 'font-weight', 'height', 'letter-spacing', 'line-height', 'margin-bottom', 
    1187     'margin-left', 'margin-right', 'margin-top', 'overflow', 'padding', 'padding-bottom', 
    1188     'padding-left', 'padding-right', 'padding-top', 'text-decoration', 'text-indent', 'vertical-align', 
     1182    'border-left-color', 'border-left-style', 'border-left-width', 'border-right', 'border-right-color',
     1183    'border-right-style', 'border-right-width', 'border-spacing', 'border-style', 'border-top',
     1184    'border-top-color', 'border-top-style', 'border-top-width', 'border-width', 'caption-side',
     1185    'clear', 'cursor', 'direction', 'font', 'font-family', 'font-size', 'font-style',
     1186    'font-variant', 'font-weight', 'height', 'letter-spacing', 'line-height', 'margin-bottom',
     1187    'margin-left', 'margin-right', 'margin-top', 'overflow', 'padding', 'padding-bottom',
     1188    'padding-left', 'padding-right', 'padding-top', 'text-decoration', 'text-indent', 'vertical-align',
    11891189    'width' ) );
    11901190
  • trunk/wp-includes/link-template.php

    r11906 r11930  
    16491649function get_shortcut_link() {
    16501650    $link = "javascript:
    1651             var d=document, 
    1652             w=window, 
    1653             e=w.getSelection, 
    1654             k=d.getSelection, 
     1651            var d=document,
     1652            w=window,
     1653            e=w.getSelection,
     1654            k=d.getSelection,
    16551655            x=d.selection,
    16561656            s=(e?e():(k)?k():(x?x.createRange().text:0)),
  • trunk/wp-includes/media.php

    r11911 r11930  
    350350
    351351    imagecopyresampled( $newimage, $image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h);
    352    
     352
    353353    // convert from full colors to index colors, like original PNG.
    354354    if ( IMAGETYPE_PNG == $orig_type && !imageistruecolor( $image ) )
     
    379379        // all other formats are converted to jpg
    380380        $destfilename = "{$dir}/{$name}-{$suffix}.jpg";
    381         if ( !imagejpeg( $newimage, $destfilename, apply_filters( 'jpeg_quality', $jpeg_quality, 'image_resize' ) ) ) 
     381        if ( !imagejpeg( $newimage, $destfilename, apply_filters( 'jpeg_quality', $jpeg_quality, 'image_resize' ) ) )
    382382            return new WP_Error('resize_path_invalid', __( 'Resize path invalid' ));
    383383    }
     
    838838            case 'image/gif':
    839839                return function_exists('imagecreatefromgif');
    840         }       
     840        }
    841841    }
    842842    return false;
  • trunk/wp-includes/pluggable.php

    r11905 r11930  
    999999        $notify_message .= __('Excerpt: ') . "\r\n" . $comment->comment_content . "\r\n\r\n";
    10001000        $notify_message .= __('You can see all trackbacks on this post here: ') . "\r\n";
    1001         /* translators: 1: blog name, 2: post title */     
     1001        /* translators: 1: blog name, 2: post title */
    10021002        $subject = sprintf( __('[%1$s] Trackback: "%2$s"'), $blogname, $post->post_title );
    10031003    } elseif ('pingback' == $comment_type) {
  • trunk/wp-includes/post.php

    r11911 r11930  
    136136
    137137    $children = get_posts( $r );
    138    
     138
    139139    if ( !$children )
    140140        return $kids;
     
    584584
    585585    wp_cache_delete($post_id, 'post_meta');
    586    
     586
    587587    do_action( 'deleted_post_meta', $meta_id, $post_id, $meta_key, $meta_value );
    588588
     
    673673
    674674    do_action( 'update_post_meta', $meta_id, $post_id, $meta_key, $meta_value );
    675    
     675
    676676    $wpdb->update( $wpdb->postmeta, $data, $where );
    677677    wp_cache_delete($post_id, 'post_meta');
    678    
     678
    679679    do_action( 'updated_post_meta', $meta_id, $post_id, $meta_key, $meta_value );
    680    
     680
    681681    return true;
    682682}
     
    11551155    if ( ($post->post_type == 'post' || $post->post_type == 'page') && get_post_status($postid) != 'trash' && EMPTY_TRASH_DAYS > 0 )
    11561156        return wp_trash_post($postid);
    1157        
     1157
    11581158    if ( $post->post_type == 'attachment' )
    11591159        return wp_delete_attachment($postid);
    11601160
    11611161    do_action('delete_post', $postid);
    1162    
     1162
    11631163    delete_post_meta($postid,'_wp_trash_meta_status');
    11641164    delete_post_meta($postid,'_wp_trash_meta_time');
     
    18201820    if ( in_array( $post_status, array( 'draft', 'pending' ) ) )
    18211821        return $slug;
    1822    
     1822
    18231823    global $wpdb, $wp_rewrite;
    18241824    $hierarchical_post_types = apply_filters('hierarchical_post_types', array('page'));
     
    18271827        $check_sql = "SELECT post_name FROM $wpdb->posts WHERE post_name = %s AND ID != %d LIMIT 1";
    18281828        $post_name_check = $wpdb->get_var($wpdb->prepare($check_sql, $slug, $post_ID));
    1829        
     1829
    18301830        if ( $post_name_check || in_array($slug, $wp_rewrite->feeds) ) {
    18311831            $suffix = 2;
     
    18421842        $check_sql = "SELECT post_name FROM $wpdb->posts WHERE post_name = %s AND post_type IN ( '" . implode("', '", $wpdb->escape($hierarchical_post_types)) . "' ) AND ID != %d AND post_parent = %d LIMIT 1";
    18431843        $post_name_check = $wpdb->get_var($wpdb->prepare($check_sql, $slug, $post_ID, $post_parent));
    1844        
     1844
    18451845        if ( $post_name_check || in_array($slug, $wp_rewrite->feeds) ) {
    18461846            $suffix = 2;
     
    18561856        $check_sql = "SELECT post_name FROM $wpdb->posts WHERE post_name = %s AND post_type = %s AND ID != %d LIMIT 1";
    18571857        $post_name_check = $wpdb->get_var($wpdb->prepare($check_sql, $slug, $post_type, $post_ID));
    1858        
     1858
    18591859        if ( $post_name_check || in_array($slug, $wp_rewrite->feeds) ) {
    18601860            $suffix = 2;
  • trunk/wp-includes/query.php

    r11822 r11930  
    26982698
    26992699    do_action_ref_array('the_post', array(&$post));
    2700    
     2700
    27012701    return true;
    27022702}
  • trunk/wp-includes/registration.php

    r11929 r11930  
    307307 *
    308308 * @access private
    309  * @since 
     309 * @since
    310310 *
    311311 * @return array $user_contactmethods Array of contact methods and their labels.
  • trunk/wp-includes/script-loader.php

    r11928 r11930  
    453453    // Register "meta" stylesheet for admin colors. All colors-* style sheets should have the same version string.
    454454    $styles->add( 'colors', true, array(), $colors_version );
    455    
     455
    456456    // do not refer to these directly, the right one is queued by the above "meta" colors handle
    457457    $styles->add( 'colors-fresh', "/wp-admin/css/colors-fresh$suffix.css", array(), $colors_version);
  • trunk/wp-includes/theme.php

    r11814 r11930  
    605605
    606606    $templates = array();
    607    
     607
    608608    if ( !is_wp_error($category) )
    609609        $templates[] = "category-{$category->slug}.php";
    610610
    611611    $templates[] = "category-$cat_ID.php";
    612     $templates[] = "category.php"; 
    613    
     612    $templates[] = "category.php";
     613
    614614    $template = locate_template($templates);
    615615    return apply_filters('category_template', $template);
  • trunk/wp-includes/user.php

    r11929 r11930  
    421421    wp_cache_delete($user_id, 'users');
    422422
    423     if ( !$cur ) 
     423    if ( !$cur )
    424424        do_action( 'added_usermeta', $wpdb->insert_id, $user_id, $meta_key, $meta_value );
    425425    else
  • trunk/wp-includes/wp-db.php

    r11902 r11930  
    264264    var $old_tables = array('categories', 'post2cat', 'link2cat');
    265265
    266    
     266
    267267    /**
    268268     * Format specifiers for DB columns. Columns not listed here default to %s.  Initialized in wp-settings.php.
  • trunk/wp-login.php

    r11874 r11930  
    6060    if ( $is_iphone ) {
    6161    ?>
    62     <meta name="viewport" content="width=320; initial-scale=0.9; maximum-scale=1.0; user-scalable=0;" /> 
    63     <style type="text/css" media="screen"> 
     62    <meta name="viewport" content="width=320; initial-scale=0.9; maximum-scale=1.0; user-scalable=0;" />
     63    <style type="text/css" media="screen">
    6464    form { margin-left: 0px; }
    6565    #login { margin-top: 20px; }
Note: See TracChangeset for help on using the changeset viewer.