[mw-devel] MW3 r1378 - trunk/webclient

arthur at sucs.org arthur at sucs.org
Tue Feb 10 13:34:42 GMT 2015


Author: arthur
Date: 2015-02-10 13:34:41 +0000 (Tue, 10 Feb 2015)
New Revision: 1378

Modified:
   trunk/webclient/startup.php
Log:
assign_by_ref is deprecated


Modified: trunk/webclient/startup.php
===================================================================
--- trunk/webclient/startup.php	2015-02-10 13:33:43 UTC (rev 1377)
+++ trunk/webclient/startup.php	2015-02-10 13:34:41 UTC (rev 1378)
@@ -12,14 +12,14 @@
 if (@$_REQUEST['sucssite_loggedin']!="true") {
 	if (empty($username) || empty($password)) {
 		$smarty->assign("error", "username and password must both be not empty");
-		$smarty->assign_by_ref("body", $smarty->fetch("login.html"));
+		$smarty->assign("body", $smarty->fetch("login.html"));
 		$smarty->display("main.html");
 		exit;
 	}
 
 	if (ctype_alnum($username) === FALSE) {
 		$smarty->assign("error", "alphanumeric usernames only");
-		$smarty->assign_by_ref("body", $smarty->fetch("login.html"));
+		$smarty->assign("body", $smarty->fetch("login.html"));
 		$smarty->display("main.html");
 		exit;
 	}
@@ -32,25 +32,25 @@
 	$pass2 = @$_REQUEST['password2'];
 	if ($pass1 != $pass2) {
 		$smarty->assign("error", "Passwords don't match - please try again");
-		$smarty->assign_by_ref("body", $smarty->fetch("createaccount.html"));
+		$smarty->assign("body", $smarty->fetch("createaccount.html"));
 		$smarty->display("main.html");
 		exit;	
 	}
 	if (empty($pass1)) {
 		$smarty->assign("error", "Password cannot be blank");
-		$smarty->assign_by_ref("body", $smarty->fetch("createaccount.html"));
+		$smarty->assign("body", $smarty->fetch("createaccount.html"));
 		$smarty->display("main.html");
 		exit;	
 	}
 	if (ctype_alnum($pass1) === FALSE) {
 		$smarty->assign("error", "Milliways passwords can only contain alphanumeric characters");
-		$smarty->assign_by_ref("body", $smarty->fetch("createaccount.html"));
+		$smarty->assign("body", $smarty->fetch("createaccount.html"));
 		$smarty->display("main.html");
 		exit;	
 	}
 	if (strlen($pass1) < 6) {
 		$smarty->assign("error", "Milliways passwords must be 6 characters or more");
-		$smarty->assign_by_ref("body", $smarty->fetch("createaccount.html"));
+		$smarty->assign("body", $smarty->fetch("createaccount.html"));
 		$smarty->display("main.html");
 		exit;	
 	}
@@ -80,7 +80,7 @@
 	// Include the session library
 	require($base."lib/session.php");
 	$session = new Session;
-	$smarty->assign_by_ref("session", $session);
+	$smarty->assign("session", $session);
 	$realuser = $session->username;
 
 	if ($action == "create") {
@@ -97,14 +97,14 @@
 }
 
 if (empty($p)) {
-	$smarty->assign_by_ref("body", $smarty->fetch("login.html"));
+	$smarty->assign("body", $smarty->fetch("login.html"));
 	$smarty->display("main.html");
 	exit;
 }
 
 if ($p === FALSE) {
 	$smarty->assign("error", "failed to exec mwpoll");
-	$smarty->assign_by_ref("body", $smarty->fetch("login.html"));
+	$smarty->assign("body", $smarty->fetch("login.html"));
 	$smarty->display("main.html");
 	exit;
 }
@@ -132,12 +132,12 @@
 	if (substr($pid, -10) =="not found.") {
 	// User doesn't exist - ask for a Milliways password so we can create them!
 		$smarty->assign("error", $pid);
-		$smarty->assign_by_ref("body", $smarty->fetch("createaccount.html"));
+		$smarty->assign("body", $smarty->fetch("createaccount.html"));
 		$smarty->display("main.html");
 		exit;	
 	}
 	$smarty->assign("error", "Bad response: pid=$pid");
-	$smarty->assign_by_ref("body", $smarty->fetch("login.html"));
+	$smarty->assign("body", $smarty->fetch("login.html"));
 	$smarty->display("main.html");
 	exit;
 }




More information about the mw-devel mailing list