Make WordPress Core

Changeset 4953


Ignore:
Timestamp:
02/27/2007 03:24:54 PM (17 years ago)
Author:
markjaquith
Message:

trailing tabs and whitespace cleanup.

Location:
trunk
Files:
36 edited

Legend:

Unmodified
Added
Removed
  • trunk/app.php

    r4937 r4953  
    2424
    2525    $_SERVER['PATH_INFO'] = $action;
    26    
     26
    2727    if ($eid) {
    2828        $_SERVER['PATH_INFO'] .= "/$eid";
     
    174174            array_push($this->entry->categories, $attrs);
    175175        }
    176        
     176
    177177        $this->ns_decls = array();
    178178    }
     
    202202
    203203        array_shift($this->ns_contexts);
    204        
     204
    205205        #print str_repeat(" ", $this->depth * $this->indent) . "end_element('$name')" ."\n";
    206206
     
    343343                } else {
    344344                    // only allow what we have handlers for...
    345                     $this->not_allowed(array_keys($funcs)); 
     345                    $this->not_allowed(array_keys($funcs));
    346346                }
    347347            }
     
    454454
    455455    function put_post($postID) {
    456        
     456
    457457        // checked for valid content-types (atom+xml)
    458458        // quick check and exit
     
    509509            $this->auth_required('Sorry, you do not have the right to delete this post.');
    510510        }
    511        
     511
    512512        if ($entry['post_type'] == 'attachment') {
    513             $this->delete_attachment($postID);     
     513            $this->delete_attachment($postID);
    514514        } else {
    515515            $result = wp_delete_post($postID);
     
    524524
    525525    }
    526    
     526
    527527    function get_attachment($postID = NULL) {
    528528
     
    552552        }
    553553        fclose($fp);
    554        
     554
    555555        $slug = '';
    556556        if ( isset( $_SERVER['HTTP_SLUG'] ) )
     
    565565
    566566        log_app('wp_upload_bits returns:',print_r($file,true));
    567        
     567
    568568        $url = $file['url'];
    569569        $file = $file['file'];
     
    719719        fclose($fp);
    720720        fclose($localfp);
    721    
     721
    722722        log_app('function',"put_file($postID)");
    723723        $this->ok();
     
    761761        echo $url;
    762762    }
    763    
     763
    764764    function get_attachments_url($page = NULL) {
    765765        global $use_querystring;
     
    791791            $postID = $GLOBALS['post']->ID;
    792792        }
    793        
     793
    794794        if ($use_querystring) {
    795795            $url = get_bloginfo('url') . '/' . $this->script_name . '?action=/' . $this->ENTRY_PATH . "&eid=$postID";
     
    813813            $postID = $GLOBALS['post']->ID;
    814814        }
    815        
     815
    816816        if ($use_querystring) {
    817817            $url = get_bloginfo('url') . '/' . $this->script_name . '?action=/' . $this->MEDIA_SINGLE_PATH ."&eid=$postID";
     
    874874        }
    875875        $page = (int) $page;
    876        
    877         $count = get_option('posts_per_rss');   
     876
     877        $count = get_option('posts_per_rss');
    878878        $query = "paged=$page&posts_per_page=$count&order=DESC";
    879879        if($post_type == 'attachment') {
     
    888888        $blog_id = $GLOBALS['blog_id'];
    889889        $post_cache = $GLOBALS['post_cache'];
    890        
     890
    891891
    892892        $total_count = $this->get_posts_count();
     
    10571057        exit;
    10581058    }
    1059    
     1059
    10601060    function not_found() {
    10611061        log_app('Status','404: Not Found');
     
    10781078        exit;
    10791079    }
    1080    
     1080
    10811081    function created($post_ID, $content, $post_type = 'post') {
    10821082        global $use_querystring;
     
    11521152        $login_data = array();
    11531153        $already_md5 = false;
    1154        
     1154
    11551155        log_app("authenticate()",print_r($_ENV, true));
    11561156
     
    12101210
    12111211    function process_conditionals() {
    1212        
     1212
    12131213        if(empty($this->params)) return;
    12141214        if($_SERVER['REQUEST_METHOD'] == 'DELETE') return;
     
    12411241        $client_modified_timestamp = $client_last_modified ? strtotime($client_last_modified) : 0;
    12421242
    1243         // Make a timestamp for our most recent modification... 
     1243        // Make a timestamp for our most recent modification...
    12441244        $wp_modified_timestamp = strtotime($wp_last_modified);
    12451245
  • trunk/wp-admin/admin-ajax.php

    r4882 r4953  
    227227    $_POST['post_category'] = explode(",", $_POST['catslist']);
    228228    if($_POST['post_type'] == 'page' || empty($_POST['post_category']))
    229         unset($_POST['post_category']); 
    230    
     229        unset($_POST['post_category']);
     230
    231231    if($_POST['post_ID'] < 0) {
    232232        $_POST['temp_ID'] = $_POST['post_ID'];
  • trunk/wp-admin/admin-functions.php

    r4884 r4953  
    682682            // No selected categories, strange
    683683            $checked_categories[] = $default;
    684         }   
     684        }
    685685    } else {
    686686        $checked_categories[] = $default;
     
    738738            // No selected categories, strange
    739739            $checked_categories[] = $default;
    740         }   
     740        }
    741741    } else {
    742742        $checked_categories[] = $default;
     
    779779        $output = ob_get_contents();
    780780        ob_end_clean();
    781        
     781
    782782        $output = apply_filters('cat_rows', $output);
    783783
     
    13171317    if ( isset( $plugin_page ) && isset( $_wp_submenu_nopriv[$parent][$plugin_page] ) )
    13181318        return false;
    1319    
     1319
    13201320    if ( empty( $parent) ) {
    13211321        if ( isset( $_wp_menu_nopriv[$pagenow] ) )
     
    13291329                return false;
    13301330            if ( isset( $plugin_page ) && isset( $_wp_submenu_nopriv[$key][$plugin_page] ) )
    1331             return false;   
     1331            return false;
    13321332        }
    13331333        return true;
     
    14511451                    $parent_file = $_wp_real_parent_file[$parent_file];
    14521452            return $parent_file;
    1453         }           
     1453        }
    14541454    }
    14551455
     
    14581458        if ( isset( $_wp_real_parent_file[$parent_file] ) )
    14591459            $parent_file = $_wp_real_parent_file[$parent_file];
    1460         return $parent_file;       
     1460        return $parent_file;
    14611461    }
    14621462
     
    18981898    // Compute the URL
    18991899    $url = $uploads['url'] . "/$filename";
    1900    
     1900
    19011901    $return = apply_filters( 'wp_handle_upload', array( 'file' => $new_file, 'url' => $url, 'type' => $type ) );
    19021902
     
    20572057    wp_clearcookie();
    20582058    // Set cookies for new paths.
    2059     wp_setcookie( $user_login, $user_pass_md5, true, get_option( 'home' ), get_option( 'siteurl' ));   
     2059    wp_setcookie( $user_login, $user_pass_md5, true, get_option( 'home' ), get_option( 'siteurl' ));
    20602060}
    20612061
  • trunk/wp-admin/custom-header.php

    r4910 r4953  
    1818    function js_includes() {
    1919        wp_enqueue_script('cropper');
    20         wp_enqueue_script('colorpicker');   
     20        wp_enqueue_script('colorpicker');
    2121    }
    2222
     
    116116        pickColor('<?php echo HEADER_TEXTCOLOR; ?>');
    117117    }
    118    
     118
    119119    function hide_text() {
    120120        $('name').style.display = 'none';
     
    127127        Event.observe( $('hidetext'), 'click', show_text );
    128128    }
    129    
     129
    130130    function show_text() {
    131131        $('name').style.display = 'block';
     
    135135        $('textcolor').value = '<?php echo HEADER_TEXTCOLOR; ?>';
    136136        $('hidetext').value = '<?php _e('Hide Text'); ?>';
    137         Event.stopObserving( $('hidetext'), 'click', show_text );   
     137        Event.stopObserving( $('hidetext'), 'click', show_text );
    138138        Event.observe( $('hidetext'), 'click', hide_text );
    139139    }
  • trunk/wp-admin/import/blogger.php

    r4896 r4953  
    5656        }
    5757        $this->token = $matches[1];
    58        
     58
    5959        wp_redirect( remove_query_arg( array( 'token', 'noheader' ) ) );
    6060    }
     
    370370                if ( ! $sock ) return; // TODO: Error handling
    371371                $response = $this->_txrx( $sock, $request );
    372    
     372
    373373                $response = $this->parse_response( $response );
    374    
     374
    375375                // Extract the entries and send for insertion
    376376                preg_match_all( '/<entry[^>]*>.*?<\/entry>/s', $response['body'], $matches );
     
    438438                        $entry = "<feed>$entry</feed>";
    439439                        $AtomParser = new AtomParser();
    440                         $AtomParser->parse( $entry );   
     440                        $AtomParser->parse( $entry );
    441441                        $this->import_comment($AtomParser->entry);
    442442                        unset($AtomParser);
     
    624624            $options .= "<option value='$user->user_id'$sel>$user->display_name</option>";
    625625        }
    626        
     626
    627627        return $options;
    628628    }
     
    707707        global $wpdb;
    708708        $options = get_option( 'blogger_importer' );
    709        
     709
    710710        if ( isset( $options['token'] ) )
    711711            $this->revoke( $options['token'] );
     
    923923            array_push($this->entry->categories, $attrs['term']);
    924924        }
    925        
     925
    926926        $this->ns_decls = array();
    927927    }
     
    951951
    952952        array_shift($this->ns_contexts);
    953        
     953
    954954        #print str_repeat(" ", $this->depth * $this->indent) . "end_element('$name')" ."\n";
    955955
  • trunk/wp-admin/import/greymatter.php

    r4608 r4953  
    9292        if (!chdir($gmpath))
    9393            wp_die(sprintf(__("Wrong path, %s\ndoesn't exist\non the server"), $gmpath));
    94            
     94
    9595        $this->header();
    9696?>
     
    129129        $user_id = wp_insert_user($user_info);
    130130        $this->gmnames[$userdata[0]] = $user_id;
    131        
     131
    132132        printf('<li>'.__('user %s...').' <strong>'.__('Done').'</strong></li>', "<em>$user_login</em>");
    133133    }
     
    214214                    $user_url=$wpdb->escape("");
    215215                    $user_joindate=$wpdb->escape($user_joindate);
    216                    
     216
    217217                    $user_info = array("user_login"=>$user_login, "user_pass"=>$pass1, "user_nickname"=>$user_nickname, "user_email"=>$user_email, "user_url"=>$user_url, "user_ip"=>$user_ip, "user_domain"=>$user_domain, "user_browser"=>$user_browser, "dateYMDhour"=>$user_joindate, "user_level"=>0, "user_idmode"=>"nickname");
    218218                    $user_id = wp_insert_user($user_info);
    219219                    $this->gmnames[$postinfo[1]] = $user_id;
    220                    
     220
    221221                    echo ': ';
    222222                    printf(__('registered deleted user %s at level 0 '), "<em>$user_login</em>");
    223223                }
    224            
     224
    225225                if (array_key_exists($postinfo[1], $this->gmnames)) {
    226226                    $post_author = $this->gmnames[$postinfo[1]];
     
    228228                    $post_author = $user_id;
    229229                }
    230            
     230
    231231                $postdata = compact('post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_title', 'post_excerpt', 'post_status', 'comment_status', 'ping_status', 'post_modified', 'post_modified_gmt');
    232232                $post_ID = wp_insert_post($postdata);
  • trunk/wp-admin/link-import.php

    r4734 r4953  
    1313<?php
    1414switch ($step) {
    15     case 0:
    16     {
    17         include_once('admin-header.php');
    18         if ( !current_user_can('manage_links') )
    19             wp_die(__('Cheatin&#8217; uh?'));
     15    case 0: {
     16        include_once('admin-header.php');
     17        if ( !current_user_can('manage_links') )
     18            wp_die(__('Cheatin&#8217; uh?'));
    2019
    21         $opmltype = 'blogrolling'; // default.
     20        $opmltype = 'blogrolling'; // default.
    2221?>
    2322
    2423<div class="wrap">
     24
    2525<h2><?php _e('Import your blogroll from another system') ?> </h2>
    2626<form enctype="multipart/form-data" action="link-import.php" method="post" name="blogroll">
     
    4040<input id="userfile" name="userfile" type="file" size="30" />
    4141</div>
    42 
    4342
    4443</div>
     
    6160</div>
    6261<?php
    63                 break;
    64             } // end case 0
     62        break;
     63    } // end case 0
    6564
    66     case 1: {
     65    case 1: {
    6766        check_admin_referer('import-bookmarks');
    6867
    69                 include_once('admin-header.php');
    70                 if ( !current_user_can('manage_links') )
    71                     wp_die(__('Cheatin&#8217; uh?'));
     68        include_once('admin-header.php');
     69        if ( !current_user_can('manage_links') )
     70            wp_die(__('Cheatin&#8217; uh?'));
    7271?>
    7372<div class="wrap">
    7473
    75      <h2><?php _e('Importing...') ?></h2>
     74<h2><?php _e('Importing...') ?></h2>
    7675<?php
    77                 $cat_id = $_POST['cat_id'];
    78                 if (($cat_id == '') || ($cat_id == 0)) {
    79                     $cat_id  = 1;
    80                 }
     76        $cat_id = $_POST['cat_id'];
     77        if ( $cat_id == '' || $cat_id == 0 )
     78            $cat_id  = 1;
    8179
    82                 $opml_url = $_POST['opml_url'];
    83                 if (isset($opml_url) && $opml_url != '' && $opml_url != 'http://') {
    84                     $blogrolling = true;
    85                 }
    86                 else // try to get the upload file.
    87                 {
    88                     $overrides = array('test_form' => false, 'test_type' => false);
    89                     $file = wp_handle_upload($_FILES['userfile'], $overrides);
     80        $opml_url = $_POST['opml_url'];
     81        if ( isset($opml_url) && $opml_url != '' && $opml_url != 'http://' ) {
     82            $blogrolling = true;
     83        } else { // try to get the upload file.
     84            $overrides = array('test_form' => false, 'test_type' => false);
     85            $file = wp_handle_upload($_FILES['userfile'], $overrides);
    9086
    91                     if ( isset($file['error']) )
    92                         wp_die($file['error']);
     87            if ( isset($file['error']) )
     88                wp_die($file['error']);
    9389
    94                     $url = $file['url'];
    95                     $opml_url = $file['file'];
    96                     $blogrolling = false;
    97                 }
     90            $url = $file['url'];
     91            $opml_url = $file['file'];
     92            $blogrolling = false;
     93        }
    9894
    99                 if (isset($opml_url) && $opml_url != '') {
    100                     $opml = wp_remote_fopen($opml_url);
    101                     include_once('link-parse-opml.php');
     95        if ( isset($opml_url) && $opml_url != '' ) {
     96            $opml = wp_remote_fopen($opml_url);
     97            include_once('link-parse-opml.php');
    10298
    103                     $link_count = count($names);
    104                     for ($i = 0; $i < $link_count; $i++) {
    105                         if ('Last' == substr($titles[$i], 0, 4))
    106                             $titles[$i] = '';
    107                         if ('http' == substr($titles[$i], 0, 4))
    108                             $titles[$i] = '';
    109                         $link = array( 'link_url' => $urls[$i], 'link_name' => $wpdb->escape($names[$i]), 'link_category' => array($cat_id), 'link_description' => $wpdb->escape($descriptions[$i]), 'link_owner' => $user_ID, 'link_rss' => $feeds[$i]);                       
    110                         wp_insert_link($link);
    111                         echo sprintf('<p>'.__('Inserted <strong>%s</strong>').'</p>', $names[$i]);
    112                     }
     99            $link_count = count($names);
     100            for ( $i = 0; $i < $link_count; $i++ ) {
     101                if ('Last' == substr($titles[$i], 0, 4))
     102                    $titles[$i] = '';
     103                if ( 'http' == substr($titles[$i], 0, 4) )
     104                    $titles[$i] = '';
     105                $link = array( 'link_url' => $urls[$i], 'link_name' => $wpdb->escape($names[$i]), 'link_category' => array($cat_id), 'link_description' => $wpdb->escape($descriptions[$i]), 'link_owner' => $user_ID, 'link_rss' => $feeds[$i]);
     106                wp_insert_link($link);
     107                echo sprintf('<p>'.__('Inserted <strong>%s</strong>').'</p>', $names[$i]);
     108            }
    113109?>
    114      <p><?php printf(__('Inserted %1$d links into category %2$s. All done! Go <a href="%3$s">manage those links</a>.'), $link_count, $cat_id, 'link-manager.php') ?></p>
     110
     111<p><?php printf(__('Inserted %1$d links into category %2$s. All done! Go <a href="%3$s">manage those links</a>.'), $link_count, $cat_id, 'link-manager.php') ?></p>
     112
    115113<?php
    116                 } // end if got url
    117                 else
    118                 {
    119                     echo "<p>" . __("You need to supply your OPML url. Press back on your browser and try again") . "</p>\n";
    120                 } // end else
     114} // end if got url
     115else
     116{
     117    echo "<p>" . __("You need to supply your OPML url. Press back on your browser and try again") . "</p>\n";
     118} // end else
    121119
    122                 if ( ! $blogrolling )
    123                     @unlink($opml_url);
     120if ( ! $blogrolling )
     121    @unlink($opml_url);
    124122?>
    125123</div>
    126124<?php
    127                 break;
    128             } // end case 1
     125        break;
     126    } // end case 1
    129127} // end switch
    130128
  • trunk/wp-admin/menu.php

    r4694 r4953  
    1515else
    1616    $menu[10] = array(__('Manage'), 'edit_posts', 'edit.php');
    17    
     17
    1818$menu[15] = array(__('Comments'), 'edit_posts', 'edit-comments.php');
    1919$menu[20] = array(__('Blogroll'), 'manage_links', 'link-manager.php');
     
    105105        $_wp_real_parent_file[$old_parent] = $new_parent;
    106106        $menu[$id][2] = $new_parent;
    107        
     107
    108108        foreach ($submenu[$old_parent] as $index => $data) {
    109109            $submenu[$new_parent][$index] = $submenu[$old_parent][$index];
  • trunk/wp-admin/options.php

    r4656 r4953  
    7979    }
    8080
    81     return $value; 
     81    return $value;
    8282}
    8383
     
    151151    if (stristr($value, "\n")) echo "<textarea class='$class' name='$option->option_name' id='$option->option_name' cols='30' rows='5'>$value</textarea>";
    152152    else echo "<input class='$class' type='text' name='$option->option_name' id='$option->option_name' size='30' value='" . $value . "'$disabled />";
    153    
     153
    154154    echo "</td>
    155155    <td>$option->option_description</td>
  • trunk/wp-admin/page.php

    r4915 r4953  
    108108
    109109        if ( isset($_POST['save']) )
    110             $location = "page.php?action=edit&post=$page_ID";       
     110            $location = "page.php?action=edit&post=$page_ID";
    111111    } else {
    112112        if ($_POST['save']) {
  • trunk/wp-admin/post.php

    r4780 r4953  
    4848    $post_ID = $p = (int) $_GET['post'];
    4949    $post = get_post($post_ID);
    50    
     50
    5151    if ( 'page' == $post->post_type ) {
    5252        wp_redirect("page.php?action=edit&post=$post_ID");
     
    120120            $referredby = preg_replace('|https?://[^/]+|i', '', $_POST['referredby']);
    121121        $referer = preg_replace('|https?://[^/]+|i', '', wp_get_referer());
    122    
     122
    123123        if ($_POST['save']) {
    124124            $location = "post.php?action=edit&post=$post_ID";
  • trunk/wp-admin/upgrade-schema.php

    r4860 r4953  
    33
    44$charset_collate = '';
    5    
     5
    66if ( version_compare(mysql_get_server_info(), '4.1.0', '>=') ) {
    77    if ( ! empty($wpdb->charset) )
    88        $charset_collate = "DEFAULT CHARACTER SET $wpdb->charset";
    99    if ( ! empty($wpdb->collate) )
    10         $charset_collate .= " COLLATE $wpdb->collate"; 
     10        $charset_collate .= " COLLATE $wpdb->collate";
    1111}
    1212
  • trunk/wp-admin/upload-functions.php

    r4767 r4953  
    1414    if ( isset($attachment_data['width']) )
    1515        list($width,$height) = wp_shrink_dimensions($attachment_data['width'], $attachment_data['height'], 171, 128);
    16        
     16
    1717    ob_start();
    1818        the_title();
     
    2020    ob_end_clean();
    2121    $post_content = apply_filters( 'content_edit_pre', $post->post_content );
    22    
     22
    2323    $class = 'text';
    2424    $innerHTML = get_attachment_innerHTML( $id, false, $dims );
     
    286286    global $wpdb, $action, $paged;
    287287    $old_vars = compact( 'paged' );
    288    
     288
    289289    switch ( $action ) :
    290290    case 'edit' :
  • trunk/wp-admin/upload-js.php

    r4768 r4953  
    190190            new Insertion.Top('upload-content', h);
    191191            if (e) Event.stop(e);
    192             return false;       
     192            return false;
    193193        },
    194194
     
    265265            return false;
    266266        }
    267            
     267
    268268    };
    269269    theFileList.initializeVars();
  • trunk/wp-includes/bookmark-template.php

    r4800 r4953  
    343343        //output one single list using title_li for the title
    344344        $bookmarks = get_bookmarks("limit=$limit&category=$category&show_updated=$show_updated&orderby=$orderby&order=$order&hide_invisible=$hide_invisible&show_updated=$show_updated");
    345        
     345
    346346        if ( !empty($bookmarks) ) {
    347347            if ( !empty( $title_li ) ){
  • trunk/wp-includes/bookmark.php

    r4529 r4953  
    7373    if (!empty($exclusions))
    7474        $exclusions .= ')';
    75        
     75
    7676    if ( ! empty($category_name) ) {
    7777        if ( $cat_id = $wpdb->get_var("SELECT cat_ID FROM $wpdb->categories WHERE cat_name='$category_name' LIMIT 1") )
  • trunk/wp-includes/cache.php

    r4856 r4953  
    387387        return $this->__construct();
    388388    }
    389    
     389
    390390    function __construct() {
    391391        global $blog_id;
     
    430430    function __destruct() {
    431431        $this->save();
    432         return true;   
     432        return true;
    433433    }
    434434}
  • trunk/wp-includes/category-template.php

    r4903 r4953  
    248248    } else {
    249249        global $wp_query;
    250        
     250
    251251        if ( is_category() )
    252252            $r['current_category'] = $wp_query->get_queried_object_id();
  • trunk/wp-includes/classes.php

    r4893 r4953  
    415415                    $output = call_user_func_array(array(&$this, 'start_el'), $cb_args);
    416416                }
    417    
     417
    418418                // End the element.
    419419                if ( isset($element->$id_field) && $element->$id_field != 0 ) {
     
    421421                    $output = call_user_func_array(array(&$this, 'end_el'), $cb_args);
    422422                }
    423    
    424                 continue;   
    425             }
    426    
     423
     424                continue;
     425            }
     426
    427427            // Walk the tree.
    428428            if ( !empty($previous_element) && ($element->$parent_field == $previous_element->$id_field) ) {
     
    513513
    514514        $output .= $indent . '<li class="' . $css_class . '"><a href="' . get_page_link($page->ID) . '" title="' . attribute_escape($page->post_title) . '">' . $page->post_title . '</a>';
    515    
     515
    516516        if ( !empty($show_date) ) {
    517517            if ( 'modified' == $show_date )
     
    519519            else
    520520                $time = $page->post_date;
    521    
     521
    522522            $output .= " " . mysql2date($date_format, $time);
    523523        }
     
    525525        return $output;
    526526    }
    527    
     527
    528528    function end_el($output, $page, $depth) {
    529529        $output .= "</li>\n";
     
    614614                $link .= ')';
    615615        }
    616    
     616
    617617        if ( isset($show_count) && $show_count )
    618618            $link .= ' (' . intval($category->category_count) . ')';
    619    
     619
    620620        if ( isset($show_date) && $show_date ) {
    621621            $link .= ' ' . gmdate('Y-m-d', $category->last_update_timestamp);
  • trunk/wp-includes/cron.php

    r4834 r4953  
    5555function wp_clear_scheduled_hook( $hook ) {
    5656    $args = array_slice( func_get_args(), 1 );
    57    
     57
    5858    while ( $timestamp = wp_next_scheduled( $hook, $args ) )
    5959        wp_unschedule_event( $timestamp, $hook, $args );
     
    7474function spawn_cron() {
    7575    $crons = _get_cron_array();
    76    
     76
    7777    if ( !is_array($crons) )
    7878        return;
    79    
     79
    8080    $keys = array_keys( $crons );
    8181    if ( array_shift( $keys ) > time() )
     
    9999
    100100    $crons = _get_cron_array();
    101    
     101
    102102    if ( !is_array($crons) )
    103103        return;
  • trunk/wp-includes/feed-atom-comments.php

    r4934 r4953  
    1717    ?></title>
    1818    <subtitle type="text"><?php bloginfo_rss('description'); ?></subtitle>
    19    
     19
    2020    <updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastcommentmodified('GMT')); ?></updated>
    2121    <generator uri="http://wordpress.org/" version="<?php bloginfo('version'); ?>">WordPress</generator>
    22    
     22
    2323    <link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" content="<?php bloginfo_rss('home'); ?>" />
    2424    <link rel="self" type="application/atom+xml" href="<?php bloginfo_rss('comments_atom_url'); ?>" />
     
    4242        ?></title>
    4343        <link rel="alternate" href="<?php comment_link(); ?>" type="<?php bloginfo_rss('content_type'); ?>" />
    44        
     44
    4545        <author>
    4646            <name><?php comment_author_rss(); ?></name>
     
    4848
    4949        </author>
    50        
     50
    5151        <id><?php comment_link(); ?></id>
    5252        <updated><?php echo mysql2date('D, d M Y H:i:s +0000', get_comment_time('Y-m-d H:i:s', true), false); ?></updated>
  • trunk/wp-includes/feed-atom.php

    r4930 r4953  
    1414    <title type="text"><?php bloginfo_rss('name') ?></title>
    1515    <subtitle type="text"><?php bloginfo_rss("description") ?></subtitle>
    16    
     16
    1717    <updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT')); ?></updated>
    1818    <generator uri="http://wordpress.org/" version="<?php bloginfo_rss('version'); ?>">WordPress</generator>
  • trunk/wp-includes/formatting.php

    r4900 r4953  
    2222
    2323    $dynamic_characters = array('/\'(\d\d(?:&#8217;|\')?s)/', '/(\s|\A|")\'/', '/(\d+)"/', '/(\d+)\'/', '/(\S)\'([^\'\s])/', '/(\s|\A)"(?!\s)/', '/"(\s|\S|\Z)/', '/\'([\s.]|\Z)/', '/(\d+)x(\d+)/');
    24     $dynamic_replacements = array('&#8217;$1','$1&#8216;', '$1&#8243;', '$1&#8242;', '$1&#8217;$2', '$1&#8220;$2', '&#8221;$1', '&#8217;$1', '$1&#215;$2'); 
     24    $dynamic_replacements = array('&#8217;$1','$1&#8216;', '$1&#8243;', '$1&#8242;', '$1&#8217;$2', '$1&#8220;$2', '&#8221;$1', '&#8217;$1', '$1&#215;$2');
    2525
    2626    for ( $i = 0; $i < $stop; $i++ ) {
  • trunk/wp-includes/general-template.php

    r4928 r4953  
    352352         $arcresults = $wpdb->get_results("SELECT DISTINCT YEAR(post_date) AS `year`, count(ID) as posts FROM $wpdb->posts WHERE post_type ='post' AND post_status = 'publish' GROUP BY YEAR(post_date) ORDER BY post_date DESC" . $limit);
    353353        if ($arcresults) {
    354             $afterafter = $after;
    355             foreach ($arcresults as $arcresult) {
    356                 $url = get_year_link($arcresult->year);
    357                 $text = sprintf('%d', $arcresult->year);
     354            $afterafter = $after;
     355            foreach ($arcresults as $arcresult) {
     356                $url = get_year_link($arcresult->year);
     357                $text = sprintf('%d', $arcresult->year);
    358358                if ($show_post_count)
    359                     $after = '&nbsp;('.$arcresult->posts.')' . $afterafter;
    360                 echo get_archives_link($url, $text, $format, $before, $after);
    361             }
    362         }           
     359                    $after = '&nbsp;('.$arcresult->posts.')' . $afterafter;
     360                echo get_archives_link($url, $text, $format, $before, $after);
     361            }
     362        }
    363363    } elseif ( 'daily' == $type ) {
    364364        $arcresults = $wpdb->get_results("SELECT DISTINCT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, DAYOFMONTH(post_date) AS `dayofmonth`, count(ID) as posts FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' GROUP BY YEAR(post_date), MONTH(post_date), DAYOFMONTH(post_date) ORDER BY post_date DESC" . $limit);
  • trunk/wp-includes/gettext.php

    r4917 r4953  
    309309    # results in parse error in eval
    310310    $string .= ';';
    311    
     311
    312312    $total = 0;
    313313    $plural = 0;
  • trunk/wp-includes/js/autosave-js.php

    r4760 r4953  
    2929    ((now.getSeconds() < 10) ? ":0" : ":") + now.getSeconds();
    3030}
    31    
     31
    3232function autosave_update_nonce() {
    3333    var response = nonceAjax.response;
     
    3939    var res = parseInt(response);
    4040    var message;
    41    
     41
    4242    if(isNaN(res)) {
    4343        message = "<?php echo js_escape(__('Error: ')); ?>" + response;
     
    7171    var res = parseInt(response);
    7272    var message;
    73    
     73
    7474    if(isNaN(res)) {
    7575        message = "<?php echo js_escape(__('Error: ')); ?>" + response;
     
    128128    }
    129129    catslist = goodcats.join(",");
    130    
     130
    131131    autosaveAjax.setVar("action", "autosave");
    132132    autosaveAjax.setVar("cookie", document.cookie);
     
    140140        autosaveAjax.setVar("ping_status", 'open');
    141141    if(form.excerpt)
    142         autosaveAjax.setVar("excerpt", form.excerpt.value);     
    143        
     142        autosaveAjax.setVar("excerpt", form.excerpt.value);
     143
    144144    if ( typeof tinyMCE == "undefined" || tinyMCE.configs.length < 1 || rich == false ) {
    145145        autosaveAjax.setVar("content", form.content.value);
     
    148148        autosaveAjax.setVar("content", form.content.value);
    149149    }
    150        
     150
    151151    autosaveAjax.requestFile = "<?php echo get_option('siteurl'); ?>/wp-admin/admin-ajax.php";
    152152    autosaveAjax.method = "POST";
  • trunk/wp-includes/js/tinymce/tiny_mce_config.php

    r4932 r4953  
    4141    $mce_browsers = apply_filters('mce_browsers', array('msie', 'gecko', 'opera', 'safari'));
    4242    $mce_browsers = implode($mce_browsers, ',');
    43    
     43
    4444    $mce_popups_css = get_option('siteurl') . '/wp-includes/js/tinymce/plugins/wordpress/popups.css';
    4545    $mce_css = get_option('siteurl') . '/wp-includes/js/tinymce/plugins/wordpress/wordpress.css';
  • trunk/wp-includes/link-template.php

    r4929 r4953  
    263263    }
    264264
    265     return apply_filters('post_comments_feed_link', $url); 
     265    return apply_filters('post_comments_feed_link', $url);
    266266}
    267267
  • trunk/wp-includes/pluggable.php

    r4947 r4953  
    164164        $phpmailer = new PHPMailer();
    165165    }
    166        
     166
    167167    $mail = compact('to', 'subject', 'message', 'headers');
    168168    $mail = apply_filters('wp_mail', $mail);
  • trunk/wp-includes/post-template.php

    r4925 r4953  
    102102                $output .= ' <a href="'. get_permalink() . "#more-$id\" class=\"more-link\">$more_link_text</a>";
    103103        }
    104            
     104
    105105    }
    106106    if ( $preview ) // preview fix for javascript bug with foreign languages
  • trunk/wp-includes/post.php

    r4873 r4953  
    8181        $extended = '';
    8282    }
    83    
     83
    8484    // Strip leading and trailing whitespace
    8585    $main = preg_replace('/^[\s]*(.*)[\s]*$/', '\\1', $main);
     
    556556            $post_date_gmt = get_gmt_from_date($post_date);
    557557    }
    558        
     558
    559559    if ( 'publish' == $post_status ) {
    560560        $now = gmdate('Y-m-d H:i:59');
     
    705705    if ( 'future' == $post_status )
    706706        wp_schedule_single_event(strtotime($post_date_gmt. ' GMT'), 'publish_future_post', array($post_ID));
    707        
     707
    708708    do_action('save_post', $post_ID);
    709709    do_action('wp_insert_post', $post_ID);
     
    11081108    if (!empty($authors)) {
    11091109        $post_authors = preg_split('/[\s,]+/',$authors);
    1110        
     1110
    11111111        if ( count($post_authors) ) {
    11121112            foreach ( $post_authors as $post_author ) {
  • trunk/wp-includes/query.php

    r4940 r4953  
    201201    global $wp_query;
    202202
    203     return $wp_query->is_singular; 
     203    return $wp_query->is_singular;
    204204}
    205205
     
    286286    var $in_the_loop = false;
    287287    var $post;
    288    
     288
    289289    var $comments;
    290290    var $comment_count = 0;
     
    361361        $this->parse_query('');
    362362    }
    363    
     363
    364364    function fill_query_vars($array) {
    365365        $keys = array(
     
    396396                $array[$key] = '';
    397397        }
    398        
     398
    399399        return $array;
    400400    }
     
    411411            $this->query_vars = $qv;
    412412        }
    413        
     413
    414414        $qv = $this->fill_query_vars($qv);
    415        
     415
    416416        if ( ! empty($qv['robots']) ) {
    417417            $this->is_robots = true;
     
    610610        // Shorthand.
    611611        $q = &$this->query_vars;
    612        
     612
    613613        $q = $this->fill_query_vars($q);
    614614
     
    10021002            }
    10031003        }
    1004        
     1004
    10051005        // Comments feeds
    10061006        if ( $this->is_comment_feed && ( $this->is_archive || $this->is_search || !$this->is_singular ) ) {
     
    10141014                $cgroupby = '';
    10151015            }
    1016            
     1016
    10171017            $cjoin = apply_filters('comment_feed_join', $cjoin);
    10181018            $cwhere = apply_filters('comment_feed_where', $cwhere);
    10191019            $cgroupby = apply_filters('comment_feed_groupby', $cgroupby);
    1020            
     1020
    10211021            $this->comments = (array) $wpdb->get_results("SELECT $distinct $wpdb->comments.* FROM $wpdb->comments $cjoin $cwhere $cgroupby ORDER BY comment_date_gmt DESC LIMIT " . get_settings('posts_per_rss'));
    10221022            $this->comment_count = count($this->comments);
    10231023
    10241024            $post_ids = array();
    1025            
     1025
    10261026            foreach ($this->comments as $comment)
    10271027                $post_ids[] = (int) $comment->comment_post_ID;
    1028            
     1028
    10291029            $post_ids = join(',', $post_ids);
    10301030            $join = '';
     
    10621062            $this->comment_count = count($this->comments);
    10631063        }
    1064        
     1064
    10651065        if ( !empty($limits) ) {
    10661066            $found_posts_query = apply_filters( 'found_posts_query', 'SELECT FOUND_ROWS()' );
     
    10691069            $this->max_num_pages = ceil($this->found_posts / $q['posts_per_page']);
    10701070        }
    1071        
     1071
    10721072        // Check post status to determine if post should be displayed.
    10731073        if ( !empty($this->posts) && ($this->is_single || $this->is_page) ) {
     
    11491149        }
    11501150    }
    1151    
     1151
    11521152    function next_comment() {
    11531153        $this->current_comment++;
    1154        
     1154
    11551155        $this->comment = $this->comments[$this->current_comment];
    11561156        return $this->comment;
    11571157    }
    1158    
     1158
    11591159    function the_comment() {
    11601160        global $comment;
    1161        
     1161
    11621162        $comment = $this->next_comment();
    1163        
     1163
    11641164        if ($this->current_comment == 0) {
    11651165            do_action('comment_loop_start');
    11661166        }
    11671167    }
    1168    
     1168
    11691169    function have_comments() {
    11701170        if ($this->current_comment + 1 < $this->comment_count) {
     
    11731173            $this->rewind_comments();
    11741174        }
    1175        
     1175
    11761176        return false;
    11771177    }
    1178    
     1178
    11791179    function rewind_comments() {
    11801180        $this->current_comment = -1;
  • trunk/wp-includes/theme.php

    r4778 r4953  
    187187            $parent_dir = dirname(dirname($theme_file));
    188188            if ( file_exists("$theme_root/$parent_dir/$template/index.php") ) {
    189                 $template = "$parent_dir/$template";    
     189                $template = "$parent_dir/$template";
    190190            } else {
    191191                $wp_broken_themes[$name] = array('Name' => $name, 'Title' => $title, 'Description' => __('Template is missing.'));
     
    485485
    486486function header_textcolor() {
    487     echo get_header_textcolor();   
     487    echo get_header_textcolor();
    488488}
    489489
     
    493493
    494494function header_image() {
    495     echo get_header_image();   
     495    echo get_header_image();
    496496}
    497497
  • trunk/wp-includes/wp-db.php

    r4860 r4953  
    4949        return $this->__construct($dbuser, $dbpassword, $dbname, $dbhost);
    5050    }
    51    
     51
    5252    function __construct($dbuser, $dbpassword, $dbname, $dbhost) {
    5353        register_shutdown_function(array(&$this, "__destruct"));
     
    8080
    8181    function __destruct() {
    82         return true;       
     82        return true;   
    8383    }
    8484
     
    182182        $this->result = @mysql_query($query, $this->dbh);
    183183        ++$this->num_queries;
    184    
     184
    185185        if (SAVEQUERIES)
    186186            $this->queries[] = array( $query, $this->timer_stop() );
     
    256256        if ( $query )
    257257            $this->query($query);
    258        
     258   
    259259        if ( !isset($this->last_result[$y]) )
    260260            return null;
  • trunk/wp-login.php

    r4902 r4953  
    9797
    9898        do_action('lostpassword_post');
    99        
     99
    100100        if ( empty( $errors ) ) {
    101101            $user_data = get_userdatabylogin(trim($_POST['user_login']));
     
    329329        }
    330330    }
    331    
     331
    332332    if ( $_POST && empty( $user_login ) )
    333333        $errors['user_login'] = __('<strong>ERROR</strong>: The username field is empty.');
  • trunk/xmlrpc.php

    r4915 r4953  
    505505            $category["description"] = "";
    506506        }
    507        
     507   
    508508        $new_category = array(
    509509            "cat_name"              => $category["name"],
Note: See TracChangeset for help on using the changeset viewer.