WordPress.org

Make WordPress Core

Changeset 8754


Ignore:
Timestamp:
08/27/2008 08:47:01 PM (10 years ago)
Author:
westi
Message:

Performance improvements using strpos. Fixes #7611 and #7610 props johnbillion.

Location:
trunk
Files:
4 edited

Legend:

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

    r8720 r8754  
    2626    $s = $_GET['q']; // is this slashed already?
    2727
    28     if ( strstr( $s, ',' ) ) {
     28    if ( false !== strpos( $s, ',' ) ) {
    2929        $s = explode( ',', $s );
    3030        $s = $s[count( $s ) - 1];
  • trunk/wp-includes/query.php

    r8740 r8754  
    17531753        $more = 1;
    17541754    $content = $post->post_content;
    1755     if ( preg_match('/<!--nextpage-->/', $content) ) {
     1755    if ( strpos( $content, '<!--nextpage-->' ) ) {
    17561756        if ( $page > 1 )
    17571757            $more = 1;
  • trunk/wp-login.php

    r8736 r8754  
    104104        $errors->add('empty_username', __('<strong>ERROR</strong>: Enter a username or e-mail address.'));
    105105
    106     if ( strstr($_POST['user_login'], '@') ) {
     106    if ( strpos($_POST['user_login'], '@') ) {
    107107        $user_data = get_user_by_email(trim($_POST['user_login']));
    108108        if ( empty($user_data) )
  • trunk/wp-mail.php

    r8488 r8754  
    6161                $content_transfer_encoding = $content_transfer_encoding[0];
    6262            }
    63             if (($content_type == 'multipart/alternative') && (preg_match('/boundary="/', $line)) && ($boundary == '')) {
     63            if (($content_type == 'multipart/alternative') && (false !== strpos($line, 'boundary="')) && ($boundary == '')) {
    6464                $boundary = trim($line);
    6565                $boundary = explode('"', $boundary);
Note: See TracChangeset for help on using the changeset viewer.