From c955c27cbebba3edaab9532834ac72041eccbf58 Mon Sep 17 00:00:00 2001 From: BlueRaja Date: Tue, 28 May 2013 02:07:59 -0500 Subject: Edited a few more places where "include_once" was being used within a method. Hopefully this doesn't break anything :) --- pages/login.php | 9 +++++---- pages/massemail.php | 3 +-- pages/tutorial.php | 3 +-- 3 files changed, 7 insertions(+), 8 deletions(-) (limited to 'pages') diff --git a/pages/login.php b/pages/login.php index f73ca8c..b7c4317 100644 --- a/pages/login.php +++ b/pages/login.php @@ -10,6 +10,11 @@ if ($accepted) { require 'includes/openid.php'; include_once 'globe.php'; +include_once('./includes/sqlEmbedded.php'); +include_once('./includes/datas.php'); +include_once('includes/chats.php'); +include_once('./includes/emails.php'); + try { $openid = new LightOpenID; @@ -52,7 +57,6 @@ try { $claimedid = $openid->__get('identity'); //I know just where to put this stuff! - include_once('./includes/sqlEmbedded.php'); //Unless I already have this information... //* Modify this to WHERE `email` //$sql = "SELECT `ID`, `isAdmin`, `openID`, `displayName` FROM `users` WHERE `email` = '$email'"; @@ -125,7 +129,6 @@ try { //Tutorial done? if (isset($_SESSION['preCompletedTutorial'])) { if ($_SESSION['preCompletedTutorial'] == true) { - include_once('./includes/datas.php'); onCompletedTutorial($userID); } } @@ -136,7 +139,6 @@ try { throwLoginError($d, "Unknown DB Registration failure"); exit; } - include_once('includes/chats.php'); addchat(-1, "New user registered: \"$display\""); sendNewUserEmail($userID, $email, $display, $dateJoined); } @@ -177,7 +179,6 @@ try { function sendNewUserEmail($userID, $email, $display, $dateJoined) { global $mydomain; - include_once('./includes/emails.php'); $emailBody = "Thank you for signing in to Pathery! Questions or feedback? Please reply to this email! diff --git a/pages/massemail.php b/pages/massemail.php index a85451b..d9c97c7 100644 --- a/pages/massemail.php +++ b/pages/massemail.php @@ -12,6 +12,7 @@ topbar($Links); include_once('./includes/datas.php'); include_once('./includes/sqlEmbedded.php'); include_once('./includes/emails.php'); +include_once('./includes/sqlEmbedded.php'); if (!$accepted) exit; @@ -77,8 +78,6 @@ if (isset($_POST['queueMassEmail']) AND $_POST['queueMassEmail'] == 'true') { exit; } -include_once('./includes/sqlEmbedded.php'); - $res = mysqli_query($mysqli, "SELECT count(*) as count FROM `emailQueue`"); $row = mysqli_fetch_assoc($res); $count = $row['count']; diff --git a/pages/tutorial.php b/pages/tutorial.php index 41151cd..e407866 100644 --- a/pages/tutorial.php +++ b/pages/tutorial.php @@ -14,11 +14,10 @@ topbar($Links); include_once ('./includes/maps.php'); include_once ('./includes/mapclass.php'); - +include_once ('./includes/sqlEmbedded.php'); //TODO: Turn this into a function? if ($accepted) { - include_once ('./includes/sqlEmbedded.php'); $userID = $_SESSION['userID']; $sql = " -- cgit v1.2.3