WordPress.org

Make WordPress Core

Changes from tags/2.6.2 at r8849 to tags/2.6.1 at r8849


Ignore:
Location:
tags/2.6.1
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • tags/2.6.1/wp-admin/css/press-this-ie.css

    • Property svn:eol-style deleted
    r8849 r8849  
     1
    12#posting {
    23    position: static !important;
  • tags/2.6.1/wp-admin/import/textpattern.php

    r8849 r8849  
    334334                $category1 = $category1->term_id;
    335335                $category2 = get_category_by_slug($Category2);
    336                 $category2 = $category2->term_id;
     336                $category2 = $category1->term_id;
    337337                if($cat1 = $category1) { $cats[1] = $cat1; }
    338338                if($cat2 = $category2) { $cats[2] = $cat2; }
  • tags/2.6.1/wp-admin/includes/image.php

    r8849 r8849  
    220220            $iptc = iptcparse($info['APP13']);
    221221            if ( !empty($iptc['2#110'][0]) ) // credit
    222                 $meta['credit'] = utf8_encode(trim($iptc['2#110'][0]));
     222                $meta['credit'] = trim( $iptc['2#110'][0] );
    223223            elseif ( !empty($iptc['2#080'][0]) ) // byline
    224                 $meta['credit'] = utf8_encode(trim($iptc['2#080'][0]));
     224                $meta['credit'] = trim( $iptc['2#080'][0] );
    225225            if ( !empty($iptc['2#055'][0]) and !empty($iptc['2#060'][0]) ) // created datee and time
    226226                $meta['created_timestamp'] = strtotime($iptc['2#055'][0] . ' ' . $iptc['2#060'][0]);
    227227            if ( !empty($iptc['2#120'][0]) ) // caption
    228                 $meta['caption'] = utf8_encode(trim($iptc['2#120'][0]));
     228                $meta['caption'] = trim( $iptc['2#120'][0] );
    229229            if ( !empty($iptc['2#116'][0]) ) // copyright
    230                 $meta['copyright'] = utf8_encode(trim($iptc['2#116'][0]));
     230                $meta['copyright'] = trim( $iptc['2#116'][0] );
    231231            if ( !empty($iptc['2#005'][0]) ) // title
    232                 $meta['title'] = utf8_encode(trim($iptc['2#005'][0]));
     232                $meta['title'] = trim( $iptc['2#005'][0] );
    233233         }
    234234    }
  • tags/2.6.1/wp-admin/includes/template.php

    r8849 r8849  
    716716            ORDER BY comment_date_gmt DESC LIMIT $start, $num");
    717717    } else {
    718         $comments = $wpdb->get_results( "SELECT SQL_CALC_FOUND_ROWS * FROM $wpdb->comments WHERE $approved ORDER BY comment_date_gmt DESC LIMIT $start, $num" );
     718        $comments = $wpdb->get_results( "SELECT SQL_CALC_FOUND_ROWS * FROM $wpdb->comments USE INDEX (comment_date_gmt) WHERE $approved ORDER BY comment_date_gmt DESC LIMIT $start, $num" );
    719719    }
    720720
  • tags/2.6.1/wp-includes/formatting.php

    r8849 r8849  
    332332    if ( $strict )
    333333        $username = preg_replace('|[^a-z0-9 _.\-@]|i', '', $username);
    334 
    335     // Consolidate contiguous whitespace
    336     $username = preg_replace('|\s+|', ' ', $username);
    337334
    338335    return apply_filters('sanitize_user', $username, $raw_username, $strict);
  • tags/2.6.1/wp-includes/pluggable.php

    r8849 r8849  
    12901290    $password = '';
    12911291    for ( $i = 0; $i < $length; $i++ )
    1292         $password .= substr($chars, wp_rand(0, strlen($chars) - 1), 1);
     1292        $password .= substr($chars, mt_rand(0, strlen($chars) - 1), 1);
    12931293    return $password;
    1294 }
    1295 endif;
    1296 
    1297 if ( !function_exists('wp_rand') ) :
    1298  /**
    1299  * Generates a random number
    1300  *
    1301  * @since 2.6.2
    1302  *
    1303  * @param int $min Lower limit for the generated number (optional, default is 0)
    1304  * @param int $max Upper limit for the generated number (optional, default is 4294967295)
    1305  * @return int A random number between min and max
    1306  */
    1307 function wp_rand( $min = 0, $max = 0 ) {
    1308     global $rnd_value;
    1309 
    1310     $seed = get_option('random_seed');
    1311 
    1312     // Reset $rnd_value after 14 uses
    1313     // 32(md5) + 40(sha1) + 40(sha1) / 8 = 14 random numbers from $rnd_value
    1314     if ( strlen($rnd_value) < 8 ) {
    1315         $rnd_value = md5( uniqid(microtime() . mt_rand(), true ) . $seed );
    1316         $rnd_value .= sha1($rnd_value);
    1317         $rnd_value .= sha1($rnd_value . $seed);
    1318         $seed = md5($seed . $rnd_value);
    1319         update_option('random_seed', $seed);
    1320     }
    1321 
    1322     // Take the first 8 digits for our value
    1323     $value = substr($rnd_value, 0, 8);
    1324 
    1325     // Strip the first eight, leaving the remainder for the next call to wp_rand().
    1326     $rnd_value = substr($rnd_value, 8);
    1327 
    1328     $value = abs(hexdec($value));
    1329 
    1330     // Reduce the value to be within the min - max range
    1331     // 4294967295 = 0xffffffff = max random number
    1332     if ( $max != 0 )
    1333         $value = $min + (($max - $min + 1) * ($value / (4294967295 + 1)));
    1334 
    1335     return abs(intval($value));
    13361294}
    13371295endif;
  • tags/2.6.1/wp-includes/post.php

    r8849 r8849  
    466466        'exclude' => '', 'meta_key' => '',
    467467        'meta_value' =>'', 'post_type' => 'post',
    468         'post_parent' => 0, 'suppress_filters' => true
     468        'post_parent' => 0
    469469    );
    470470
     
    595595    $meta_cache = wp_cache_get($post_id, 'post_meta');
    596596
    597     if ( !$meta_cache ) {
    598         update_postmeta_cache($post_id);
    599         $meta_cache = wp_cache_get($post_id, 'post_meta');
    600     }
    601 
    602597    if ( isset($meta_cache[$key]) ) {
    603598        if ( $single ) {
    604599            return maybe_unserialize( $meta_cache[$key][0] );
    605600        } else {
    606             return array_map('maybe_unserialize', $meta_cache[$key]);
    607         }
    608     }
    609 
    610     return '';
     601            return maybe_unserialize( $meta_cache[$key] );
     602        }
     603    }
     604
     605    if ( !$meta_cache ) {
     606        update_postmeta_cache($post_id);
     607        $meta_cache = wp_cache_get($post_id, 'post_meta');
     608    }
     609
     610    if ( $single ) {
     611        if ( isset($meta_cache[$key][0]) )
     612            return maybe_unserialize($meta_cache[$key][0]);
     613        else
     614            return '';
     615    } else {
     616        return maybe_unserialize($meta_cache[$key]);
     617    }
    611618}
    612619
     
    32913298        return;
    32923299
    3293     if ( isset($post['post_type']) && 'revision' == $post['post_type'] )
     3300    if ( isset($post['post_type']) && 'revision' == $post_post['type'] )
    32943301        return new WP_Error( 'post_type', __( 'Cannot create a revision of a revision' ) );
    32953302
  • tags/2.6.1/wp-includes/query.php

    r8849 r8849  
    776776            $qv['post_status'] = preg_replace('|[^a-z0-9_,-]|', '', $qv['post_status']);
    777777
    778         if ( $this->is_posts_page && ( ! isset($qv['withcomments']) || ! $qv['withcomments'] ) )
     778        if ( $this->is_posts_page && !$qv['withcomments'] )
    779779            $this->is_comment_feed = false;
    780780
     
    830830        $search = '';
    831831        $groupby = '';
    832         $fields = "$wpdb->posts.*";
    833832        $post_status_join = false;
    834         $page = 1;
    835 
    836         if ( !isset($q['suppress_filters']) )
    837             $q['suppress_filters'] = false;
    838833
    839834        if ( !isset($q['post_type']) ) {
     
    13671362        // Apply filters on where and join prior to paging so that any
    13681363        // manipulations to them are reflected in the paging by day queries.
    1369         if ( !$q['suppress_filters'] ) {
    1370             $where = apply_filters('posts_where', $where);
    1371             $join = apply_filters('posts_join', $join);
    1372         }
     1364        $where = apply_filters('posts_where', $where);
     1365        $join = apply_filters('posts_join', $join);
    13731366
    13741367        // Paging
     
    14021395            }
    14031396
    1404             if ( !$q['suppress_filters'] ) {
    1405                 $cjoin = apply_filters('comment_feed_join', $cjoin);
    1406                 $cwhere = apply_filters('comment_feed_where', $cwhere);
    1407                 $cgroupby = apply_filters('comment_feed_groupby', $cgroupby);
    1408             }
     1397            $cjoin = apply_filters('comment_feed_join', $cjoin);
     1398            $cwhere = apply_filters('comment_feed_where', $cwhere);
     1399            $cgroupby = apply_filters('comment_feed_groupby', $cgroupby);
    14091400
    14101401            $this->comments = (array) $wpdb->get_results("SELECT $distinct $wpdb->comments.* FROM $wpdb->comments $cjoin $cwhere $cgroupby ORDER BY comment_date_gmt DESC LIMIT " . get_option('posts_per_rss'));
     
    14241415        }
    14251416
    1426         $orderby = $q['orderby'];
    1427 
    14281417        // Apply post-paging filters on where and join.  Only plugins that
    14291418        // manipulate paging queries should use these hooks.
    1430         if ( !$q['suppress_filters'] ) {
    1431             $where = apply_filters('posts_where_paged', $where);
    1432             $groupby = apply_filters('posts_groupby', $groupby);
    1433             $join = apply_filters('posts_join_paged', $join);
    1434             $orderby = apply_filters('posts_orderby', $orderby);
    1435             $distinct = apply_filters('posts_distinct', $distinct);
    1436             $fields = apply_filters('posts_fields', $fields);
    1437             $limits = apply_filters( 'post_limits', $limits );
    1438         }
     1419
     1420        $where = apply_filters('posts_where_paged', $where);
     1421        $groupby = apply_filters('posts_groupby', $groupby);
     1422        $join = apply_filters('posts_join_paged', $join);
     1423        $orderby = apply_filters('posts_orderby', $q['orderby']);
     1424        $distinct = apply_filters('posts_distinct', $distinct);
     1425        $fields = apply_filters('posts_fields', "$wpdb->posts.*");
     1426        $limits = apply_filters( 'post_limits', $limits );
    14391427
    14401428        // Announce current selection parameters.  For use by caching plugins.
     
    14421430
    14431431        // Filter again for the benefit of caching plugins.  Regular plugins should use the hooks above.
    1444         if ( !$q['suppress_filters'] ) {
    1445             $where = apply_filters('posts_where_request', $where);
    1446             $groupby = apply_filters('posts_groupby_request', $groupby);
    1447             $join = apply_filters('posts_join_request', $join);
    1448             $orderby = apply_filters('posts_orderby_request', $orderby);
    1449             $distinct = apply_filters('posts_distinct_request', $distinct);
    1450             $fields = apply_filters('posts_fields_request', $fields);
    1451             $limits = apply_filters( 'post_limits_request', $limits );
    1452         }
     1432        $where = apply_filters('posts_where_request', $where);
     1433        $groupby = apply_filters('posts_groupby_request', $groupby);
     1434        $join = apply_filters('posts_join_request', $join);
     1435        $orderby = apply_filters('posts_orderby_request', $orderby);
     1436        $distinct = apply_filters('posts_distinct_request', $distinct);
     1437        $fields = apply_filters('posts_fields_request', $fields);
     1438        $limits = apply_filters( 'post_limits_request', $limits );
    14531439
    14541440        if ( ! empty($groupby) )
     
    14601446            $found_rows = 'SQL_CALC_FOUND_ROWS';
    14611447
    1462         $this->request = " SELECT $found_rows $distinct $fields FROM $wpdb->posts $join WHERE 1=1 $where $groupby $orderby $limits";
    1463         if ( !$q['suppress_filters'] )
    1464             $this->request = apply_filters('posts_request', $this->request);
     1448        $request = " SELECT $found_rows $distinct $fields FROM $wpdb->posts $join WHERE 1=1 $where $groupby $orderby $limits";
     1449        $this->request = apply_filters('posts_request', $request);
    14651450
    14661451        $this->posts = $wpdb->get_results($this->request);
    14671452        // Raw results filter.  Prior to status checks.
    1468         if ( !$q['suppress_filters'] )
    1469             $this->posts = apply_filters('posts_results', $this->posts);
     1453        $this->posts = apply_filters('posts_results', $this->posts);
    14701454
    14711455        if ( !empty($this->posts) && $this->is_comment_feed && $this->is_singular ) {
     
    15141498        }
    15151499
    1516         if ( !$q['suppress_filters'] )
    1517             $this->posts = apply_filters('the_posts', $this->posts);
     1500        $this->posts = apply_filters('the_posts', $this->posts);
    15181501
    15191502        update_post_caches($this->posts);
  • tags/2.6.1/wp-includes/version.php

    r8849 r8849  
    99 * @global string $wp_version
    1010 */
    11 $wp_version = '2.6.2';
     11$wp_version = '2.6.1';
    1212
    1313/**
  • tags/2.6.1/wp-includes/widgets.php

    r8849 r8849  
    11631163            }
    11641164
    1165             if ( $link == '' ) {
    1166                 echo "<li>$title{$date}{$summary}{$author}</li>";
    1167             } else {
    1168                 echo "<li><a class='rsswidget' href='$link' title='$desc'>$title</a>{$date}{$summary}{$author}</li>";
    1169             }
    1170 }
     1165            echo "<li><a class='rsswidget' href='$link' title='$desc'>$title</a>{$date}{$summary}{$author}</li>";
     1166        }
    11711167        echo '</ul>';
    11721168    } else {
  • tags/2.6.1/wp-login.php

    r8849 r8849  
    425425    $user = wp_signon('', $secure_cookie);
    426426
    427     $redirect_to = apply_filters('login_redirect', $redirect_to, isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '', $user);
    428 
    429427    if ( !is_wp_error($user) ) {
    430428        // If the user can't edit posts, send them to their profile.
  • tags/2.6.1/wp-settings.php

    r8849 r8849  
    102102
    103103if ( version_compare( '4.3', phpversion(), '>' ) ) {
    104     die( sprintf( /*WP_I18N_OLD_PHP*/'Your server is running PHP version %s but WordPress requires at least 4.3.'/*/WP_I18N_OLD_PHP*/, phpversion() ) );
     104    die( sprintf( /*WP_I18N_OLD_PHP*/'Your server is running PHP version %s but WordPress requires at least 4.3.'/*/WP_I18N_OLD_PHP*/, php_version() ) );
    105105}
    106106
Note: See TracChangeset for help on using the changeset viewer.