Make WordPress Core

Changeset 5902


Ignore:
Timestamp:
08/19/2007 10:26:25 PM (18 years ago)
Author:
ryan
Message:

Formatting cleanups from johnjosephbachir. fixes #4775 for 2.2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/wp-mail.php

    r5396 r5902  
    6565            if (preg_match('/From: /', $line) | preg_match('/Reply-To: /', $line))  {
    6666                $author=trim($line);
    67             if ( ereg("([a-zA-Z0-9\_\-\.]+@[\a-zA-z0-9\_\-\.]+)", $author , $regs) ) {
    68                 $author = $regs[1];
    69                 echo "Author = {$author} <p>";
    70                 $author = $wpdb->escape($author);
    71                 $result = $wpdb->get_row("SELECT ID FROM $wpdb->users WHERE user_email='$author' LIMIT 1");
    72                 if (!$result)
     67                if ( ereg("([a-zA-Z0-9\_\-\.]+@[\a-zA-z0-9\_\-\.]+)", $author , $regs) ) {
     68                    $author = $regs[1];
     69                    echo "Author = {$author} <p>";
     70                    $author = $wpdb->escape($author);
     71                    $result = $wpdb->get_row("SELECT ID FROM $wpdb->users WHERE user_email='$author' LIMIT 1");
     72                    if (!$result)
     73                        $post_author = 1;
     74                    else
     75                        $post_author = $result->ID;
     76                } else
    7377                    $post_author = 1;
    74                 else
    75                     $post_author = $result->ID;
    76             } else
    77                 $post_author = 1;
    7878            }
    7979
Note: See TracChangeset for help on using the changeset viewer.