Changeset 1624
- Timestamp:
- 09/08/04 08:57:52 (4 years ago)
- Files:
-
- trunk/wp-mail.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-mail.php
r1604 r1624 66 66 $subject = $subject[0]; 67 67 } 68 69 // Set the author using the email address (To or Reply-To, the last used) 70 // otherwise use the site admin 71 if (preg_match('/From: /', $line) | preg_match('Reply-To: /', $line)) { 72 $author=trim($line); 73 if ( ereg("([a-zA-Z0-9\_\-\.]+@[\a-zA-z0-9\_\-\.]+)", $author , $regs) ) { 74 echo "Author = {$regs[1]} <p>"; 75 $result = $wpdb->get_row("SELECT ID FROM $tableusers WHERE user_email='$regs[1]' ORDER BY ID DESC LIMIT 1"); 76 if (!$result) 77 $post_author = 1; 78 else 79 $post_author = $result->ID; 80 } else 81 $post_author = 1; 82 } 83 68 84 if (preg_match('/Date: /i', $line)) { // of the form '20 Mar 2002 20:32:37' 69 85 $ddate = trim($line); … … 131 147 do_action('publish_phone', $post_ID); 132 148 149 echo "\n<p><b>Author:</b> $post_author</p>"; 133 150 echo "\n<p><b>Posted title:</b> $post_title<br />"; 134 151 echo "\n<b>Posted content:</b><br /><pre>".$content.'</pre></p>';
