Make WordPress Core

Changeset 7130


Ignore:
Timestamp:
03/02/2008 08:17:30 PM (19 years ago)
Author:
ryan
Message:

Remove trailing whites.

Location:
trunk
Files:
57 edited

Legend:

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

    r7114 r7130  
    2828<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
    2929<title><?php bloginfo('name') ?> &rsaquo; <?php echo wp_specialchars( strip_tags( $title ) ); ?> &#8212; WordPress</title>
    30 <?php 
     30<?php
    3131wp_admin_css( 'css/global' );
    3232wp_admin_css();
  • trunk/wp-admin/bookmarklet.php

    r6782 r7130  
    5252<title><?php bloginfo('name') ?> &rsaquo; Bookmarklet &#8212; WordPress</title>
    5353<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
    54 <?php 
     54<?php
    5555wp_admin_css( 'css/global' );
    5656wp_admin_css();
  • trunk/wp-admin/categories.php

    r7046 r7130  
    9898if ( !empty($_GET['_wp_http_referer']) ) {
    9999         wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));
    100          exit; 
     100         exit;
    101101}
    102102
  • trunk/wp-admin/css/install.css

    r7001 r7130  
    5151        font-size: 13px !important;
    5252        -moz-border-radius: 2px;
    53         -khtml-border-radius: 2px;     
     53        -khtml-border-radius: 2px;
    5454        -webkit-border-radius: 2px;
    5555        border-radius: 2px;
  • trunk/wp-admin/css/login.css

    r6922 r7130  
    3030        margin-top: -6px;
    3131        -moz-border-radius: 2px;
    32         -khtml-border-radius: 2px;     
     32        -khtml-border-radius: 2px;
    3333        -webkit-border-radius: 2px;
    3434        border-radius: 2px;
  • trunk/wp-admin/css/widgets.css

    r7086 r7130  
    3636div#widget-content {
    3737        border-bottom: 1px solid #ccc;
    38 }       
     38}
    3939
    4040ul#widget-list {
  • trunk/wp-admin/edit-comments.php

    r7098 r7130  
    1010        check_admin_referer('bulk-comments');
    1111
    12         $comments_deleted = $comments_approved = $comments_unapproved = $comments_spammed = 0; 
     12        $comments_deleted = $comments_approved = $comments_unapproved = $comments_spammed = 0;
    1313        foreach ($_REQUEST['delete_comments'] as $comment) : // Check the permissions on each
    1414                $comment = (int) $comment;
    … …  
    4141} elseif ( !empty($_GET['_wp_http_referer']) ) {
    4242         wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));
    43          exit; 
     43         exit;
    4444}
    4545
  • trunk/wp-admin/edit-form-advanced.php

    r7120 r7130  
    179179<?php $sample_permalink_html = get_sample_permalink_html($post->ID); ?>
    180180        <div id="edit-slug-box">
    181 <?php if ( ! empty($post->ID) && ! empty($sample_permalink_html) ) : 
     181<?php if ( ! empty($post->ID) && ! empty($sample_permalink_html) ) :
    182182        echo $sample_permalink_html;
    183183endif; ?>
  • trunk/wp-admin/edit-link-categories.php

    r7104 r7130  
    2323} elseif ( !empty($_GET['_wp_http_referer']) ) {
    2424         wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));
    25          exit; 
     25         exit;
    2626}
    2727
  • trunk/wp-admin/edit-page-form.php

    r7120 r7130  
    154154<?php $sample_permalink_html = get_sample_permalink_html($post->ID); ?>
    155155        <div id="edit-slug-box">
    156 <?php if ( ! empty($post->ID) && ! empty($sample_permalink_html) ) : 
     156<?php if ( ! empty($post->ID) && ! empty($sample_permalink_html) ) :
    157157        echo $sample_permalink_html;
    158158endif; ?>
  • trunk/wp-admin/edit-pages.php

    r7113 r7130  
    2929} elseif ( !empty($_GET['_wp_http_referer']) ) {
    3030         wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));
    31          exit; 
     31         exit;
    3232}
    3333
    … …  
    7373
    7474$avail_post_stati = get_available_post_statuses('page');
    75        
     75
    7676$status_links = array();
    7777$num_posts = wp_count_posts('page', 'readable');
    … …  
    8181        if ( !in_array($status, $avail_post_stati) )
    8282                continue;
    83        
     83
    8484        if ( $status == $_GET['post_status'] )
    8585                $class = ' class="current"';
  • trunk/wp-admin/edit-tags.php

    r7046 r7130  
    8888if ( !empty($_GET['_wp_http_referer']) ) {
    8989         wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));
    90          exit; 
     90         exit;
    9191}
    9292
  • trunk/wp-admin/edit.php

    r7110 r7130  
    2929} elseif ( !empty($_GET['_wp_http_referer']) ) {
    3030         wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));
    31          exit; 
     31         exit;
    3232}
    3333
    … …  
    155155                continue;
    156156        $arc_row->mmonth = zeroise( $arc_row->mmonth, 2 );
    157        
     157
    158158        if ( $arc_row->yyear . $arc_row->mmonth == $_GET['m'] )
    159159                $default = ' selected="selected"';
    160160        else
    161161                $default = '';
    162        
     162
    163163        echo "<option$default value='$arc_row->yyear$arc_row->mmonth'>";
    164164        echo $wp_locale->get_month($arc_row->mmonth) . " $arc_row->yyear";
  • trunk/wp-admin/includes/class-ftp.php

    r7126 r7130  
    1515        var $OS_local;
    1616        var $OS_remote;
    17        
     17
    1818        /* Private variables */
    1919        var $_lastaction;
    … …  
    602602                }
    603603                return $ret;
    604                
     604
    605605        }
    606606
    … …  
    650650                        return false;
    651651                }
    652        
     652
    653653                foreach($list as $k=>$v) {
    654654                        $list[$k]=$this->parselisting($v);
    … …  
    656656                }
    657657                $ret=true;
    658        
     658
    659659                foreach($list as $el) {
    660660                        if ( empty($el) )
    … …  
    674674                        }
    675675                }
    676        
     676
    677677                if(!$this->rmdir($remote)) {
    678678                        $this->PushError("mdel", "can't delete folder", "Can't delete remote folder \"".$remote."/".$el["name"]."\"");
    … …  
    814814                return(array_push($this->_error_array,$error));
    815815        }
    816        
     816
    817817// Rcupre une erreur externe
    818818        function PopError(){
  • trunk/wp-admin/includes/class-pclzip.php

    r6919 r7130  
    2828  // ----- Constants
    2929  define( 'PCLZIP_READ_BLOCK_SIZE', 2048 );
    30  
     30
    3131  // ----- File list separator
    3232  // In version 1.x of PclZip, the separator for file list is a space
    … …  
    127127  //define( 'PCLZIP_OPT_CRYPT', 77018 );
    128128  define( 'PCLZIP_OPT_EXTRACT_DIR_RESTRICTION', 77019 );
    129  
     129
    130130  // ----- File description attributes
    131131  define( 'PCLZIP_ATT_FILE_NAME', 79001 );
    … …  
    170170    var $error_code = 1;
    171171    var $error_string = '';
    172    
     172
    173173    // ----- Current status of the magic_quotes_runtime
    174174    // This value store the php configuration for magic_quotes
    … …  
    316316    $v_filedescr_list = array();
    317317    $p_result_list = array();
    318    
     318
    319319    // ----- Look if the $p_filelist is really an array
    320320    if (is_array($p_filelist)) {
    321    
     321
    322322      // ----- Look if the first element is also an array
    323323      //       This will mean that this is a file description entry
    … …  
    325325        $v_att_list = $p_filelist;
    326326      }
    327      
     327
    328328      // ----- The list is a list of string names
    329329      else {
    … …  
    344344      return 0;
    345345    }
    346    
     346
    347347    // ----- Reformat the string list
    348348    if (sizeof($v_string_list) != 0) {
    … …  
    356356      }
    357357    }
    358    
     358
    359359    // ----- For each file in the list check the attributes
    360360    $v_supported_attributes
    … …  
    506506    $v_filedescr_list = array();
    507507    $p_result_list = array();
    508    
     508
    509509    // ----- Look if the $p_filelist is really an array
    510510    if (is_array($p_filelist)) {
    511    
     511
    512512      // ----- Look if the first element is also an array
    513513      //       This will mean that this is a file description entry
    … …  
    515515        $v_att_list = $p_filelist;
    516516      }
    517      
     517
    518518      // ----- The list is a list of string names
    519519      else {
    … …  
    534534      return 0;
    535535    }
    536    
     536
    537537    // ----- Reformat the string list
    538538    if (sizeof($v_string_list) != 0) {
    … …  
    541541      }
    542542    }
    543    
     543
    544544    // ----- For each file in the list check the attributes
    545545    $v_supported_attributes
    … …  
    991991  //   PCLZIP_OPT_BY_INDEX :
    992992  //   PCLZIP_OPT_BY_NAME :
    993   //   PCLZIP_OPT_BY_EREG : 
     993  //   PCLZIP_OPT_BY_EREG :
    994994  //   PCLZIP_OPT_BY_PREG :
    995995  // Return Values :
    … …  
    10661066  {
    10671067    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::deleteByIndex", "index='$p_index'");
    1068    
     1068
    10691069    $p_list = $this->delete(PCLZIP_OPT_BY_INDEX, $p_index);
    10701070
    … …  
    11201120      {
    11211121        $this->privSwapBackMagicQuotes();
    1122        
     1122
    11231123        // ----- Error log
    11241124        PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode');
    … …  
    14491449    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privParseOptions", "");
    14501450    $v_result=1;
    1451    
     1451
    14521452    // ----- Read the options
    14531453    $i=0;
    … …  
    16461646            return PclZip::errorCode();
    16471647          }
    1648          
     1648
    16491649          // ----- Reduce the index list
    16501650          // each index item in the list must be a couple with a start and
    … …  
    16571657              $v_item_list = explode("-", $v_work_list[$j]);
    16581658              $v_size_item_list = sizeof($v_item_list);
    1659              
     1659
    16601660              // ----- TBC : Here we might check that each item is a
    16611661              // real integer ...
    1662              
     1662
    16631663              // ----- Look for single value
    16641664              if ($v_size_item_list == 1) {
    … …  
    16981698              $v_sort_value = $v_result_list[$p_options_list[$i]][$j]['start'];
    16991699          }
    1700          
     1700
    17011701          // ----- Sort the items
    17021702          if ($v_sort_flag) {
    … …  
    18301830    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privFileDescrParseAtt", "");
    18311831    $v_result=1;
    1832    
     1832
    18331833    // ----- For each file in the list check the attributes
    18341834    foreach ($p_file_list as $v_key => $v_value) {
    1835    
     1835
    18361836      // ----- Check if the option is supported
    18371837      if (!isset($v_requested_options[$v_key])) {
    … …  
    18551855          $p_filedescr['filename'] = PclZipUtilPathReduction($v_value);
    18561856          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($v_key)." = '".$v_value."'");
    1857          
     1857
    18581858          if ($p_filedescr['filename'] == '') {
    18591859            PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty filename for attribute '".PclZipUtilOptionText($v_key)."'");
    … …  
    19231923        }
    19241924      }
    1925    
     1925
    19261926    // end foreach
    19271927    }
    1928    
     1928
    19291929    // ----- Return
    19301930    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
    … …  
    19451945    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privFileDescrExpand", "");
    19461946    $v_result=1;
    1947    
     1947
    19481948    // ----- Create a result list
    19491949    $v_result_list = array();
    1950    
     1950
    19511951    // ----- Look each entry
    19521952    for ($i=0; $i<sizeof($p_filedescr_list); $i++) {
    19531953      // ----- Get filedescr
    19541954      $v_descr = $p_filedescr_list[$i];
    1955      
     1955
    19561956      // ----- Reduce the filename
    19571957      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filedescr before reduction :'".$v_descr['filename']."'");
    … …  
    19591959      $v_descr['filename'] = PclZipUtilPathReduction($v_descr['filename']);
    19601960      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filedescr after reduction :'".$v_descr['filename']."'");
    1961      
     1961
    19621962      // ----- Get type of descr
    19631963      if (!file_exists($v_descr['filename'])) {
    … …  
    19881988        continue;
    19891989      }
    1990      
     1990
    19911991      // ----- Calculate the stored filename
    19921992      $this->privCalculateStoredFilename($v_descr, $p_options);
    1993      
     1993
    19941994      // ----- Add the descriptor in result list
    19951995      $v_result_list[sizeof($v_result_list)] = $v_descr;
    1996      
     1996
    19971997      // ----- Look for folder
    19981998      if ($v_descr['type'] == 'folder') {
    … …  
    20082008                continue;
    20092009            }
    2010            
     2010
    20112011            // ----- Compose the full filename
    20122012            $v_dirlist_descr[$v_dirlist_nb]['filename'] = $v_descr['filename'].'/'.$v_item_handler;
    2013            
     2013
    20142014            // ----- Look for different stored filename
    20152015            // Because the name of the folder was changed, the name of the
    … …  
    20182018              $v_dirlist_descr[$v_dirlist_nb]['new_full_name'] = $v_descr['stored_filename'].'/'.$v_item_handler;
    20192019            }
    2020      
     2020
    20212021            $v_dirlist_nb++;
    20222022          }
    … …  
    20262026          // TBC : unable to open folder in read mode
    20272027        }
    2028        
     2028
    20292029        // ----- Expand each element of the list
    20302030        if ($v_dirlist_nb != 0) {
    … …  
    20342034            return $v_result;
    20352035          }
    2036          
     2036
    20372037          // ----- Concat the resulting list
    20382038          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Merging result list (size '".sizeof($v_result_list)."') with dirlist (size '".sizeof($v_dirlist_descr)."')");
    … …  
    20432043          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Nothing in this folder to expand.");
    20442044        }
    2045          
     2045
    20462046        // ----- Free local array
    20472047        unset($v_dirlist_descr);
    20482048      }
    20492049    }
    2050    
     2050
    20512051    // ----- Get the result list
    20522052    $p_filedescr_list = $v_result_list;
    … …  
    20692069    $v_result=1;
    20702070    $v_list_detail = array();
    2071    
     2071
    20722072    // ----- Magic quotes trick
    20732073    $this->privDisableMagicQuotes();
    … …  
    24302430  // Description :
    24312431  // Parameters :
    2432   //   $p_filedescr_list : An array containing the file description 
     2432  //   $p_filedescr_list : An array containing the file description
    24332433  //                      or directory names to add in the zip
    24342434  //   $p_result_list : list of added files with their properties (specially the status field)
    … …  
    24502450      $p_filedescr_list[$j]['filename']
    24512451      = PclZipUtilTranslateWinPath($p_filedescr_list[$j]['filename'], false);
    2452      
     2452
    24532453      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Looking for file '".$p_filedescr_list[$j]['filename']."'");
    24542454
    … …  
    25042504    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privAddFile", "filename='".$p_filedescr['filename']."'");
    25052505    $v_result=1;
    2506    
     2506
    25072507    // ----- Working variable
    25082508    $p_filename = $p_filedescr['filename'];
    … …  
    25172517      return PclZip::errorCode();
    25182518    }
    2519  
    2520     // ----- Look for a stored different filename 
     2519
     2520    // ----- Look for a stored different filename
    25212521    if (isset($p_filedescr['stored_filename'])) {
    25222522      $v_stored_filename = $p_filedescr['stored_filename'];
    … …  
    25842584      $p_header['status'] = "filtered";
    25852585    }
    2586    
     2586
    25872587    // ----- Check the path length
    25882588    if (strlen($p_header['stored_filename']) > 0xFF) {
    … …  
    26312631          $p_header['compression'] = 8;
    26322632        }
    2633        
     2633
    26342634        // ----- Look for encryption
    26352635        /*
    … …  
    26372637                    && ($p_options[PCLZIP_OPT_CRYPT] != "")) {
    26382638          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File need to be crypted ....");
    2639          
     2639
    26402640          // Should be a random header
    26412641          $v_header = 'xxxxxxxxxxxx';
    … …  
    26452645                                                                                                   $p_header['crc'],
    26462646                                                                                                   "test");
    2647                                                                                                    
     2647
    26482648          $p_header['compressed_size'] += 12;
    26492649          $p_header['flag'] = 1;
    2650          
     2650
    26512651          // ----- Add the header to the data
    26522652          $v_content_compressed = $v_header.$v_content_compressed;
    … …  
    26632663
    26642664        // ----- Write the compressed (or not) content
    2665         @fwrite($this->zip_fd, 
     2665        @fwrite($this->zip_fd,
    26662666                            $v_content_compressed, $p_header['compressed_size']);
    2667        
     2667
    26682668        // ----- Close the file
    26692669        @fclose($v_file);
    … …  
    27312731    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCalculateStoredFilename", "filename='".$p_filedescr['filename']."'");
    27322732    $v_result=1;
    2733    
     2733
    27342734    // ----- Working variables
    27352735    $p_filename = $p_filedescr['filename'];
    … …  
    27582758      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Changing full name of '".$p_filename."' for '".$v_stored_filename."'");
    27592759    }
    2760    
     2760
    27612761    // ----- Look for path and/or short name change
    27622762    else {
    … …  
    27892789        if (   (substr($p_filename, 0, 2) == "./")
    27902790            || (substr($p_remove_dir, 0, 2) == "./")) {
    2791            
     2791
    27922792          if (   (substr($p_filename, 0, 2) == "./")
    27932793              && (substr($p_remove_dir, 0, 2) != "./")) {
    … …  
    28292829    $p_filedescr['stored_filename'] = $v_stored_filename;
    28302830    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Stored filename will be '".$p_filedescr['stored_filename']."', strlen ".strlen($p_filedescr['stored_filename']));
    2831    
     2831
    28322832    // ----- Return
    28332833    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
    … …  
    29922992      // ----- Magic quotes trick
    29932993      $this->privSwapBackMagicQuotes();
    2994      
     2994
    29952995      // ----- Error log
    29962996      PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode');
    … …  
    32713271               && ($p_options[PCLZIP_OPT_BY_INDEX] != 0)) {
    32723272          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByIndex'");
    3273          
     3273
    32743274          // ----- Look if the index is in the list
    32753275          for ($j=$j_start; ($j<sizeof($p_options[PCLZIP_OPT_BY_INDEX])) && (!$v_extract); $j++) {
    … …  
    33113311
    33123312              $this->privSwapBackMagicQuotes();
    3313              
     3313
    33143314              PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_COMPRESSION,
    33153315                                               "Filename '".$v_header['stored_filename']."' is "
    … …  
    33213321                  }
    33223322          }
    3323          
     3323
    33243324          // ----- Check encrypted files
    33253325          if (($v_extract) && (($v_header['flag'] & 1) == 1)) {
    … …  
    33583358          $v_extract = false;
    33593359      }
    3360      
     3360
    33613361      // ----- Look for real extraction
    33623362      if ($v_extract)
    … …  
    34123412          // ----- Next extracted file
    34133413          $v_nb_extracted++;
    3414          
     3414
    34153415          // ----- Look for user callback abort
    34163416          if ($v_result1 == 2) {
    … …  
    35643564      $p_entry['filename'] = $p_path."/".$p_entry['filename'];
    35653565    }
    3566    
     3566
    35673567    // ----- Check a base_dir_restriction
    35683568    if (isset($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION])) {
    … …  
    35703570      $v_inclusion
    35713571      = PclZipUtilPathInclusion($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION],
    3572                                 $p_entry['filename']); 
     3572                                $p_entry['filename']);
    35733573      if ($v_inclusion == 0) {
    35743574        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_EXTRACT_DIR_RESTRICTION is selected, file is outside restriction");
    … …  
    36003600        $v_result = 1;
    36013601      }
    3602      
     3602
    36033603      // ----- Look for abort result
    36043604      if ($v_result == 2) {
    … …  
    36323632        // ----- Change the file status
    36333633        $p_entry['status'] = "already_a_directory";
    3634        
     3634
    36353635        // ----- Look for PCLZIP_OPT_STOP_ON_ERROR
    36363636        // For historical reason first PclZip implementation does not stop
    … …  
    37653765            @fwrite($v_dest_file, $v_binary_data, $v_read_size);
    37663766            */
    3767             @fwrite($v_dest_file, $v_buffer, $v_read_size);           
     3767            @fwrite($v_dest_file, $v_buffer, $v_read_size);
    37683768            $v_size -= $v_read_size;
    37693769          }
    … …  
    37743774          // ----- Change the file mtime
    37753775          touch($p_entry['filename'], $p_entry['mtime']);
    3776          
     3776
    37773777
    37783778        }
    … …  
    37873787              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Read 12 encryption header bytes");
    37883788              $v_encryption_header = @fread($this->zip_fd, 12);
    3789              
     3789
    37903790              // ----- Read the encrypted & compressed file in a buffer
    37913791              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Read '".($p_entry['compressed_size']-12)."' compressed & encrypted bytes");
    37923792              $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']-12);
    3793              
     3793
    37943794              // ----- Decrypt the buffer
    37953795              $this->privDecrypt($v_encryption_header, $v_buffer,
    … …  
    38033803              $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']);
    38043804          }
    3805          
     3805
    38063806          // ----- Decompress the file
    38073807          $v_file_content = @gzinflate($v_buffer);
    … …  
    38133813            // TBC
    38143814            $p_entry['status'] = "error";
    3815            
     3815
    38163816            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
    38173817            return $v_result;
    38183818          }
    3819          
     3819
    38203820          // ----- Opening destination file
    38213821          if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) {
    … …  
    38563856      $p_entry['status'] = "skipped";
    38573857        }
    3858        
     3858
    38593859    // ----- Look for post-extract callback
    38603860    elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) {
    … …  
    39653965          // ----- Read the compressed file in a buffer (one shot)
    39663966          $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']);
    3967          
     3967
    39683968          // ----- Decompress the file
    39693969          $v_file_content = gzinflate($v_buffer);
    … …  
    40544054        // ----- Reading the file
    40554055        $v_data = @fread($this->zip_fd, $p_entry['compressed_size']);
    4056        
     4056
    40574057        // ----- Decompress the file
    40584058        if (($p_string = @gzinflate($v_data)) === FALSE) {
    … …  
    48044804                return $v_result;
    48054805            }
    4806            
     4806
    48074807            // ----- Check that local file header is same as central file header
    48084808            if ($this->privCheckFileHeaders($v_local_header,
    … …  
    48974897        //@rename($v_zip_temp_name, $this->zipname);
    48984898        PclZipUtilRename($v_zip_temp_name, $this->zipname);
    4899    
     4899
    49004900        // ----- Destroy the temporary archive
    49014901        unset($v_temp_zip);
    49024902    }
    4903    
     4903
    49044904    // ----- Remove every files : reset the file
    49054905    else if ($v_central_dir['entries'] != 0) {
    … …  
    53165316    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privDecrypt', "size=".$p_size."");
    53175317    $v_result=1;
    5318    
     5318
    53195319    // ----- To Be Modified ;-)
    53205320    $v_pwd = "test";
    5321    
     5321
    53225322    $p_buffer = PclZipUtilZipDecrypt($p_buffer, $p_size, $p_encryption_header,
    53235323                                         $p_crc, $v_pwd);
    5324    
     5324
    53255325    // ----- Return
    53265326    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
    … …  
    54725472        }
    54735473      }
    5474      
     5474
    54755475      // ----- Look for skip
    54765476      if ($v_skip > 0) {
    … …  
    55075507    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilPathInclusion", "dir='$p_dir', path='$p_path'");
    55085508    $v_result = 1;
    5509    
     5509
    55105510    // ----- Look for path beginning by ./
    55115511    if (   ($p_dir == '.')
    … …  
    56985698  {
    56995699    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilOptionText", "option='".$p_option."'");
    5700    
     5700
    57015701    $v_list = get_defined_constants();
    57025702    for (reset($v_list); $v_key = key($v_list); next($v_list)) {
    … …  
    57105710            }
    57115711    }
    5712    
     5712
    57135713    $v_result = 'Unknown';
    57145714
  • trunk/wp-admin/includes/class-wp-filesystem-direct.php

    r7129 r7130  
    8888                if( !function_exists('posix_getpwuid') )
    8989                        return $owneruid;
    90                 $ownerarray=posix_getpwuid($owneruid); 
     90                $ownerarray=posix_getpwuid($owneruid);
    9191                return $ownerarray['name'];
    9292        }
    … …  
    122122                        $info = 'u';
    123123                }
    124                
     124
    125125                // Owner
    126126                $info .= (($perms & 0x0100) ? 'r' : '-');
    … …  
    129129                                        (($perms & 0x0800) ? 's' : 'x' ) :
    130130                                        (($perms & 0x0800) ? 'S' : '-'));
    131                
     131
    132132                // Group
    133133                $info .= (($perms & 0x0020) ? 'r' : '-');
    … …  
    136136                                        (($perms & 0x0400) ? 's' : 'x' ) :
    137137                                        (($perms & 0x0400) ? 'S' : '-'));
    138                
     138
    139139                // World
    140140                $info .= (($perms & 0x0004) ? 'r' : '-');
    … …  
    169169                if( !function_exists('posix_getgrgid') )
    170170                        return $gid;
    171                 $grouparray=posix_getgrgid($gid); 
     171                $grouparray=posix_getgrgid($gid);
    172172                return $grouparray['name'];
    173173        }
    174        
     174
    175175        function copy($source,$destination,$overwrite=false){
    176176                if( $overwrite && $this->exists($destination) )
    … …  
    211211                return $retval;
    212212        }
    213        
     213
    214214        function exists($file){
    215215                return @file_exists($file);
    … …  
    231231                return @is_writable($file);
    232232        }
    233        
     233
    234234        function atime($file){
    235235                return @fileatime($file);
    … …  
    250250                return @touch($file,$time,$atime);
    251251        }
    252        
     252
    253253        function mkdir($path,$chmod=false,$chown=false,$chgrp=false){
    254254                if( ! $chmod)
    255255                        $chmod = $this->permission;
    256                        
     256
    257257                if( !@mkdir($path,$chmod) )
    258258                        return false;
    … …  
    276276                return @rmdir($path);
    277277        }
    278        
     278
    279279        function dirlist($path,$incdot=false,$recursive=false){
    280280                if( $this->is_file($path) ){
    … …  
    292292                        $struc = array();
    293293                        $struc['name']          = $entry;
    294                        
     294
    295295                        if( '.' == $struc['name'][0] && !$incdot)
    296296                                continue;
    297297                        if( $limitFile && $struc['name'] != $limitFile)
    298298                                continue;
    299                        
     299
    300300                        $struc['perms']         = $this->gethchmod($path.'/'.$entry);
    301301                        $struc['permsn']        = $this->getnumchmodfromh($struc['perms']);
    … …  
    310310                        if ('d' == $struc['type'] ){
    311311                                $struc['files'] = array();
    312                                
     312
    313313                                if( $incdot ){
    314314                                        //We're including the doted starts
  • trunk/wp-admin/includes/class-wp-filesystem-ftpext.php

    r7126 r7130  
    55        var $errors = array();
    66        var $options = array();
    7        
     7
    88        var $wp_base = '';
    99        var $permission = null;
    10        
     10
    1111        var $filetypes = array(
    1212                                                        'php'=>FTP_ASCII,
    … …  
    1717                                                        'htm'=>FTP_ASCII,
    1818                                                        'xml'=>FTP_ASCII,
    19                                                        
     19
    2020                                                        'jpg'=>FTP_BINARY,
    2121                                                        'png'=>FTP_BINARY,
    … …  
    2323                                                        'bmp'=>FTP_BINARY
    2424                                                        );
    25        
     25
    2626        function WP_Filesystem_FTPext($opt='') {
    2727                $this->errors = new WP_Error();
    … …  
    5454
    5555                if ( empty ($opt['password']) )
    56                         $this->errors->add('empty_password', __('FTP password is required'));   
     56                        $this->errors->add('empty_password', __('FTP password is required'));
    5757                else
    5858                        $this->options['password'] = $opt['password'];
    59                
     59
    6060                $this->options['ssl'] = ( !empty($opt['ssl']) );
    6161        }
    … …  
    8989                if( empty( $base ) ) $base = '/';
    9090                if( '/' != substr($base, -1) ) $base .= '/';
    91                
     91
    9292                if($echo) echo sprintf(__('Changing to %s'), $base) .'<br>';
    9393                if( false === ftp_chdir($this->link, $base) )
    … …  
    220220                        $info = 'u';
    221221                }
    222                
     222
    223223                // Owner
    224224                $info .= (($perms & 0x0100) ? 'r' : '-');
    … …  
    227227                                        (($perms & 0x0800) ? 's' : 'x' ) :
    228228                                        (($perms & 0x0800) ? 'S' : '-'));
    229                
     229
    230230                // Group
    231231                $info .= (($perms & 0x0020) ? 'r' : '-');
    … …  
    234234                                        (($perms & 0x0400) ? 's' : 'x' ) :
    235235                                        (($perms & 0x0400) ? 'S' : '-'));
    236                
     236
    237237                // World
    238238                $info .= (($perms & 0x0004) ? 'r' : '-');
    … …  
    339339                if( ! $recursive )
    340340                        return ftp_rmdir($this->link, $file);
    341                
     341
    342342                //TODO: Recursive Directory delete, Have to delete files from the folder first.
    343343                //$dir = $this->dirlist($path);
    344344                //foreach($dir as $file)
    345                        
     345
    346346        }
    347347
    … …  
    440440                $ret = array();
    441441                foreach ( $dirlist as $struc ) {
    442                        
     442
    443443                        if ( 'd' == $struc['type'] ) {
    444444                                $struc['files'] = array();
  • trunk/wp-admin/includes/class-wp-filesystem-ftpsockets.php

    r7126 r7130  
    55        var $errors;
    66        var $options = array();
    7        
     7
    88        var $wp_base = '';
    99        var $permission = null;
    10        
     10
    1111        var $filetypes = array(
    1212                                                        'php'=>FTP_ASCII,
    … …  
    1717                                                        'htm'=>FTP_ASCII,
    1818                                                        'xml'=>FTP_ASCII,
    19                                                        
     19
    2020                                                        'jpg'=>FTP_BINARY,
    2121                                                        'png'=>FTP_BINARY,
    … …  
    2323                                                        'bmp'=>FTP_BINARY
    2424                                                        );
    25        
     25
    2626        function WP_Filesystem_ftpsockets($opt='') {
    2727                $this->errors = new WP_Error();
    … …  
    5353
    5454                if ( empty ($opt['password']) )
    55                         $this->errors->add('empty_password', __('FTP password is required'));   
     55                        $this->errors->add('empty_password', __('FTP password is required'));
    5656                else
    5757                        $this->options['password'] = $opt['password'];
    … …  
    9191                if( empty( $base ) ) $base = '/';
    9292                if( '/' != substr($base, -1) ) $base .= '/';
    93                
     93
    9494                if($echo) echo __('Changing to ') . $base  .'<br>';
    9595                if( false === $this->ftp->chdir($base) )
    … …  
    158158                }
    159159                $this->ftp->SetType($type);
    160                
     160
    161161                $temp = tmpfile();
    162162                fwrite($temp,$contents);
    … …  
    174174                return false;
    175175        }
    176        
     176
    177177        function chmod($file,$mode=false,$recursive=false){
    178178                if( ! $mode )
    … …  
    192192                return true;
    193193        }
    194        
     194
    195195        function chown($file,$owner,$recursive=false){
    196196                return false;
    197197        }
    198        
     198
    199199        function owner($file){
    200200                $dir = $this->dirlist($file);
    201201                return $dir[$file]['owner'];
    202202        }
    203        
     203
    204204        function getchmod($file){
    205205                $dir = $this->dirlist($file);
    … …  
    235235                        $info = 'u';
    236236                }
    237                
     237
    238238                // Owner
    239239                $info .= (($perms & 0x0100) ? 'r' : '-');
    … …  
    242242                                        (($perms & 0x0800) ? 's' : 'x' ) :
    243243                                        (($perms & 0x0800) ? 'S' : '-'));
    244                
     244
    245245                // Group
    246246                $info .= (($perms & 0x0020) ? 'r' : '-');
    … …  
    249249                                        (($perms & 0x0400) ? 's' : 'x' ) :
    250250                                        (($perms & 0x0400) ? 'S' : '-'));
    251                
     251
    252252                // World
    253253                $info .= (($perms & 0x0004) ? 'r' : '-');
    … …  
    386386                $ret = array();
    387387                foreach ( $list as $struc ) {
    388                        
     388
    389389                        if ( 'd' == $struc['type'] ) {
    390390                                $struc['files'] = array();
  • trunk/wp-admin/includes/comment.php

    r6883 r7130  
    8181}
    8282
    83 if ( is_admin() && ('edit-comments.php' == $pagenow || 'moderation.php' == $pagenow || 'edit.php' == $pagenow) ) { 
     83if ( is_admin() && ('edit-comments.php' == $pagenow || 'moderation.php' == $pagenow || 'edit.php' == $pagenow) ) {
    8484        if ( get_option('show_avatars') )
    8585                add_filter( 'comment_author', 'floated_admin_avatar' );
  • trunk/wp-admin/includes/dashboard.php

    r7088 r7130  
    111111                        $arg, $arg, $arg... (further args passed to callbacks)
    112112                );
    113        
     113
    114114                // optional: if you want users to be able to edit the settings of your widget, you need to register a widget_control
    115115                wp_register_widget_control( $widget_id, $widget_control_title, $control_output_callback,
    … …  
    317317                        $date = '';
    318318                        $link = clean_url( strip_tags( $item['link'] ) );
    319                
     319
    320320                        if ( isset( $item['author_uri'] ) )
    321321                                $site_link = clean_url( strip_tags( $item['author_uri'] ) );
    322                
     322
    323323                        if ( !$publisher = wp_specialchars( strip_tags( isset($item['dc']['publisher']) ? $item['dc']['publisher'] : $item['author_name'] ) ) )
    324324                                $publisher = __( 'Somebody' );
    … …  
    327327                        else
    328328                                $publisher = "<strong>$publisher</strong>";
    329                
     329
    330330                        if ( isset($item['description']) )
    331331                                $content = $item['description'];
    … …  
    344344                        else
    345345                                $text = _c( '%1$s linked here saying, "%3$s"|feed_display' );
    346                
     346
    347347                        if ( $show_date ) {
    348348                                if ( $show_author || $show_summary )
    … …  
    352352                                $date = gmdate( get_option( 'date_format' ), $date );
    353353                        }
    354                
     354
    355355                        echo "\t<li>" . sprintf( _c( "$text|feed_display" ), $publisher, $link, $content, $date ) . "</li>\n";
    356356                }
  • trunk/wp-admin/includes/file.php

    r7126 r7130  
    208208        $snoopy = new Snoopy();
    209209        $snoopy->fetch($url);
    210        
     210
    211211        fwrite($handle, $snoopy->results);
    212212        fclose($handle);
    … …  
    220220        if ( ! $wp_filesystem || !is_object($wp_filesystem) )
    221221                return new WP_Error('fs_unavailable', __('Could not access filesystem.'));
    222                        
     222
    223223        $fs =& $wp_filesystem;
    224224
  • trunk/wp-admin/includes/media.php

    r7124 r7130  
    127127<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
    128128<title><?php bloginfo('name') ?> &rsaquo; <?php _e('Uploads'); ?> &#8212; WordPress</title>
    129 <?php 
     129<?php
    130130wp_admin_css( 'css/global' );
    131131wp_admin_css();
    … …  
    387387        if ( !empty($_POST) ) {
    388388                $return = media_upload_form_handler();
    389        
     389
    390390                if ( is_string($return) )
    391391                        return $return;
    … …  
    400400        if ( !empty($_POST) ) {
    401401                $return = media_upload_form_handler();
    402        
     402
    403403                if ( is_string($return) )
    404404                        return $return;
  • trunk/wp-admin/includes/post.php

    r7111 r7130  
    645645        if ( !$current_user || !$current_user->ID )
    646646                return false;
    647        
     647
    648648        $now = time();
    649649
  • trunk/wp-admin/includes/template.php

    r7104 r7130  
    348348?>
    349349  <tr id='page-<?php echo $id; ?>' class='<?php echo $class; ?>'>
    350  
    351  
     350
     351
    352352 <?php
    353353
    … …  
    452452}
    453453 ?>
    454  
     454
    455455   </tr>
    456456
    … …  
    571571        else
    572572                $approved = "comment_approved != 'spam'";
    573        
     573
    574574        if ( $s ) {
    575575                $s = $wpdb->escape($s);
    … …  
    616616        $approve_url = clean_url( wp_nonce_url( "comment.php?action=approvecomment&p=$comment->comment_post_ID&c=$comment->comment_ID", "approve-comment_$comment->comment_ID" ) );
    617617        $spam_url    = clean_url( wp_nonce_url( "comment.php?action=deletecomment&dt=spam&p=$comment->comment_post_ID&c=$comment->comment_ID", "delete-comment_$comment->comment_ID" ) );
    618                        
     618
    619619?>
    620620  <tr id="comment-<?php echo $comment->comment_ID; ?>" class='<?php echo $class; ?>'>
  • trunk/wp-admin/includes/update.php

    r7126 r7130  
    138138                return new WP_Error('fs_unavailable', __('Could not access filesystem.'));
    139139
    140         if ( $wp_filesystem->errors->get_error_code() ) 
     140        if ( $wp_filesystem->errors->get_error_code() )
    141141                return new WP_Error('fs_error', __('Filesystem error'), $wp_filesystem->errors);
    142142
    … …  
    173173        // Once installed, delete the package
    174174        unlink($file);
    175        
     175
    176176        // Remove the existing plugin.
    177177        apply_filters('update_feedback', __("Removing the old version of the plugin"));
  • trunk/wp-admin/includes/user.php

    r6887 r7130  
    328328                        $search_sql .= ')';
    329329                }
    330                
     330
    331331                $this->query_from_where = "FROM $wpdb->users";
    332332                if ( $this->role )
  • trunk/wp-admin/js/common.js

    r7050 r7130  
    11addLoadEvent( function() {
    22        // pulse
    3         jQuery('.fade').animate( { backgroundColor: '#ffffe0' }, 300).animate( { backgroundColor: '#fffbcc' }, 300).animate( { backgroundColor: '#ffffe0' }, 300).animate( { backgroundColor: '#fffbcc' }, 300); 
     3        jQuery('.fade').animate( { backgroundColor: '#ffffe0' }, 300).animate( { backgroundColor: '#fffbcc' }, 300).animate( { backgroundColor: '#ffffe0' }, 300).animate( { backgroundColor: '#fffbcc' }, 300);
    44
    55        // Reveal
  • trunk/wp-admin/js/editor.js

    r7114 r7130  
    66        } else {
    77        var H;
    8         if ( H = tinymce.util.Cookie.getHash("TinyMCE_content_size") ) 
     8        if ( H = tinymce.util.Cookie.getHash("TinyMCE_content_size") )
    99            document.getElementById('content').style.height = H.ch - 30 + 'px';
    1010    }
    … …  
    1212
    1313switchEditors = {
    14    
     14
    1515    saveCallback : function(el, content, body) {
    16    
     16
    1717        document.getElementById(el).style.color = '#fff';
    18         if ( tinyMCE.activeEditor.isHidden() ) 
     18        if ( tinyMCE.activeEditor.isHidden() )
    1919            content = document.getElementById(el).value;
    2020        else
    … …  
    4545        content = content.replace(new RegExp('\\s*</('+blocklist+')>\\s*', 'mg'), '</$1>\n');
    4646        content = content.replace(new RegExp('<li>', 'g'), '\t<li>');
    47                
     47
    4848        if ( content.indexOf('<object') != -1 ) {
    4949            content = content.replace(new RegExp('\\s*<param([^>]*)>\\s*', 'g'), "<param$1>"); // no pee inside object/embed
    5050            content = content.replace(new RegExp('\\s*</embed>\\s*', 'g'), '</embed>');
    5151        }
    52                
     52
    5353        // Unmark special paragraph closing tags
    5454        content = content.replace(new RegExp('</p#>', 'g'), '</p>\n');
    … …  
    7272        if ( ! ed || ed.isHidden() ) {
    7373            ta.style.color = '#fff';
    74        
     74
    7575            this.edToggle(P, H);
    7676            edCloseAllTags(); // :-(
    … …  
    8484            if ( ed ) ed.show();
    8585            else tinyMCE.execCommand("mceAddControl", false, id);
    86        
     86
    8787            this.wpSetDefaultEditor( 'tinymce' );
    8888        } else {
    … …  
    9494            ta.value = this.pre_wpautop(ta.value);
    9595            qt.style.display = 'block';
    96            
     96
    9797            if ( tinymce.isIE6 ) {
    9898                                ta.style.width = '98%';
    … …  
    103103                                ec.style.padding = '6px';
    104104            }
    105                        
     105
    106106                        ta.style.color = '';
    107107
    … …  
    133133    wpautop : function(pee) {
    134134        var blocklist = 'table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|p|h[1-6]';
    135    
     135
    136136        pee = pee + "\n\n";
    137137        pee = pee.replace(new RegExp('<br />\\s*<br />', 'gi'), "\n\n");
    138         pee = pee.replace(new RegExp('(<(?:'+blocklist+')[^>]*>)', 'gi'), "\n$1"); 
     138        pee = pee.replace(new RegExp('(<(?:'+blocklist+')[^>]*>)', 'gi'), "\n$1");
    139139        pee = pee.replace(new RegExp('(</(?:'+blocklist+')>)', 'gi'), "$1\n\n");
    140140        pee = pee.replace(new RegExp("\\r\\n|\\r", 'g'), "\n");
    … …  
    147147        pee = pee.replace(new RegExp('</blockquote></p>', 'gi'), '</p></blockquote>');
    148148        pee = pee.replace(new RegExp('<p>\\s*(</?(?:'+blocklist+')[^>]*>)', 'gi'), "$1");
    149         pee = pee.replace(new RegExp('(</?(?:'+blocklist+')[^>]*>)\\s*</p>', 'gi'), "$1"); 
     149        pee = pee.replace(new RegExp('(</?(?:'+blocklist+')[^>]*>)\\s*</p>', 'gi'), "$1");
    150150        pee = pee.replace(new RegExp('\\s*\\n', 'gi'), "<br />\n");
    151151        pee = pee.replace(new RegExp('(</?(?:'+blocklist+')[^>]*>)\\s*<br />', 'gi'), "$1");
  • trunk/wp-admin/js/forms.js

    r6570 r7130  
    1414        for (i = 0, n = form.elements.length; i < n; i++) {
    1515                if (form.elements[i].type == "checkbox") {
    16                         if (form.elements[i].checked == true) 
    17                                 num++; 
     16                        if (form.elements[i].checked == true)
     17                                num++;
    1818                }
    1919        }
    … …  
    2323function checkAllUsers(role) {
    2424 var checkboxs = document.getElementsByTagName('input');
    25  for(var i = 0, inp; inp = checkboxs[i]; i++) 
    26         if(inp.type.toLowerCase() == 'checkbox' && inp.className == role) 
     25 for(var i = 0, inp; inp = checkboxs[i]; i++)
     26        if(inp.type.toLowerCase() == 'checkbox' && inp.className == role)
    2727                if(inp.checked == false)
    2828                        inp.checked = true;
  • trunk/wp-admin/js/media-upload.js

    r6579 r7130  
    1010        } else
    1111                win.edInsertContent(win.edCanvas, h);
    12 }                               
     12}
  • trunk/wp-admin/js/password-strength-meter.js

    r6422 r7130  
    1313function passwordStrength(password,username)
    1414{
    15     score = 0 
    16    
     15    score = 0
     16
    1717    //password < 4
    1818    if (password.length < 4 ) { return shortPass }
    19    
     19
    2020    //password == username
    2121    if (password.toLowerCase()==username.toLowerCase()) return badPass
    22    
     22
    2323    //password length
    2424    score += password.length * 4
    … …  
    2929
    3030    //password has 3 numbers
    31     if (password.match(/(.*[0-9].*[0-9].*[0-9])/))  score += 5 
    32    
     31    if (password.match(/(.*[0-9].*[0-9].*[0-9])/))  score += 5
     32
    3333    //password has 2 sybols
    34     if (password.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/)) score += 5 
    35    
     34    if (password.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/)) score += 5
     35
    3636    //password has Upper and Lower chars
    37     if (password.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/))  score += 10 
    38    
     37    if (password.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/))  score += 10
     38
    3939    //password has number and chars
    40     if (password.match(/([a-zA-Z])/) && password.match(/([0-9])/))  score += 15 
     40    if (password.match(/([a-zA-Z])/) && password.match(/([0-9])/))  score += 15
    4141    //
    4242    //password has number and symbol
    43     if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([0-9])/))  score += 15 
    44    
     43    if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([0-9])/))  score += 15
     44
    4545    //password has char and symbol
    46     if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([a-zA-Z])/))  score += 15 
    47    
     46    if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([a-zA-Z])/))  score += 15
     47
    4848    //password is just a nubers or chars
    49     if (password.match(/^\w+$/) || password.match(/^\d+$/) )  score -= 10 
    50    
     49    if (password.match(/^\w+$/) || password.match(/^\d+$/) )  score -= 10
     50
    5151    //verifing 0 < score < 100
    52     if ( score < 0 )  score = 0 
    53     if ( score > 100 )  score = 100 
    54    
    55     if (score < 34 )  return badPass 
     52    if ( score < 0 )  score = 0
     53    if ( score > 100 )  score = 100
     54
     55    if (score < 34 )  return badPass
    5656    if (score < 68 )  return goodPass
    5757    return strongPass
    … …  
    9494function passwordStrength(password,username)
    9595{
    96     score = 0 
    97    
     96    score = 0
     97
    9898    //password < 4
    9999    if (password.length < 4 ) { return shortPass }
    100    
     100
    101101    //password == username
    102102    if (password.toLowerCase()==username.toLowerCase()) return badPass
    103    
     103
    104104    //password length
    105105    score += password.length * 4
    … …  
    110110
    111111    //password has 3 numbers
    112     if (password.match(/(.*[0-9].*[0-9].*[0-9])/))  score += 5 
    113    
     112    if (password.match(/(.*[0-9].*[0-9].*[0-9])/))  score += 5
     113
    114114    //password has 2 sybols
    115     if (password.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/)) score += 5 
    116    
     115    if (password.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/)) score += 5
     116
    117117    //password has Upper and Lower chars
    118     if (password.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/))  score += 10 
    119    
     118    if (password.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/))  score += 10
     119
    120120    //password has number and chars
    121     if (password.match(/([a-zA-Z])/) && password.match(/([0-9])/))  score += 15 
     121    if (password.match(/([a-zA-Z])/) && password.match(/([0-9])/))  score += 15
    122122    //
    123123    //password has number and symbol
    124     if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([0-9])/))  score += 15 
    125    
     124    if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([0-9])/))  score += 15
     125
    126126    //password has char and symbol
    127     if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([a-zA-Z])/))  score += 15 
    128    
     127    if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([a-zA-Z])/))  score += 15
     128
    129129    //password is just a nubers or chars
    130     if (password.match(/^\w+$/) || password.match(/^\d+$/) )  score -= 10 
    131    
     130    if (password.match(/^\w+$/) || password.match(/^\d+$/) )  score -= 10
     131
    132132    //verifing 0 < score < 100
    133     if ( score < 0 )  score = 0 
    134     if ( score > 100 )  score = 100 
    135    
    136     if (score < 34 )  return badPass 
     133    if ( score < 0 )  score = 0
     134    if ( score > 100 )  score = 100
     135
     136    if (score < 34 )  return badPass
    137137    if (score < 68 )  return goodPass
    138138    return strongPass
  • trunk/wp-admin/js/post.js

    r6975 r7130  
    2424        jQuery.each( current_tags, function( key, val ) {
    2525                val = val.replace( /^\s+/, '' ).replace( /\s+$/, '' ); // trim
    26                 if ( !val.match(/^\s+$/) && '' != val ) { 
     26                if ( !val.match(/^\s+$/) && '' != val ) {
    2727                        txt = '<span><a id="tag-check-' + key + '" class="ntdelbutton">X</a>&nbsp;' + val + '</span> ';
    2828                        jQuery( '#tagchecklist' ).append( txt );
    … …  
    6464        // If no tags on the page, skip the tag and category stuff.
    6565        if ( !jQuery('#tags-input').size() ) {
    66                 return; 
     66                return;
    6767        }
    6868
    6969        // Editable slugs
    7070        make_slugedit_clickable();
    71        
     71
    7272        // hide advanced slug field
    7373        jQuery('#slugdiv').hide();
  • trunk/wp-admin/js/slug.js

    r6954 r7130  
    22        var i, c = 0;
    33        var e = jQuery('#editable-post-name');
    4         var revert_e = e.html();       
     4        var revert_e = e.html();
    55        var real_slug = jQuery('#post_name');
    66        var revert_slug = real_slug.html();
    … …  
    1919                                jQuery('#edit-slug-box').html(data);
    2020                                b.html(revert_b);
    21                                 real_slug.attr('value', new_slug);     
     21                                real_slug.attr('value', new_slug);
    2222                                make_slugedit_clickable();
    2323                        });
  • trunk/wp-admin/js/upload.js

    r6386 r7130  
    66                postID: 0,
    77
    8                 // cookie create and read functions adapted from http://www.quirksmode.org/js/cookies.html     
     8                // cookie create and read functions adapted from http://www.quirksmode.org/js/cookies.html
    99                createCookie: function(name,value,days) {
    1010                        if (days) {
    … …  
    2929
    3030                assignCookieOnChange: function() {
    31                         jQuery(this).bind("change", function(){ 
    32                                 theFileList.createCookie(jQuery(this).attr('name'),jQuery(this).attr('id'),365); 
     31                        jQuery(this).bind("change", function(){
     32                                theFileList.createCookie(jQuery(this).attr('name'),jQuery(this).attr('id'),365);
    3333                        });
    3434                },
    … …  
    324324        };
    325325
    326         for ( var property in uploadL10n ) 
     326        for ( var property in uploadL10n )
    327327                theFileList[property] = uploadL10n[property];
    328328        theFileList.initializeVars();
  • trunk/wp-admin/js/widgets.js

    r7086 r7130  
    8888                if ( !context )
    8989                        context = document;
    90                
     90
    9191                $('a.widget-control-edit', context).click( editClick );
    9292
  • trunk/wp-admin/link-manager.php

    r7104 r7130  
    2222} elseif ( !empty($_GET['_wp_http_referer']) ) {
    2323         wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));
    24          exit; 
     24         exit;
    2525}
    2626
    … …  
    171171                        switch($column_name) {
    172172                                case 'name':
    173                                        
     173
    174174                                        echo "<td><strong><a class='row-title' href='link.php?link_id=$link->link_id&amp;action=edit' class='edit'>$link->link_name</a></strong><br />";
    175175                                        echo $link->link_description . "</td>";
  • trunk/wp-admin/options-general.php

    r7108 r7130  
    5858<td>
    5959<select name="gmt_offset">
    60 <?php 
     60<?php
    6161$current_offset = get_option('gmt_offset');
    6262$offset_range = array (-12, -11.5, -11, -10.5, -10, -9.5, -9, -8.5, -8, -7.5, -7, -6.5, -6, -5.5, -5, -4.5, -4, -3.5, -3, -2.5, -2, -1.5, -1, -0.5,
  • trunk/wp-admin/sidebar.php

    r6782 r7130  
    1414<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=UTF-8" />
    1515<title>WordPress &#8250; Posted</title>
    16 <?php 
     16<?php
    1717wp_admin_css( 'css/global' );
    1818wp_admin_css();
    … …  
    3232<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('blog_charset'); ?>" />
    3333<title>WordPress &#8250; Sidebar</title>
    34 <?php 
     34<?php
    3535wp_admin_css( 'css/global' );
    3636wp_admin_css();
  • trunk/wp-admin/theme-editor.php

    r6960 r7130  
    8484<?php if (isset($_GET['a'])) : ?>
    8585 <div id="message" class="updated fade"><p><?php _e('File edited successfully.') ?></p></div>
    86 <?php endif; 
     86<?php endif;
    8787
    8888$description = get_file_description($file);
    … …  
    135135        <h4 style="margin-bottom: 0px;"><?php _e('Styles'); ?></h4>
    136136        <ul>
    137 <?php foreach($themes[$theme]['Stylesheet Files'] as $style_file) : 
     137<?php foreach($themes[$theme]['Stylesheet Files'] as $style_file) :
    138138                $description = get_file_description($style_file);
    139139                $style_show = basename($style_file);
    … …  
    156156                 <input type="hidden" name="theme" value="<?php echo $theme ?>" />
    157157                 </div>
    158                
     158
    159159                <div>
    160160<?php if ( is_writeable($real_file) ) : ?>
  • trunk/wp-admin/update.php

    r7127 r7130  
    111111                do_plugin_upgrade($plugin);
    112112                include('admin-footer.php');
    113         } 
     113        }
    114114
    115115}
  • trunk/wp-admin/upload.php

    r7062 r7130  
    22require_once('admin.php');
    33
    4 if (!current_user_can('upload_files')) 
    5         wp_die(__('You do not have permission to upload files.')); 
     4if (!current_user_can('upload_files'))
     5        wp_die(__('You do not have permission to upload files.'));
    66
    77// Handle bulk deletes
    … …  
    2727} elseif ( !empty($_GET['_wp_http_referer']) ) {
    2828        wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));
    29         exit; 
     29        exit;
    3030}
    3131
    … …  
    155155                continue;
    156156        $arc_row->mmonth = zeroise( $arc_row->mmonth, 2 );
    157        
     157
    158158        if ( $arc_row->yyear . $arc_row->mmonth == $_GET['m'] )
    159159                $default = ' selected="selected"';
    160160        else
    161161                $default = '';
    162        
     162
    163163        echo "<option$default value='$arc_row->yyear$arc_row->mmonth'>";
    164164        echo $wp_locale->get_month($arc_row->mmonth) . " $arc_row->yyear";
  • trunk/wp-admin/users.php

    r7123 r7130  
    185185        if ( !empty($_GET['_wp_http_referer']) ) {
    186186                wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));
    187                 exit; 
     187                exit;
    188188        }
    189189
  • trunk/wp-admin/wp-admin.css

    r7119 r7130  
    171171        font-size: 13px;
    172172        -moz-border-radius: 3px;
    173         -khtml-border-radius: 3px;     
     173        -khtml-border-radius: 3px;
    174174        -webkit-border-radius: 3px;
    175175        border-radius: 3px;
    … …  
    235235
    236236.error {
    237         background: #f00; 
    238         border: 1px solid #800; 
     237        background: #f00;
     238        border: 1px solid #800;
    239239        color: #fff;
    240240}
    … …  
    369369        padding: 0 0 .2em 1px;
    370370}
    371        
     371
    372372#searchform #s {
    373373        padding: 4px 3px;
    … …  
    570570        color: #555;
    571571        text-align: center;
    572 } 
     572}
    573573
    574574#update-nag a, .plugin-update a {
    … …  
    579579}
    580580
    581 #pass-strength-result { 
     581#pass-strength-result {
    582582        padding: 3px 5px 3px 5px;
    583583        margin-top: 3px;
    584         text-align: center; 
     584        text-align: center;
    585585        background-color: #e3e3e3;
    586586        border: 1px solid #000000;
    587587}
    588588
    589 #pass-strength-result.short { 
     589#pass-strength-result.short {
    590590        background-color: #e3e3e3;
    591         border: 1px solid #000000; 
    592 }
    593 
    594 #pass-strength-result.bad { 
     591        border: 1px solid #000000;
     592}
     593
     594#pass-strength-result.bad {
    595595        background-color: #ffeff7;
    596         border: 1px solid #cc6699; 
    597 }
    598 
    599 #pass-strength-result.good { 
     596        border: 1px solid #cc6699;
     597}
     598
     599#pass-strength-result.good {
    600600        background-color: #effff4;
    601         border: 1px solid #66cc87; 
    602 }
    603 
    604 #pass-strength-result.strong { 
     601        border: 1px solid #66cc87;
     602}
     603
     604#pass-strength-result.strong {
    605605        background-color: #59ef86;
    606606        border: 1px solid #319f52;
    … …  
    695695        -webkit-border-top-left-radius: 3px;
    696696        border-top-left-radius: 3px;
    697         -moz-border-radius-topright: 3px;       
     697        -moz-border-radius-topright: 3px;
    698698        -khtml-border-top-right-radius: 3px;
    699699        -webkit-border-top-right-radius: 3px;
    … …  
    892892        height:100%;
    893893}
    894 #wpwrap { 
    895         position: relative; 
     894#wpwrap {
     895        position: relative;
    896896        min-height: 100%;
    897897}
    … …  
    906906        background: #464646 url('images/logo-ghost.png') no-repeat 20px 10px;
    907907        color: #999;
    908         position: relative; 
    909         margin-top: -75px; 
     908        position: relative;
     909        margin-top: -75px;
    910910}
    911911
    … …  
    10651065        font-size: 1.7em;
    10661066        padding: 4px 3px;
    1067         width: 98%;     
     1067        width: 98%;
    10681068}
    10691069
  • trunk/wp-content/themes/default/style.css

    r6530 r7130  
    1 /* 
     1/*
    22Theme Name: WordPress Default
    33Theme URI: http://wordpress.org/
    … …  
    4040        }
    4141
    42 #headerimg      { 
    43         margin: 7px 9px 0; 
    44         height: 192px; 
    45         width: 740px; 
    46         } 
     42#headerimg      {
     43        margin: 7px 9px 0;
     44        height: 192px;
     45        width: 740px;
     46        }
    4747
    4848#content {
    … …  
    7373
    7474#footer {
    75         background: #eee url('images/kubrickfooter.jpg') no-repeat top; 
     75        background: #eee url('images/kubrickfooter.jpg') no-repeat top;
    7676        border: none;
    7777        }
    … …  
    212212body {
    213213        margin: 0 0 20px 0;
    214         padding: 0; 
     214        padding: 0;
    215215        }
    216216
    … …  
    225225#header {
    226226        background-color: #73a0c5;
    227         margin: 0 0 0 1px; 
    228         padding: 0; 
    229         height: 200px; 
     227        margin: 0 0 0 1px;
     228        padding: 0;
     229        height: 200px;
    230230        width: 758px;
    231231        }
    … …  
    387387        padding-left: 10px;
    388388        text-indent: -10px;
    389         } 
     389        }
    390390
    391391html>body .entry li {
    … …  
    451451#searchform {
    452452        margin: 10px auto;
    453         padding: 5px 3px; 
     453        padding: 5px 3px;
    454454        text-align: center;
    455455        }
  • trunk/wp-includes/category-template.php

    r7064 r7130  
    168168}
    169169
    170 /* 
     170/*
    171171 * in_category() - Checks whether the current post is within a particular category
    172  * 
     172 *
    173173 * This function checks to see if the post is within the supplied category.  The categoy
    174174 * can be specified by number or name and will be checked as a name first to allow for categories with numeric names.
    175175 * Note: Prior to v2.5 of WordPress category names where not supported.
    176  * 
    177  * @since 1.2.0 
    178  * 
    179  * @param int|string $category 
     176 *
     177 * @since 1.2.0
     178 *
     179 * @param int|string $category
    180180 * @return bool true if the post is in the supplied category
    181 */ 
     181*/
    182182function in_category( $category ) { // Check if the current post is in the given category
    183183        global $post;
    … …  
    186186        if (0 != $cat_ID)
    187187                $category = $cat_ID;
    188        
     188
    189189        $categories = get_object_term_cache($post->ID, 'category');
    190190        if ( false === $categories )
  • trunk/wp-includes/classes.php

    r7109 r7130  
    417417                $output = call_user_func_array(array(&$this, 'start_el'), $cb_args);
    418418
    419                 if ( $max_depth == 0 || 
     419                if ( $max_depth == 0 ||
    420420                     ($max_depth != 0 &&  $max_depth > $depth+1 )) { //whether to descend
    421                
     421
    422422                        for ( $i = 0; $i < sizeof( $children_elements ); $i++ ) {
    423                                
     423
    424424                                $child = $children_elements[$i];
    425425                                if ( $child->$parent_field == $element->$id_field ) {
    426426
    427427                                        if ( !isset($newlevel) ) {
    428                                                 $newlevel = true; 
     428                                                $newlevel = true;
    429429                                                //start the child delimiter
    430430                                                $cb_args = array_merge( array($output, $depth), $args);
    431431                                                $output = call_user_func_array(array(&$this, 'start_lvl'), $cb_args);
    432432                                        }
    433                                
     433
    434434                                        array_splice( $children_elements, $i, 1 );
    435435                                        $output = $this->display_element( $child, $children_elements, $max_depth, $depth + 1, $args, $output );
    … …  
    438438                        }
    439439                }
    440                
     440
    441441                if ( isset($newlevel) && $newlevel ){
    442442                        //end the child delimiter
    … …  
    444444                        $output = call_user_func_array(array(&$this, 'end_lvl'), $cb_args);
    445445                }
    446                
     446
    447447                //end this element
    448448                $cb_args = array_merge( array($output, $element, $depth), $args);
  • trunk/wp-includes/deprecated.php

    r6812 r7130  
    12771277/**
    12781278 * gzip_compression() - Unused function
    1279  * 
     1279 *
    12801280 * @deprecated 2.5
    12811281*/
  • trunk/wp-includes/functions.php

    r7114 r7130  
    66        if ( empty( $m ) )
    77                return false;
    8                
     8
    99        if( 'G' == $dateformatstring ) {
    1010                return gmmktime(
    … …  
    1313                );
    1414        }
    15        
     15
    1616        $i = mktime(
    1717                (int) substr( $m, 11, 2 ), (int) substr( $m, 14, 2 ), (int) substr( $m, 17, 2 ),
    … …  
    907907        }
    908908
    909         do_action( $hook, $wp_query->is_comment_feed ); 
     909        do_action( $hook, $wp_query->is_comment_feed );
    910910}
    911911
    … …  
    10441044        if ( strlen($path) == 0 || $path{0} == '.' )
    10451045                return false;
    1046        
     1046
    10471047        // windows allows absolute paths like this
    10481048        if ( preg_match('#^[a-zA-Z]:\\\\#', $path) )
    … …  
    10571057        if ( path_is_absolute($path) )
    10581058                return $path;
    1059        
     1059
    10601060        return rtrim($base, '/') . '/' . ltrim($path, '/');
    10611061}
    … …  
    10651065        $siteurl = get_option( 'siteurl' );
    10661066        $upload_path = $dir = get_option( 'upload_path' );
    1067        
     1067
    10681068        // $dir is absolute, $path is (maybe) relative to ABSPATH
    10691069        $dir = path_join( ABSPATH, $upload_path );
    … …  
    10901090                $subdir = "/$y/$m";
    10911091        }
    1092        
     1092
    10931093        $dir .= $subdir;
    10941094        $url .= $subdir;
    … …  
    11851185                'text' => array('txt'),
    11861186                'archive' => array('tar','bz2','gz','cab','dmg','rar','sea','sit','sqx','zip'),
    1187                 'code' => array('css','html','php','js'),               
     1187                'code' => array('css','html','php','js'),
    11881188        ));
    11891189        foreach ( $ext2type as $type => $exts )
  • trunk/wp-includes/general-template.php

    r7032 r7130  
    938938                        <a id="edButtonPreview" onclick="switchEditors.go('<?php echo $id; ?>');"><?php _e('Visual'); ?></a>
    939939                <?php }
    940         } 
    941        
     940        }
     941
    942942        if ( $media_buttons ) { ?>
    943943                <div id="media-buttons">
  • trunk/wp-includes/js/autosave.js

    r7103 r7130  
    133133        /* Gotta do this up here so we can check the length when tinyMCE is in use */
    134134        if ( rich ) { tinyMCE.triggerSave(); }
    135        
     135
    136136        post_data["content"] = jQuery("#content").val();
    137137        if ( jQuery('#post_name').val() )
  • trunk/wp-includes/js/quicktags.js

    r5167 r7130  
    2626
    2727var now = new Date();
    28 var datetime = now.getUTCFullYear() + '-' + 
     28var datetime = now.getUTCFullYear() + '-' +
    2929zeroise(now.getUTCMonth() + 1, 2) + '-' +
    30 zeroise(now.getUTCDate(), 2) + 'T' + 
    31 zeroise(now.getUTCHours(), 2) + ':' + 
    32 zeroise(now.getUTCMinutes(), 2) + ':' + 
     30zeroise(now.getUTCDate(), 2) + 'T' +
     31zeroise(now.getUTCHours(), 2) + ':' +
     32zeroise(now.getUTCMinutes(), 2) + ':' +
    3333zeroise(now.getUTCSeconds() ,2) +
    3434'+00:00';
    3535
    36 edButtons[edButtons.length] = 
     36edButtons[edButtons.length] =
    3737new edButton('ed_strong'
    3838,'b'
    … …  
    4242);
    4343
    44 edButtons[edButtons.length] = 
     44edButtons[edButtons.length] =
    4545new edButton('ed_em'
    4646,'i'
    … …  
    5050);
    5151
    52 edButtons[edButtons.length] = 
     52edButtons[edButtons.length] =
    5353new edButton('ed_link'
    5454,'link'
    … …  
    5858); // special case
    5959
    60 edButtons[edButtons.length] = 
     60edButtons[edButtons.length] =
    6161new edButton('ed_block'
    6262,'b-quote'
    … …  
    6767
    6868
    69 edButtons[edButtons.length] = 
     69edButtons[edButtons.length] =
    7070new edButton('ed_del'
    7171,'del'
    … …  
    7575);
    7676
    77 edButtons[edButtons.length] = 
     77edButtons[edButtons.length] =
    7878new edButton('ed_ins'
    7979,'ins'
    … …  
    8383);
    8484
    85 edButtons[edButtons.length] = 
     85edButtons[edButtons.length] =
    8686new edButton('ed_img'
    8787,'img'
    … …  
    9292); // special case
    9393
    94 edButtons[edButtons.length] = 
     94edButtons[edButtons.length] =
    9595new edButton('ed_ul'
    9696,'ul'
    … …  
    100100);
    101101
    102 edButtons[edButtons.length] = 
     102edButtons[edButtons.length] =
    103103new edButton('ed_ol'
    104104,'ol'
    … …  
    108108);
    109109
    110 edButtons[edButtons.length] = 
     110edButtons[edButtons.length] =
    111111new edButton('ed_li'
    112112,'li'
    … …  
    116116);
    117117
    118 edButtons[edButtons.length] = 
     118edButtons[edButtons.length] =
    119119new edButton('ed_code'
    120120,'code'
    … …  
    124124);
    125125
    126 edButtons[edButtons.length] = 
     126edButtons[edButtons.length] =
    127127new edButton('ed_more'
    128128,'more'
    … …  
    133133);
    134134/*
    135 edButtons[edButtons.length] = 
     135edButtons[edButtons.length] =
    136136new edButton('ed_next'
    137137,'page'
    … …  
    221221                        newWin = ' target="_blank"';
    222222                }
    223                 var tempStr = '<a href="' + edLinks[i].URL + '"' + newWin + '>' 
     223                var tempStr = '<a href="' + edLinks[i].URL + '"' + newWin + '>'
    224224                            + edLinks[i].display
    225225                            + '</a>';
    … …  
    299299                        myField.value = myField.value.substring(0, startPos)
    300300                                      + edButtons[i].tagStart
    301                                       + myField.value.substring(startPos, endPos) 
     301                                      + myField.value.substring(startPos, endPos)
    302302                                      + edButtons[i].tagEnd
    303303                                      + myField.value.substring(endPos, myField.value.length);
    … …  
    306306                else {
    307307                        if (!edCheckOpenTags(i) || edButtons[i].tagEnd == '') {
    308                                 myField.value = myField.value.substring(0, startPos) 
     308                                myField.value = myField.value.substring(0, startPos)
    309309                                              + edButtons[i].tagStart
    310310                                              + myField.value.substring(endPos, myField.value.length);
    … …  
    313313                        }
    314314                        else {
    315                                 myField.value = myField.value.substring(0, startPos) 
     315                                myField.value = myField.value.substring(0, startPos)
    316316                                              + edButtons[i].tagEnd
    317317                                              + myField.value.substring(endPos, myField.value.length);
    … …  
    351351                var endPos = myField.selectionEnd;
    352352                myField.value = myField.value.substring(0, startPos)
    353                               + myValue 
     353                              + myValue
    354354                      + myField.value.substring(endPos, myField.value.length);
    355355                myField.focus();
    … …  
    381381        var myValue = prompt(quicktagsL10n.enterImageURL, 'http://');
    382382        if (myValue) {
    383                 myValue = '<img src="' 
    384                                 + myValue 
    385                                 + '" alt="' + prompt(quicktagsL10n.enterImageDescription, '') 
     383                myValue = '<img src="'
     384                                + myValue
     385                                + '" alt="' + prompt(quicktagsL10n.enterImageDescription, '')
    386386                                + '" />';
    387387                edInsertContent(myField, myValue);
  • trunk/wp-includes/js/wp-lists.js

    r7103 r7130  
    5959                if ( cls[3] ) { s.addColor = '#' + cls[3]; }
    6060                else { s.addColor = s.addColor || '#FFFF33'; }
    61                
     61
    6262                if ( !s ) { return false; }
    6363
  • trunk/wp-includes/media.php

    r7043 r7130  
    55// scale down the default size of an image so it's a better fit for the editor and theme
    66function image_constrain_size_for_editor($width, $height, $size = 'medium') {
    7        
     7
    88        if ( $size == 'thumb' ) {
    99                $max_width = intval(get_option('thumbnail_size_w'));
    … …  
    3434
    3535        list( $max_width, $max_height ) = apply_filters( 'editor_max_image_size', array( $max_width, $max_height ), $size );
    36        
     36
    3737        return wp_constrain_dimensions( $width, $height, $max_width, $max_height );
    3838}
    … …  
    5252// returns an array($url, $width, $height)
    5353function image_downsize($id, $size = 'medium') {
    54        
     54
    5555        $img_url = wp_get_attachment_url($id);
    5656        $meta = wp_get_attachment_metadata($id);
    5757        $width = $height = 0;
    58        
     58
    5959        // plugins can use this to provide resize services
    6060        if ( $out = apply_filters('image_downsize', false, $id, $size) )
    6161                return $out;
    62        
     62
    6363        if ( $size == 'thumb' ) {
    6464                // thumbnail: use the thumb as the displayed image, and constrain based on its dimensions
    … …  
    7575                list( $width, $height ) = image_constrain_size_for_editor( $meta['width'], $meta['height'], $size );
    7676        }
    77        
     77
    7878        return array( $img_url, $width, $height );
    79        
     79
    8080}
    8181
    … …  
    9898        if ( !$max_width and !$max_height )
    9999                return array( $current_width, $current_height );
    100        
     100
    101101        $width_ratio = $height_ratio = 1.0;
    102        
     102
    103103        if ( $max_width > 0 && $current_width > $max_width )
    104104                $width_ratio = $max_width / $current_width;
    105        
     105
    106106        if ( $max_height > 0 && $current_height > $max_height )
    107107                $height_ratio = $max_height / $current_height;
    108        
     108
    109109        // the smaller ratio is the one we need to fit it to the constraining box
    110110        $ratio = min( $width_ratio, $height_ratio );
    111        
     111
    112112        return array( intval($current_width * $ratio), intval($current_height * $ratio) );
    113113}
    … …  
    116116// if $crop is true, the largest matching central portion of the image will be cropped out and resized to the required size
    117117function image_resize_dimensions($orig_w, $orig_h, $dest_w, $dest_h, $crop=false) {
    118        
     118
    119119        if ($orig_w <= 0 || $orig_h <= 0)
    120120                return false;
    … …  
    122122        if ($dest_w <= 0 && $dest_h <= 0)
    123123                return false;
    124        
     124
    125125        if ( $crop ) {
    126126                // crop the largest possible portion of the original image that we can size to $dest_w x $dest_h
    … …  
    136136
    137137                $size_ratio = max($new_w / $orig_w, $new_h / $orig_h);
    138                
     138
    139139                $crop_w = ceil($new_w / $size_ratio);
    140140                $crop_h = ceil($new_h / $size_ratio);
    … …  
    147147                $crop_w = $orig_w;
    148148                $crop_h = $orig_h;
    149                
     149
    150150                $s_x = 0;
    151151                $s_y = 0;
    152                
     152
    153153                list( $new_w, $new_h ) = wp_constrain_dimensions( $orig_w, $orig_h, $dest_w, $dest_h );
    154154        }
    155        
     155
    156156        // if the resulting image would be the same size or larger we don't want to resize it
    157157        if ($new_w >= $orig_w && $new_h >= $orig_h)
    … …  
    176176                return $dims;
    177177        list($dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h) = $dims;
    178        
     178
    179179        $newimage = imagecreatetruecolor( $dst_w, $dst_h);
    180180
  • trunk/wp-includes/pluggable.php

    r7096 r7130  
    651651                $nonce = $_REQUEST['_ajax_nonce'] ? $_REQUEST['_ajax_nonce'] : $_REQUEST['_wpnonce'];
    652652
    653         if ( !wp_verify_nonce( $nonce, $action ) ) 
     653        if ( !wp_verify_nonce( $nonce, $action ) )
    654654                die('-1');
    655655
    … …  
    857857        $comments_waiting = $wpdb->get_var("SELECT count(comment_ID) FROM $wpdb->comments WHERE comment_approved = '0'");
    858858
    859         switch ($comment->comment_type) 
     859        switch ($comment->comment_type)
    860860        {
    861861                case 'trackback':
    … …  
    883883                        break;
    884884        }
    885        
     885
    886886        $notify_message .= sprintf( __('Approve it: %s'),  get_option('siteurl')."/wp-admin/comment.php?action=mac&c=$comment_id" ) . "\r\n";
    887887        $notify_message .= sprintf( __('Delete it: %s'), get_option('siteurl')."/wp-admin/comment.php?action=cdc&c=$comment_id" ) . "\r\n";
    888888        $notify_message .= sprintf( __('Spam it: %s'), get_option('siteurl')."/wp-admin/comment.php?action=cdc&dt=spam&c=$comment_id" ) . "\r\n";
    889        
     889
    890890        $strCommentsPending = sprintf( __ngettext('%s comment', '%s comments', $comments_waiting), $comments_waiting );
    891891        $notify_message .= sprintf( __('Currently %s are waiting for approval. Please visit the moderation panel:'), $strCommentsPending ) . "\r\n";
  • trunk/wp-includes/post.php

    r7109 r7130  
    14291429 * check_and_publish_future_post() - check to make sure post has correct status before
    14301430 * passing it on to be published. Invoked by cron 'publish_future_post' event
    1431  * This safeguard prevents cron from publishing drafts, etc. 
    1432  * 
     1431 * This safeguard prevents cron from publishing drafts, etc.
     1432 *
    14331433 * {@internal Missing Long Description}}
    14341434 *
    … …  
    14421442 */
    14431443function check_and_publish_future_post($post_id) {
    1444        
     1444
    14451445        $post = get_post($post_id);
    14461446
    … …  
    14511451                return;
    14521452
    1453         return wp_publish_post($post_id); 
     1453        return wp_publish_post($post_id);
    14541454}
    14551455
    … …  
    29322932    if ( !empty($_post->ancestors) )
    29332933        return;
    2934  
     2934
    29352935    $_post->ancestors = array();
    29362936
  • trunk/wp-includes/script-loader.php

    r7103 r7130  
    3333                $visual_editor = apply_filters('visual_editor', array('tiny_mce'));
    3434                $this->add( 'editor', false, $visual_editor, '20080218' );
    35                
     35
    3636                $this->add( 'editor_functions', '/wp-admin/js/editor.js', false, '20080221' );
    37                
     37
    3838                // Modify this version when tinyMCE plugins are changed.
    3939                $mce_version = apply_filters('tiny_mce_version', '20080226');
    4040                $this->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_config.php', array('editor_functions'), $mce_version );
    41                
     41
    4242                $this->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.6');
    4343
    … …  
    480480}
    481481
    482 // These localizations require information that may not be loaded even by init 
    483 function wp_just_in_time_script_localization() { 
    484         wp_localize_script( 'tiny_mce', 'wpTinyMCEConfig', array( 'defaultEditor' => wp_default_editor() ) ); 
    485 }
    486 
    487 add_filter( 'wp_print_scripts', 'wp_just_in_time_script_localization' ); 
     482// These localizations require information that may not be loaded even by init
     483function wp_just_in_time_script_localization() {
     484        wp_localize_script( 'tiny_mce', 'wpTinyMCEConfig', array( 'defaultEditor' => wp_default_editor() ) );
     485}
     486
     487add_filter( 'wp_print_scripts', 'wp_just_in_time_script_localization' );
    488488add_filter( 'print_scripts_array', 'wp_prototype_before_jquery' );
    489489
  • trunk/wp-includes/widgets.php

    r7080 r7130  
    263263                                if ( !$widget_id || $widget_id == $wp_registered_widgets[$widget]['id'] )
    264264                                        return $sidebar;
    265                                
     265
    266266
    267267        return false;
Note: See TracChangeset for help on using the changeset viewer.