소스 검색

Corrected storage of the event_port

made a warning render correctly
added a warning about choosing a remote host
Matthew Vale 9 년 전
부모
커밋
5697dfbb1d

+ 10 - 0
core/install/install_first_time.php

@@ -224,6 +224,9 @@ if(!$install_step) { $install_step = 'select_language'; }
 		echo "	</div>\n";
 		echo "</form>\n";
 	}elseif($install_step == 'detect_config'){
+		if(!($event_host == 'localhost' || $event_host == '::1' || $event_host == '127.0.0.1')){
+			echo "<p><b>Warning</b> you have choosen a value other than localhost for event_host, this is unsoported at present</p>\n";
+		}
 		include "resources/page_parts/install_event_socket.php";
 		if($detect_ok){
 			echo "<form method='post' name='frm' action=''>\n";
@@ -238,6 +241,12 @@ if(!$install_step) { $install_step = 'select_language'; }
 			echo "    <button type='submit' id='next'>".$text['button-next']."</button>\n";
 			echo "	</div>\n";
 			echo "</form>\n";
+		}else{
+			echo "<form method='post' name='frm' action=''>\n";
+			echo "	<div style='text-align:right'>\n";
+			echo "    <button type='button' onclick=\"history.go(-1);\">".$text['button-back']."</button>\n";
+			echo "	</div>\n";
+			echo "</form>\n";
 		}
 	}
 	elseif($install_step == 'config_detail'){
@@ -257,6 +266,7 @@ if(!$install_step) { $install_step = 'select_language'; }
 		//if($_SERVER['HTTPS']) { $protocol = 'https'; }
 		//echo "<iframe src='$protocol://$domain_name/core/install/install_first_time.php' style='border:solid 1px #000;width:100%;height:auto'></iframe>";
 		require_once "core/install/resources/classes/detect_switch.php";
+		trigger_error("D:> using $event_host, $event_port, $event_password\n",E_USER_WARNING);
 		$switch_detect = new detect_switch($event_host, $event_port, $event_password);
 		$detect_ok = true;
 		try {

+ 1 - 1
core/install/resources/page_parts/install_config_database.php

@@ -31,7 +31,7 @@
 	echo "<input type='hidden' name='install_step' value='execute'/>\n";
 
 	echo "<input type='hidden' name='event_host' value='$event_host'/>\n";
-	echo "<input type='hidden' name='event_port' value='$event_host'/>\n";
+	echo "<input type='hidden' name='event_port' value='$event_port'/>\n";
 	echo "<input type='hidden' name='event_password' value='$event_password'/>\n";
 	echo "<input type='hidden' name='db_type' value='$db_type'/>\n";
 	echo "<input type='hidden' name='admin_username' value='$admin_username'/>\n";

+ 1 - 1
core/install/resources/page_parts/install_config_detail.php

@@ -31,7 +31,7 @@
 	echo "<input type='hidden' name='install_step' value='config_database'/>\n";
 
 	echo "<input type='hidden' name='event_host' value='$event_host'/>\n";
-	echo "<input type='hidden' name='event_port' value='$event_host'/>\n";
+	echo "<input type='hidden' name='event_port' value='$event_port'/>\n";
 	echo "<input type='hidden' name='event_password' value='$event_password'/>\n";
 
 	echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";

+ 2 - 2
core/install/resources/page_parts/install_event_socket.php

@@ -31,10 +31,10 @@
 	try {
 		$switch_detect->detect();
 	} catch(Exception $e){
-		$messages[] = "Failed to detect confgiuration detect_switch reported: " . $e->getMessage();
+		echo "<p><b>Failed to detect configuration</b> detect_switch reported: " . $e->getMessage() ."</p>\n";
 		$detect_ok = false;
 	}
-	echo "<form method='post' name='frm' action=''>\n";
+	echo "<form method='post' name='detect_switch' action=''>\n";
 	echo "<input type='hidden' name='install_language' value='".$_SESSION['domain']['language']['code']."'/>\n";
 	echo "<input type='hidden' name='install_step' value='detect_config'/>\n";
 	echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";