changeset 11:0a03c75499e6

bug fixed: sessionId after saving
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Mon, 22 Jun 2015 15:12:58 +0200
parents 2c35af0d78f3
children 7e04cbe8b2a0
files check_sections_details.php config/config.php js/check_sections_details.js
diffstat 3 files changed, 10 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/check_sections_details.php	Mon Jun 22 14:27:13 2015 +0200
+++ b/check_sections_details.php	Mon Jun 22 15:12:58 2015 +0200
@@ -107,13 +107,15 @@
 	
 	if ($current_editor == null) {
 		// redirect to LGServices homepage
-		header('Location: http://localgazetteers/LGServices');
+		header("Location: "+$lgserver_url+"LGServices");
+		//header('Location: http://localgazetteers/LGServices');
 	}
 
 } else {
 	// test locally
 	// redirect to LGServices homepage
-	header('Location: http://localgazetteers/LGServices');
+	header("Location: "+$lgserver_url+"LGServices");
+	//header('Location: http://localgazetteers/LGServices');
 }
 
 ?>
@@ -178,9 +180,8 @@
         	</div>
 		</div>
 		<div id="panel"></div>
-		<script>
-			var version=<?php echo $version;?>;
-			var session_id = <?php echo $_GET['sessionId'];?>;
+		<script>var version = <?php echo $version;?>;
+				var session_id = "<?php echo $_GET['sessionId']; ?>";
 		</script>
 
 		<script type="text/javascript">
--- a/config/config.php	Mon Jun 22 14:27:13 2015 +0200
+++ b/config/config.php	Mon Jun 22 15:12:58 2015 +0200
@@ -1,6 +1,6 @@
 <?php
 
-$at_local = false;
+$at_local = true;
 
 if (!$at_local) {
 	// host at localgazetteers-dev server
@@ -8,7 +8,7 @@
 	$mysql_server = "localhost";
 	$mysql_user = "root";
 	$mysql_password = "admin";
-	$server_host = "http://localgazetteers-test/";
+	$server_host = "http://localgazetteers-test.mpiwg-berlin.mpg.de/";
 	$lgserver_url = $server_host."LGServices/";
 
 } else {
--- a/js/check_sections_details.js	Mon Jun 22 14:27:13 2015 +0200
+++ b/js/check_sections_details.js	Mon Jun 22 15:12:58 2015 +0200
@@ -360,8 +360,8 @@
 				var count=reg.exec(href);
     				reg = /[^\?]+/g;
     				href = reg.exec(href);		
-
-				href=href+"?book_id="+bookId+"&"+count+"&hideDeletedChecked="+hideDeletedChecked+"&editor="+editor+"&sessionId="session_id;
+    			
+				href=href+"?book_id="+bookId+"&"+count+"&hideDeletedChecked="+hideDeletedChecked+"&editor="+editor+"&sessionId="+session_id;
 				location.href=href; //refresh the page to load the sections saved in db
 				
 			}else{