Make WordPress Core


Ignore:
Location:
branches/3.0
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/readme.html

    r16641 r15477  
    99<h1 id="logo">
    1010    <a href="http://wordpress.org/"><img alt="WordPress" src="wp-admin/images/wordpress-logo.png" width="250" height="68" /></a>
    11     <br /> Version 3.0.2
     11    <br /> Version 3.0.1
    1212</h1>
    1313<p style="text-align: center">Semantic Personal Publishing Platform</p>
     
    103103
    104104<h1>Copyright</h1>
    105 <p>WordPress is released under the <abbr title="GNU Public License">GPL</abbr> (see <a href="license.txt">license.txt</a>).</p>
     105<p>WordPress is released under the <abbr title="GNU Public License">GPL</abbr>v2 (see <a href="license.txt">license.txt</a>).</p>
    106106
    107107
  • branches/3.0/wp-admin/includes/file.php

    r16641 r15477  
    938938        if ( is_wp_error($error) )
    939939            $error_string = $error->get_error_message();
    940         echo '<div id="message" class="error"><p>' . esc_html( $error_string ) . '</p></div>';
     940        echo '<div id="message" class="error"><p>' . $error_string . '</p></div>';
    941941    }
    942942
  • branches/3.0/wp-admin/includes/plugin.php

    r16641 r15477  
    484484        include(WP_PLUGIN_DIR . '/' . $plugin);
    485485        do_action( 'activate_plugin', trim( $plugin) );
    486         do_action( 'activate_' . trim( $plugin ) );
    487486        if ( $network_wide ) {
    488487            $current[$plugin] = time();
     
    493492            update_option('active_plugins', $current);
    494493        }
     494        do_action( 'activate_' . trim( $plugin ) );
    495495        do_action( 'activated_plugin', trim( $plugin) );
    496496        if ( ob_get_length() > 0 ) {
  • branches/3.0/wp-admin/includes/update-core.php

    r16641 r15477  
    275275    $required_php_version = '4.3';
    276276    $required_mysql_version = '4.1.2';
    277     $wp_version = '3.0.2';
     277    $wp_version = '3.0.1';
    278278    $php_compat     = version_compare( $php_version, $required_php_version, '>=' );
    279279    $mysql_compat   = version_compare( $mysql_version, $required_mysql_version, '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' );
  • branches/3.0/wp-admin/plugins.php

    r16641 r15477  
    256256                            if ( $plugin['is_uninstallable'] ) {
    257257                                /* translators: 1: plugin name, 2: plugin author */
    258                                 echo '<li>', sprintf( __( '<strong>%1$s</strong> by <em>%2$s</em> (will also <strong>delete its data</strong>)' ), esc_html($plugin['Name']), esc_html($plugin['Author']) ), '</li>';
     258                                echo '<li>', sprintf( __( '<strong>%1$s</strong> by <em>%2$s</em> (will also <strong>delete its data</strong>)' ), $plugin['Name'], $plugin['Author'] ), '</li>';
    259259                                $data_to_delete = true;
    260260                            } else {
    261261                                /* translators: 1: plugin name, 2: plugin author */
    262                                 echo '<li>', sprintf( __('<strong>%1$s</strong> by <em>%2$s</em>' ), esc_html($plugin['Name']), esc_html($plugin['Author']) ), '</li>';
     262                                echo '<li>', sprintf( __('<strong>%1$s</strong> by <em>%2$s</em>' ), $plugin['Name'], $plugin['Author'] ), '</li>';
    263263                            }
    264264                        }
     
    290290                    <?php
    291291                        foreach ( (array)$files_to_delete as $file )
    292                             echo '<li>' . esc_html(str_replace(WP_PLUGIN_DIR, '', $file)) . '</li>';
     292                            echo '<li>' . str_replace(WP_PLUGIN_DIR, '', $file) . '</li>';
    293293                    ?>
    294294                    </ul>
  • branches/3.0/wp-includes/canonical.php

    r16641 r15477  
    104104            if ( $redirect_url = get_permalink(get_query_var('p')) )
    105105                $redirect['query'] = remove_query_arg(array('p', 'post_type'), $redirect['query']);
     106            if ( get_query_var( 'page' ) ) {
     107                $redirect_url = trailingslashit( $redirect_url ) . user_trailingslashit( get_query_var( 'page' ), 'single_paged' );
     108                $redirect['query'] = remove_query_arg( 'page', $redirect['query'] );
     109            }
    106110        } elseif ( is_single() && !empty($_GET['name'])  && ! $redirect_url ) {
    107111            if ( $redirect_url = get_permalink( $wp_query->get_queried_object_id() ) )
     
    177181            }
    178182        } elseif ( is_single() && strpos($wp_rewrite->permalink_structure, '%category%') !== false ) {
    179             $category = get_category_by_path(get_query_var('category_name'));
     183            $category = get_term_by('slug', get_query_var('category_name'), 'category');
    180184            $post_terms = wp_get_object_terms($wp_query->get_queried_object_id(), 'category', array('fields' => 'tt_ids'));
    181185            if ( (!$category || is_wp_error($category)) || ( !is_wp_error($post_terms) && !empty($post_terms) && !in_array($category->term_taxonomy_id, $post_terms) ) )
    182186                $redirect_url = get_permalink($wp_query->get_queried_object_id());
    183         }
    184 
    185         // Post Paging
    186         if ( is_singular() && get_query_var('page') && $redirect_url ) {
    187             $redirect_url = trailingslashit( $redirect_url ) . user_trailingslashit( get_query_var( 'page' ), 'single_paged' );
    188             $redirect['query'] = remove_query_arg( 'page', $redirect['query'] );
    189187        }
    190188
  • branches/3.0/wp-includes/capabilities.php

    r16641 r15477  
    799799    case 'remove_user':
    800800        $caps[] = 'remove_users';
     801        break;
     802    case 'delete_user':
     803        $caps[] = 'delete_users';
    801804        break;
    802805    case 'promote_user':
     
    810813    case 'edit_users':
    811814        // If multisite these caps are allowed only for super admins.
    812         if ( is_multisite() && !is_super_admin( $user_id ) )
     815        if ( is_multisite() && !is_super_admin() )
    813816            $caps[] = 'do_not_allow';
    814817        else
     
    989992        break;
    990993    case 'unfiltered_upload':
    991         if ( defined('ALLOW_UNFILTERED_UPLOADS') && ALLOW_UNFILTERED_UPLOADS && ( !is_multisite() || is_super_admin( $user_id ) )  )
     994        if ( defined('ALLOW_UNFILTERED_UPLOADS') && ALLOW_UNFILTERED_UPLOADS && ( !is_multisite() || is_super_admin() )  )
    992995            $caps[] = $cap;
    993996        else
     
    10261029    case 'delete_users':
    10271030        // If multisite these caps are allowed only for super admins.
    1028         if ( is_multisite() && !is_super_admin( $user_id ) ) {
     1031        if ( is_multisite() && !is_super_admin() )
    10291032            $caps[] = 'do_not_allow';
    1030         } else {
    1031             if ( 'delete_user' == $cap )
    1032                 $cap = 'delete_users';
     1033        else
    10331034            $caps[] = $cap;
    1034         }
    10351035        break;
    10361036    case 'create_users':
     
    10801080    $current_user = wp_get_current_user();
    10811081
     1082    if ( is_multisite() && is_super_admin() )
     1083        return true;
     1084
    10821085    if ( empty( $current_user ) )
    10831086        return false;
  • branches/3.0/wp-includes/comment.php

    r16641 r15477  
    1919 * then the check fails.
    2020 *
    21  * If the comment author was approved before, then the comment is
    22  * automatically whitelisted.
     21 * If the comment is a trackback and part of the blogroll, then the trackback is
     22 * automatically whitelisted. If the comment author was approved before, then
     23 * the comment is automatically whitelisted.
    2324 *
    2425 * If none of the checks fail, then the failback is to set the check to pass
     
    8081    // Comment whitelisting:
    8182    if ( 1 == get_option('comment_whitelist')) {
    82         if ( 'trackback' != $comment_type && 'pingback' != $comment_type && $author != '' && $email != '' ) {
     83        if ( 'trackback' == $comment_type || 'pingback' == $comment_type ) { // check if domain is in blogroll
     84            $uri = parse_url($url);
     85            $domain = $uri['host'];
     86            $uri = parse_url( home_url() );
     87            $home_domain = $uri['host'];
     88            if ( $wpdb->get_var($wpdb->prepare("SELECT link_id FROM $wpdb->links WHERE link_url LIKE (%s) LIMIT 1", '%'.$domain.'%')) || $domain == $home_domain )
     89                return true;
     90            else
     91                return false;
     92        } elseif ( $author != '' && $email != '' ) {
    8393            // expected_slashed ($author, $email)
    8494            $ok_to_comment = $wpdb->get_var("SELECT comment_approved FROM $wpdb->comments WHERE comment_author = '$author' AND comment_author_email = '$email' and comment_approved = '1' LIMIT 1");
     
    16451655                $pinged[] = $tb_ping;
    16461656            } else {
    1647                 $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET to_ping = TRIM(REPLACE(to_ping, %s, '')) WHERE ID = %d", $tb_ping, $post_id) );
     1657                $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET to_ping = TRIM(REPLACE(to_ping, '$tb_ping', '')) WHERE ID = %d", $post_id) );
    16481658            }
    16491659        }
  • branches/3.0/wp-includes/functions.php

    r16641 r15477  
    21262126    $upload_path = get_option( 'upload_path' );
    21272127    $upload_path = trim($upload_path);
    2128     $main_override = is_multisite() && defined( 'MULTISITE' ) && is_main_site();
     2128    $main_override = defined( 'MULTISITE' ) && is_main_site();
    21292129    if ( empty($upload_path) ) {
    21302130        $dir = WP_CONTENT_DIR . '/uploads';
  • branches/3.0/wp-includes/load.php

    r16641 r15477  
    580580        return MULTISITE;
    581581
    582     if ( defined( 'SUBDOMAIN_INSTALL' ) || defined( 'VHOST' ) || defined( 'SUNRISE' ) )
     582    if ( defined( 'VHOST' ) || defined( 'SUNRISE' ) )
    583583        return true;
    584584
  • branches/3.0/wp-includes/ms-files.php

    r16641 r15477  
    3030}
    3131
    32 $mime = wp_check_filetype( $file );
     32$mime = wp_check_filetype( $_SERVER[ 'REQUEST_URI' ] );
    3333if( false === $mime[ 'type' ] && function_exists( 'mime_content_type' ) )
    3434    $mime[ 'type' ] = mime_content_type( $file );
     
    3737    $mimetype = $mime[ 'type' ];
    3838else
    39     $mimetype = 'image/' . substr( $file, strrpos( $file, '.' ) + 1 );
     39    $mimetype = 'image/' . substr( $_SERVER[ 'REQUEST_URI' ], strrpos( $_SERVER[ 'REQUEST_URI' ], '.' ) + 1 );
    4040
    4141header( 'Content-type: ' . $mimetype ); // always send this
  • branches/3.0/wp-includes/version.php

    r16641 r15477  
    99 * @global string $wp_version
    1010 */
    11 $wp_version = '3.0.2';
     11$wp_version = '3.0.1';
    1212
    1313/**
     
    1616 * @global int $wp_db_version
    1717 */
    18 $wp_db_version = 15477;
     18$wp_db_version = 15260;
    1919
    2020/**
Note: See TracChangeset for help on using the changeset viewer.