From 550a14a669ca4271db64856ff7c7ce376fc2cd34 Mon Sep 17 00:00:00 2001 From: BlueRaja Date: Wed, 29 May 2013 06:58:14 -0500 Subject: Set up foreign keys within the database. There is a small chance I may have broken emails, unlocks, or chat. Will test :) --- pages/chat.php | 6 +++--- pages/cp.php | 20 -------------------- pages/login.php | 4 ++-- pages/massemail.php | 2 +- 4 files changed, 6 insertions(+), 26 deletions(-) (limited to 'pages') diff --git a/pages/chat.php b/pages/chat.php index 8d3501b..4f903a8 100644 --- a/pages/chat.php +++ b/pages/chat.php @@ -1,7 +1,7 @@ @@ -76,7 +76,7 @@ function getChatDone(data) { if (chat.userID == userObj.ID) { strClass += ' self'; } - if (chat.userID == '-1') { + if (chat.userID == null || chat.userID <= 0) { strClass += ' server'; chat.displayName = 'SERVER' } @@ -110,7 +110,7 @@ function getChatDone(data) { p = p+ " "; p = p+ "
"; - if (chat.userID == '-1') { + if (chat.userID == null || chat.userID <= 0) { p = p+ ""; } else { p = p+ ""; diff --git a/pages/cp.php b/pages/cp.php index f6efd30..d5fff2b 100644 --- a/pages/cp.php +++ b/pages/cp.php @@ -143,25 +143,5 @@ $displayName = $_SESSION['displayName']; diff --git a/pages/login.php b/pages/login.php index 07662c3..04b4083 100644 --- a/pages/login.php +++ b/pages/login.php @@ -139,7 +139,7 @@ try { throwLoginError($d, "Unknown DB Registration failure"); exit; } - addchat(-1, "New user registered: \"$display\""); + addchat(null, "New user registered: \"$display\""); sendNewUserEmail($userID, $email, $display, $dateJoined); } //If 'remember me' use this for cookie password @@ -193,7 +193,7 @@ Happy Pathing, The Pathery Team "; $emailSubject = 'Welcome to Pathery.com!'; - QueueEmail(0, $email, $emailSubject, $emailBody, 5, true); + QueueEmail(null, $email, $emailSubject, $emailBody, 5); } function throwLoginError($data, $explination) { diff --git a/pages/massemail.php b/pages/massemail.php index 2d80b17..d009cf9 100644 --- a/pages/massemail.php +++ b/pages/massemail.php @@ -69,7 +69,7 @@ if (isset($_POST['queueMassEmail']) AND $_POST['queueMassEmail'] == 'true') { $tmpTitle = replaceByArray($tmpTitle, $replacements); echo "$tmpBody
"; //This Sanitizes data - so no worries! - QueueEmail(0, $tmpEmail, $tmpTitle, $tmpBody, 100, true); + QueueEmail(null, $tmpEmail, $tmpTitle, $tmpBody, 100); } echo "Complete!...
"; -- cgit v1.2.3