Postie - Version 1.5.1

Version Description

(2013.04.10) * Turned on POP3 debug logging if POSTIE_DEBUG is TRUE. * Disable autocomplete on some setup fields * Fixed bug where confirmation emails were not being sent to authors * Fixed bug where post were not saved if the default admin user didn't exist and the from user was not a WordPress user

Download this release

Release Info

Developer WayneAllen
Plugin Icon 128x128 Postie
Version 1.5.1
Comparing to
See all releases

Code changes from version 1.5.0 to 1.5.1

config_form.php CHANGED
@@ -90,7 +90,7 @@
90
  <?php _e("this will run a special script to test your configuration options", 'postie'); ?>
91
  </form>
92
 
93
- <form name="postie-options" method="post" action='options.php'>
94
  <?php
95
  settings_fields('postie-settings');
96
  ?>
@@ -157,12 +157,12 @@
157
  </tr>
158
  <tr valign="top">
159
  <th width="33%" scope="row"><?php _e('Mail Userid:', 'postie') ?></th>
160
- <td><input name='postie-settings[mail_userid]' type="text" id='postie-settings-mail_userid' value="<?php echo esc_attr($mail_userid); ?>" size="40" /></td>
161
  </tr>
162
  <tr valign="top">
163
  <th scope="row"><?php _e('Mail Password:', 'postie') ?></th>
164
  <td>
165
- <input name='postie-settings[mail_password]' type="password" id='postie-settings-mail_password' value="<?php echo esc_attr($mail_password); ?>" size="40" />
166
  </td>
167
  </tr>
168
  <tr>
90
  <?php _e("this will run a special script to test your configuration options", 'postie'); ?>
91
  </form>
92
 
93
+ <form name="postie-options" method="post" action='options.php' autocomplete="off">
94
  <?php
95
  settings_fields('postie-settings');
96
  ?>
157
  </tr>
158
  <tr valign="top">
159
  <th width="33%" scope="row"><?php _e('Mail Userid:', 'postie') ?></th>
160
+ <td><input name='postie-settings[mail_userid]' type="text" id='postie-settings-mail_userid' autocomplete='off' value="<?php echo esc_attr($mail_userid); ?>" size="40" /></td>
161
  </tr>
162
  <tr valign="top">
163
  <th scope="row"><?php _e('Mail Password:', 'postie') ?></th>
164
  <td>
165
+ <input name='postie-settings[mail_password]' type="password" id='postie-settings-mail_password' autocomplete='off' value="<?php echo esc_attr($mail_password); ?>" size="40" />
166
  </td>
167
  </tr>
168
  <tr>
docs/Changes.txt CHANGED
@@ -1,5 +1,8 @@
1
  == Upgrade Notice ==
2
 
 
 
 
3
  = 1.4.41 =
4
  Post format is now supported. You can specify any of the WordPress supported post formats using the Post type syntax.
5
  Post status can now be specified using the status: tag.
@@ -15,6 +18,12 @@ All script, style and body tags are stripped from html emails.
15
  Attachments are now processed in the order they were attached.
16
 
17
  == CHANGELOG ==
 
 
 
 
 
 
18
  = 1.5.0 (2013.04.05) =
19
  * Apply Postie Time Correction to date: command
20
  * Add support for Post Formats
1
  == Upgrade Notice ==
2
 
3
+ = 1.5.0 =
4
+ * New filter postie_filter_email. Used to map "from" to any other email. Allows custom user mapping.
5
+
6
  = 1.4.41 =
7
  Post format is now supported. You can specify any of the WordPress supported post formats using the Post type syntax.
8
  Post status can now be specified using the status: tag.
18
  Attachments are now processed in the order they were attached.
19
 
20
  == CHANGELOG ==
21
+ = 1.5.1 (2013.04.10)
22
+ * Turned on POP3 debug logging if POSTIE_DEBUG is TRUE.
23
+ * Disable autocomplete on some setup fields
24
+ * Fixed bug where confirmation emails were not being sent to authors
25
+ * Fixed bug where post were not saved if the default admin user didn't exist and the from user was not a WordPress user
26
+
27
  = 1.5.0 (2013.04.05) =
28
  * Apply Postie Time Correction to date: command
29
  * Add support for Post Formats
docs/Postie.txt CHANGED
@@ -6,7 +6,7 @@ Plugin URI: http://PostiePlugin.com/
6
  Tags: e-mail, email
7
  Requires at least: 3.0
8
  Tested up to: 3.5.1
9
- Stable tag: 1.5.0
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
6
  Tags: e-mail, email
7
  Requires at least: 3.0
8
  Tested up to: 3.5.1
9
+ Stable tag: 1.5.1
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
postie-functions.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  /*
4
- $Id: postie-functions.php 692601 2013-04-06 06:41:51Z WayneAllen $
5
  */
6
 
7
  //to turn on debug output add the following line to wp-config.php
@@ -378,12 +378,11 @@ function PostEmail($poster, $mimeDecodedEmail, $config) {
378
 
379
  if ($confirmation_email != '') {
380
  if ($confirmation_email == 'sender') {
381
- $recipients = array($postAuthorDetails['email']);
382
  } elseif ($confirmation_email == 'admin') {
383
  $recipients = array(get_option("admin_email"));
384
  } elseif ($confirmation_email == 'both') {
385
- $recipients = array($postAuthorDetails['email'],
386
- get_option("admin_email"));
387
  }
388
  MailToRecipients($mimeDecodedEmail, false, $recipients, false, false);
389
  }
@@ -540,6 +539,7 @@ function getPostAuthorDetails(&$subject, &$content, &$mimeDecodedEmail) {
540
  $theDate = $mimeDecodedEmail->headers['date'];
541
  $theEmail = RemoveExtraCharactersInEmailAddress(trim($mimeDecodedEmail->headers["from"]));
542
 
 
543
  $theEmail = apply_filters("postie_filter_email", $theEmail);
544
  DebugEcho("getPostAuthorDetails: post email filter $theEmail");
545
 
@@ -733,6 +733,9 @@ function POP3MessageFetch($server = NULL, $port = NULL, $email = NULL, $password
733
 
734
  $emails = array();
735
  $pop3 = new POP3();
 
 
 
736
 
737
  EchoInfo("Connecting to $server:$port ($protocol)");
738
 
@@ -1264,18 +1267,23 @@ function ValidatePoster(&$mimeDecodedEmail, $config) {
1264
  EchoInfo("posting as user $poster");
1265
  } else {
1266
  $poster = $wpdb->get_var("SELECT ID FROM $wpdb->users WHERE user_login = '$admin_username'");
 
 
 
 
1267
  }
1268
  } elseif ($turn_authorization_off || isEmailAddressAuthorized($from, $authorized_addresses) || isEmailAddressAuthorized($resentFrom, $authorized_addresses)) {
1269
  DebugEcho("ValidatePoster: looking up default user $admin_username");
1270
-
1271
  $poster = $wpdb->get_var("SELECT ID FROM $wpdb->users WHERE user_login = '$admin_username'");
1272
  DebugEcho("ValidatePoster: found user '$poster'");
1273
  if (empty($poster)) {
1274
- EchoInfo("Your 'Admin username' setting '$admin_username' is not a valid WordPress user");
 
1275
  }
1276
  }
1277
 
1278
  $validSMTP = isValidSmtpServer($mimeDecodedEmail, $smtp);
 
1279
  if (!$poster || !$validSMTP) {
1280
  EchoInfo('Invalid sender: ' . htmlentities($from) . "! Not adding email!");
1281
  if ($forward_rejected_mail) {
@@ -1888,7 +1896,7 @@ function filter_PreferedText($mimeDecodedEmail, $preferTextType) {
1888
  * It accepts an object containing the entire message
1889
  */
1890
  function MailToRecipients(&$mail_content, $testEmail = false, $recipients = array(), $returnToSender, $reject = true) {
1891
- DebugEcho("send mail");
1892
  if ($testEmail) {
1893
  return false;
1894
  }
@@ -1899,13 +1907,14 @@ function MailToRecipients(&$mail_content, $testEmail = false, $recipients = arra
1899
  $blogurl = get_option("siteurl");
1900
 
1901
  if (count($recipients) == 0) {
1902
- DebugEcho("send mail: no recipients");
1903
  return false;
1904
  }
1905
 
1906
  $from = trim($mail_content->headers["from"]);
1907
  $subject = $mail_content->headers['subject'];
1908
  if ($returnToSender) {
 
1909
  array_push($recipients, $from);
1910
  }
1911
 
@@ -1916,9 +1925,10 @@ function MailToRecipients(&$mail_content, $testEmail = false, $recipients = arra
1916
  $headers .= "Cc: " . $recipient . "\r\n";
1917
  }
1918
  }
 
1919
  // Set email subject
1920
  if ($reject) {
1921
- DebugEcho("send mail: sending reject mail");
1922
  $alert_subject = $blogname . ": Unauthorized Post Attempt from $from";
1923
  if (is_array($mail_content->ctype_parameters) && array_key_exists('boundary', $mail_content->ctype_parameters) && $mail_content->ctype_parameters['boundary']) {
1924
  $boundary = $mail_content->ctype_parameters["boundary"];
@@ -1958,8 +1968,8 @@ function MailToRecipients(&$mail_content, $testEmail = false, $recipients = arra
1958
  $mailtext .= $part->body;
1959
  }
1960
  } else {
1961
- DebugEcho("send mail: sending success mail");
1962
  $alert_subject = "Successfully posted to $blogname";
 
1963
  $mailtext = "Your post '$subject' has been successfully published to $blogname <$blogurl>.\n";
1964
  }
1965
 
@@ -2021,8 +2031,10 @@ function RemoveExtraCharactersInEmailAddress($address) {
2021
  $matches = array();
2022
  if (preg_match('/^[^<>]+<([^<> ()]+)>$/', $address, $matches)) {
2023
  $address = $matches[1];
 
2024
  } else if (preg_match('/<([^<> ()]+)>/', $address, $matches)) {
2025
  $address = $matches[1];
 
2026
  }
2027
 
2028
  return $address;
@@ -3012,8 +3024,6 @@ function DebugEmailOutput($email, $mimeDecodedEmail) {
3012
  $file = fopen($fname . ".php ", "w");
3013
  fwrite($file, serialize($email));
3014
  fclose($file);
3015
- } else {
3016
- DebugEcho("The directory $dname does not exist, creating this optional directory will allow saving copies of emails for debugging purposes.");
3017
  }
3018
  }
3019
  }
1
  <?php
2
 
3
  /*
4
+ $Id: postie-functions.php 695680 2013-04-11 04:49:31Z WayneAllen $
5
  */
6
 
7
  //to turn on debug output add the following line to wp-config.php
378
 
379
  if ($confirmation_email != '') {
380
  if ($confirmation_email == 'sender') {
381
+ $recipients = array($details['email_author']);
382
  } elseif ($confirmation_email == 'admin') {
383
  $recipients = array(get_option("admin_email"));
384
  } elseif ($confirmation_email == 'both') {
385
+ $recipients = array($details['email_author'], get_option("admin_email"));
 
386
  }
387
  MailToRecipients($mimeDecodedEmail, false, $recipients, false, false);
388
  }
539
  $theDate = $mimeDecodedEmail->headers['date'];
540
  $theEmail = RemoveExtraCharactersInEmailAddress(trim($mimeDecodedEmail->headers["from"]));
541
 
542
+ DebugEcho("getPostAuthorDetails: pre email filter $theEmail");
543
  $theEmail = apply_filters("postie_filter_email", $theEmail);
544
  DebugEcho("getPostAuthorDetails: post email filter $theEmail");
545
 
733
 
734
  $emails = array();
735
  $pop3 = new POP3();
736
+ if (defined('POSTIE_DEBUG')) {
737
+ $pop3->DEBUG = POSTIE_DEBUG;
738
+ }
739
 
740
  EchoInfo("Connecting to $server:$port ($protocol)");
741
 
1267
  EchoInfo("posting as user $poster");
1268
  } else {
1269
  $poster = $wpdb->get_var("SELECT ID FROM $wpdb->users WHERE user_login = '$admin_username'");
1270
+ if (!$poster) {
1271
+ EchoInfo("Your 'Admin username' setting '$admin_username' is not a valid WordPress user (1)");
1272
+ $poster = 1;
1273
+ }
1274
  }
1275
  } elseif ($turn_authorization_off || isEmailAddressAuthorized($from, $authorized_addresses) || isEmailAddressAuthorized($resentFrom, $authorized_addresses)) {
1276
  DebugEcho("ValidatePoster: looking up default user $admin_username");
 
1277
  $poster = $wpdb->get_var("SELECT ID FROM $wpdb->users WHERE user_login = '$admin_username'");
1278
  DebugEcho("ValidatePoster: found user '$poster'");
1279
  if (empty($poster)) {
1280
+ EchoInfo("Your 'Admin username' setting '$admin_username' is not a valid WordPress user (2)");
1281
+ $poster = 1;
1282
  }
1283
  }
1284
 
1285
  $validSMTP = isValidSmtpServer($mimeDecodedEmail, $smtp);
1286
+
1287
  if (!$poster || !$validSMTP) {
1288
  EchoInfo('Invalid sender: ' . htmlentities($from) . "! Not adding email!");
1289
  if ($forward_rejected_mail) {
1896
  * It accepts an object containing the entire message
1897
  */
1898
  function MailToRecipients(&$mail_content, $testEmail = false, $recipients = array(), $returnToSender, $reject = true) {
1899
+ DebugEcho("MailToRecipients: send mail");
1900
  if ($testEmail) {
1901
  return false;
1902
  }
1907
  $blogurl = get_option("siteurl");
1908
 
1909
  if (count($recipients) == 0) {
1910
+ DebugEcho("MailToRecipients: no recipients");
1911
  return false;
1912
  }
1913
 
1914
  $from = trim($mail_content->headers["from"]);
1915
  $subject = $mail_content->headers['subject'];
1916
  if ($returnToSender) {
1917
+ DebugEcho("MailToRecipients: return to sender $returnToSender");
1918
  array_push($recipients, $from);
1919
  }
1920
 
1925
  $headers .= "Cc: " . $recipient . "\r\n";
1926
  }
1927
  }
1928
+ DebugEcho($headers);
1929
  // Set email subject
1930
  if ($reject) {
1931
+ DebugEcho("MailToRecipients: sending reject mail");
1932
  $alert_subject = $blogname . ": Unauthorized Post Attempt from $from";
1933
  if (is_array($mail_content->ctype_parameters) && array_key_exists('boundary', $mail_content->ctype_parameters) && $mail_content->ctype_parameters['boundary']) {
1934
  $boundary = $mail_content->ctype_parameters["boundary"];
1968
  $mailtext .= $part->body;
1969
  }
1970
  } else {
 
1971
  $alert_subject = "Successfully posted to $blogname";
1972
+ DebugEcho("MailToRecipients: $alert_subject");
1973
  $mailtext = "Your post '$subject' has been successfully published to $blogname <$blogurl>.\n";
1974
  }
1975
 
2031
  $matches = array();
2032
  if (preg_match('/^[^<>]+<([^<> ()]+)>$/', $address, $matches)) {
2033
  $address = $matches[1];
2034
+ DebugEcho("RemoveExtraCharactersInEmailAddress: $address (1)");
2035
  } else if (preg_match('/<([^<> ()]+)>/', $address, $matches)) {
2036
  $address = $matches[1];
2037
+ DebugEcho("RemoveExtraCharactersInEmailAddress: $address (2)");
2038
  }
2039
 
2040
  return $address;
3024
  $file = fopen($fname . ".php ", "w");
3025
  fwrite($file, serialize($email));
3026
  fclose($file);
 
 
3027
  }
3028
  }
3029
  }
postie.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: Postie
5
  Plugin URI: http://PostiePlugin.com/
6
  Description: Signifigantly upgrades the posting by mail features of Word Press (See <a href='options-general.php?page=postie/postie.php'>Settings and options</a>) to configure your e-mail settings. See the <a href='http://wordpress.org/extend/plugins/postie/other_notes'>Readme</a> for usage. Visit the <a href='http://wordpress.org/support/plugin/postie'>postie forum</a> for support.
7
- Version: 1.5.0
8
  Author: Wayne Allen
9
  Author URI: http://allens-home.com/
10
  License: GPL2
@@ -27,7 +27,7 @@
27
  */
28
 
29
  /*
30
- $Id: postie.php 692601 2013-04-06 06:41:51Z WayneAllen $
31
  */
32
 
33
  define("POSTIE_ROOT", dirname(__FILE__));
4
  Plugin Name: Postie
5
  Plugin URI: http://PostiePlugin.com/
6
  Description: Signifigantly upgrades the posting by mail features of Word Press (See <a href='options-general.php?page=postie/postie.php'>Settings and options</a>) to configure your e-mail settings. See the <a href='http://wordpress.org/extend/plugins/postie/other_notes'>Readme</a> for usage. Visit the <a href='http://wordpress.org/support/plugin/postie'>postie forum</a> for support.
7
+ Version: 1.5.1
8
  Author: Wayne Allen
9
  Author URI: http://allens-home.com/
10
  License: GPL2
27
  */
28
 
29
  /*
30
+ $Id: postie.php 695686 2013-04-11 05:08:55Z WayneAllen $
31
  */
32
 
33
  define("POSTIE_ROOT", dirname(__FILE__));
postieIMAP.php CHANGED
@@ -96,19 +96,15 @@ class PostieIMAP {
96
  * @return integer
97
  */
98
  function getNumberOfMessages() {
99
- if (IsDebugMode()) {
100
- $status = imap_status($this->_connection, $this->_server_string, SA_ALL); //get all messages in debug mode so we can reprocess them
101
- //DebugEcho($this->_server_string);
102
- //DebugDump($status);
103
- if ($status)
104
- return $status->unseen;
105
- else {
106
- LogInfo("Error imap_status did not return a value");
107
- DebugDump($this);
108
- return 0;
109
- }
110
- } else {
111
- return imap_num_msg($this->_connection);
112
  }
113
  }
114
 
96
  * @return integer
97
  */
98
  function getNumberOfMessages() {
99
+ $status = imap_status($this->_connection, $this->_server_string, SA_ALL); //get all messages in debug mode so we can reprocess them
100
+ //DebugEcho($this->_server_string);
101
+ //DebugDump($status);
102
+ if ($status)
103
+ return $status->messages;
104
+ else {
105
+ LogInfo("Error imap_status did not return a value");
106
+ DebugDump($this);
107
+ return 0;
 
 
 
 
108
  }
109
  }
110
 
postie_test.php CHANGED
@@ -16,7 +16,6 @@ if (!current_user_can('manage_options')) {
16
  exit();
17
  }
18
  DebugEcho("Error log: " . ini_get('error_log'));
19
- $images = array("Test.png", "Test.jpg", "Test.gif");
20
  ?>
21
  <div class="wrap">
22
  <h1>Postie Configuration Test</h1>
16
  exit();
17
  }
18
  DebugEcho("Error log: " . ini_get('error_log'));
 
19
  ?>
20
  <div class="wrap">
21
  <h1>Postie Configuration Test</h1>
readme.html CHANGED
@@ -72,6 +72,8 @@ Then use the Task Scheduler control panel to call wget or cron.</p> <hr />
72
 
73
  <h3>Upgrade Notice</h3>
74
  <dl>
 
 
75
  <dt>1.4.41</dt>
76
  <dd>Post format is now supported. You can specify any of the WordPress supported post formats using the Post type syntax.
77
  Post status can now be specified using the status: tag.
72
 
73
  <h3>Upgrade Notice</h3>
74
  <dl>
75
+ <dt>1.5.0</dt>
76
+ <dd>New filter postie_filter_email. Used to map &quot;from&quot; to any other email. Allows custom user mapping.</dd>
77
  <dt>1.4.41</dt>
78
  <dd>Post format is now supported. You can specify any of the WordPress supported post formats using the Post type syntax.
79
  Post status can now be specified using the status: tag.
readme.txt CHANGED
@@ -6,7 +6,7 @@ Plugin URI: http://PostiePlugin.com/
6
  Tags: e-mail, email
7
  Requires at least: 3.0
8
  Tested up to: 3.5.1
9
- Stable tag: 1.5.0
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -421,6 +421,9 @@ It is also possible to turn the WordPress cron off. Please make sure something l
421
  `define('DISABLE_WP_CRON', true);` is not in your wp-config.php file.
422
  == Upgrade Notice ==
423
 
 
 
 
424
  = 1.4.41 =
425
  Post format is now supported. You can specify any of the WordPress supported post formats using the Post type syntax.
426
  Post status can now be specified using the status: tag.
@@ -436,6 +439,12 @@ All script, style and body tags are stripped from html emails.
436
  Attachments are now processed in the order they were attached.
437
 
438
  == CHANGELOG ==
 
 
 
 
 
 
439
  = 1.5.0 (2013.04.05) =
440
  * Apply Postie Time Correction to date: command
441
  * Add support for Post Formats
6
  Tags: e-mail, email
7
  Requires at least: 3.0
8
  Tested up to: 3.5.1
9
+ Stable tag: 1.5.1
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
421
  `define('DISABLE_WP_CRON', true);` is not in your wp-config.php file.
422
  == Upgrade Notice ==
423
 
424
+ = 1.5.0 =
425
+ * New filter postie_filter_email. Used to map "from" to any other email. Allows custom user mapping.
426
+
427
  = 1.4.41 =
428
  Post format is now supported. You can specify any of the WordPress supported post formats using the Post type syntax.
429
  Post status can now be specified using the status: tag.
439
  Attachments are now processed in the order they were attached.
440
 
441
  == CHANGELOG ==
442
+ = 1.5.1 (2013.04.10)
443
+ * Turned on POP3 debug logging if POSTIE_DEBUG is TRUE.
444
+ * Disable autocomplete on some setup fields
445
+ * Fixed bug where confirmation emails were not being sent to authors
446
+ * Fixed bug where post were not saved if the default admin user didn't exist and the from user was not a WordPress user
447
+
448
  = 1.5.0 (2013.04.05) =
449
  * Apply Postie Time Correction to date: command
450
  * Add support for Post Formats
test/inlineimageTest.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- require '../mimedecode.php';
4
 
5
  class postiefunctions2Test extends PHPUnit_Framework_TestCase {
6
 
1
  <?php
2
 
3
+ require_once '../mimedecode.php';
4
 
5
  class postiefunctions2Test extends PHPUnit_Framework_TestCase {
6
 
test/postie-functionsTest.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php
2
 
3
- require 'wpstub.php';
4
- require'../postie-functions.php';
5
- require'../simple_html_dom.php';
6
- require '../postie.php';
7
 
8
  define('WP_DEBUG', true);
9
  define('WP_DEBUG_LOG', true);
@@ -512,7 +512,7 @@ class postiefunctionsTest extends PHPUnit_Framework_TestCase {
512
  $this->assertEquals("test \nmore stuff\n:end", $c);
513
  }
514
 
515
- public function testclickableLink() {
516
  $this->assertEquals("", filter_linkify(""));
517
  $this->assertEquals("test", filter_linkify("test"));
518
  $this->assertEquals('<a href="http://www.example.com" >http://www.example.com</a>', filter_linkify("http://www.example.com"));
@@ -663,9 +663,9 @@ class postiefunctionsTest extends PHPUnit_Framework_TestCase {
663
  $e->headers = array();
664
  $e->headers['date'] = "Jan 1, 2013";
665
  $e->headers['from'] = "wayne@postieplugin.com";
666
-
667
  $r = getPostAuthorDetails($s, $c, $e);
668
-
669
  $this->assertEquals($s, "subject");
670
  $this->assertEquals($c, "content");
671
  $this->assertEquals($r['author'], "wayne");
1
  <?php
2
 
3
+ require_once 'wpstub.php';
4
+ require_once '../postie-functions.php';
5
+ require_once '../simple_html_dom.php';
6
+ require_once '../postie.php';
7
 
8
  define('WP_DEBUG', true);
9
  define('WP_DEBUG_LOG', true);
512
  $this->assertEquals("test \nmore stuff\n:end", $c);
513
  }
514
 
515
+ public function testfilter_linkify() {
516
  $this->assertEquals("", filter_linkify(""));
517
  $this->assertEquals("test", filter_linkify("test"));
518
  $this->assertEquals('<a href="http://www.example.com" >http://www.example.com</a>', filter_linkify("http://www.example.com"));
663
  $e->headers = array();
664
  $e->headers['date'] = "Jan 1, 2013";
665
  $e->headers['from'] = "wayne@postieplugin.com";
666
+
667
  $r = getPostAuthorDetails($s, $c, $e);
668
+
669
  $this->assertEquals($s, "subject");
670
  $this->assertEquals($c, "content");
671
  $this->assertEquals($r['author'], "wayne");
test/wpstub.php CHANGED
@@ -128,8 +128,8 @@ function register_deactivation_hook() {
128
 
129
  }
130
 
131
- function apply_filters() {
132
-
133
  }
134
 
135
  function wp_insert_attachment() {
128
 
129
  }
130
 
131
+ function apply_filters($filter, $value) {
132
+ return $value;
133
  }
134
 
135
  function wp_insert_attachment() {