diff -Naur phplist-2.10.5-orig/public_html/lists/admin/commonlib/lib/userlib.php phplist-2.10.5/public_html/lists/admin/commonlib/lib/userlib.php
--- phplist-2.10.5-orig/public_html/lists/admin/commonlib/lib/userlib.php 2007-07-13 02:38:49.000000000 +1200
+++ phplist-2.10.5/public_html/lists/admin/commonlib/lib/userlib.php 2008-03-05 18:44:08.000000000 +1300
@@ -329,7 +329,10 @@
return $result;
}
-function is_email($email) {
+// wp-phplist 2.10.5 mod - because we repeat the "is_email" function in wordpress, we sneakily rename this one
+function phplist_is_email($email) {
+//function is_email($email) {
+// wp-phplist 2.10.5 mod complete
if (isset($GLOBALS['config']) && isset($GLOBALS["config"]["dont_require_validemail"]) && $GLOBALS["config"]["dont_require_validemail"])
return 1;
diff -Naur phplist-2.10.5-orig/public_html/lists/admin/processqueue.php phplist-2.10.5/public_html/lists/admin/processqueue.php
--- phplist-2.10.5-orig/public_html/lists/admin/processqueue.php 2007-07-17 07:12:01.000000000 +1200
+++ phplist-2.10.5/public_html/lists/admin/processqueue.php 2008-03-05 18:44:09.000000000 +1300
@@ -565,7 +565,11 @@
# pick the first one (rather historical)
$user = Sql_fetch_row($users);
- if ($user[5] && is_email($user[1])) {
+ // wp-phplist 2.10.2 modification - since we changed the name of this function, in userlib.php, we need to also change it here
+ // if ($user[5] && is_email($user[1])) {
+ if ($user[5] && phplist_is_email($user[1])) {
+ // wp-phplist 2.10.2 modification complete
+
$userid = $user[0]; # id of the user
$useremail = $user[1]; # email of the user
$userhash = $user[2]; # unique string of the user
diff -Naur phplist-2.10.5-orig/public_html/lists/admin/subscribelib2.php phplist-2.10.5/public_html/lists/admin/subscribelib2.php
--- phplist-2.10.5-orig/public_html/lists/admin/subscribelib2.php 2007-08-14 06:07:42.000000000 +1200
+++ phplist-2.10.5/public_html/lists/admin/subscribelib2.php 2008-03-05 18:44:09.000000000 +1300
@@ -12,7 +12,10 @@
if (!$id && $_GET["page"] != "import1") {
Fatal_Error("Invalid call");
- exit;
+ // wp-phplist 2.10.5 mod (we can't exit here, since we still want to give a NICE error in WordPress)
+ //exit;
+ // wp-phplist 2.10.5 mod complete
+
}
require_once dirname(__FILE__)."/date.php";
$date = new Date();
@@ -363,7 +366,9 @@
# they need to be "logged in" for this
if (empty($_SESSION['userloggedin'])) {
Fatal_Error("Access Denied");
- exit;
+ // wp-phplist 2.10.5 mod (we can't exit here, since we still want to give a NICE error in WordPress)
+ //exit;
+ // wp-phplist 2.10.5 mod complete
}
$checkpassword = '';
$allow = 0;
@@ -382,7 +387,9 @@
if (!$allow) {
# @@@ this check should be done above, so the error can be embedded in the template
print $GLOBALS["strPasswordsNoMatch"];
- exit;
+ // wp-phplist 2.10.5 mod (we can't exit here, since we still want to give a NICE error in WordPress)
+ //exit;
+ // wp-phplist 2.10.5 mod complete
}
}
@@ -395,7 +402,9 @@
This email already exists.
Please use the preferences URL for this email to make updates.
Click here to request your personal location");
- exit;
+ // wp-phplist 2.10.5 mod (we can't exit here, since we still want to give a NICE error in WordPress)
+ //exit;
+ // wp-phplist 2.10.5 mod complete
}
}
# read the current values to compare changes
diff -Naur phplist-2.10.5-orig/public_html/lists/index.php phplist-2.10.5/public_html/lists/index.php
--- phplist-2.10.5-orig/public_html/lists/index.php 2007-08-28 02:04:55.000000000 +1200
+++ phplist-2.10.5/public_html/lists/index.php 2008-03-05 18:44:09.000000000 +1300
@@ -1,6 +1,8 @@
'."\n";
include $_ENV["CONFIG"];
+ // wp-phplist-2.10.5 modification started
+} elseif (is_file(dirname(__FILE__)."/config/config.php")) {
+ include dirname(__FILE__)."/config/config.php";
+ // wp-phplist-2.10.5 modification completed
} elseif (is_file("config/config.php")) {
# print ''."\n";
include "config/config.php";
@@ -200,9 +206,18 @@
switch ($_GET["p"]) {
case "subscribe":
$success = require "admin/subscribelib2.php";
- if ($success != 2) {
- print SubscribePage($id);
- }
+ // wp-phplist-2.10.5 mod started
+ $listsok = ((!ALLOW_NON_LIST_SUBSCRIBE && is_array($_POST["list"])) || ALLOW_NON_LIST_SUBSCRIBE);
+ if (isset($_POST["subscribe"]) && (is_email($_POST["email"])) && $listsok) {
+ // do nothing
+ } else {
+ print SubscribePage($id);
+ }
+
+ //if ($success != 2) {
+ // print SubscribePage($id);
+ //}
+ // wp-phplist-2.10.5 mod complete
break;
case "preferences":
if (!isset($_GET["id"]) || !$_GET['id']) $_GET["id"] = $id;