[Mapbender-commits] r3914 - branches/2.5/http/php branches/2.6/http/php trunk/mapbender/http/php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Apr 28 09:06:37 EDT 2009


Author: christoph
Date: 2009-04-28 09:06:37 -0400 (Tue, 28 Apr 2009)
New Revision: 3914

Modified:
   branches/2.5/http/php/mod_loadwmc_server.php
   branches/2.6/http/php/mod_loadwmc_server.php
   trunk/mapbender/http/php/mod_loadwmc_server.php
Log:
http://trac.osgeo.org/mapbender/ticket/458

Modified: branches/2.5/http/php/mod_loadwmc_server.php
===================================================================
--- branches/2.5/http/php/mod_loadwmc_server.php	2009-04-28 12:21:47 UTC (rev 3913)
+++ branches/2.5/http/php/mod_loadwmc_server.php	2009-04-28 13:06:37 UTC (rev 3914)
@@ -50,17 +50,19 @@
 		array_push($t, 's');
 	}
 
-	$sql = "SELECT DISTINCT wmc_id, wmc_title, wmc_timestamp " . 
-		"FROM mb_user_wmc WHERE wmc_id IN (" . $wmcIdList . ") " .
-		"ORDER BY wmc_timestamp DESC";
+	if ($wmcIdList !== "") {
+		$sql = "SELECT DISTINCT wmc_id, wmc_title, wmc_timestamp FROM mb_user_wmc ";
+		$sql .= "WHERE wmc_id IN (" . $wmcIdList . ") ";
+		$sql .=	"ORDER BY wmc_timestamp DESC";
 	
-	$res = db_prep_query($sql, $v, $t);
-	while($row = db_fetch_array($res)){
-		$currentResult = array();
-		$currentResult["id"] = $row["wmc_id"];
-		$currentResult["title"] = administration::convertIncomingString($row["wmc_title"]);
-		$currentResult["timestamp"] = date("M d Y H:i:s", $row["wmc_timestamp"]); 
-		array_push($wmcArray, $currentResult);
+		$res = db_prep_query($sql, $v, $t);
+		while($row = db_fetch_array($res)){
+			$currentResult = array();
+			$currentResult["id"] = $row["wmc_id"];
+			$currentResult["title"] = administration::convertIncomingString($row["wmc_title"]);
+			$currentResult["timestamp"] = date("M d Y H:i:s", $row["wmc_timestamp"]); 
+			array_push($wmcArray, $currentResult);
+		}
 	}
 	return $wmcArray;
 }

Modified: branches/2.6/http/php/mod_loadwmc_server.php
===================================================================
--- branches/2.6/http/php/mod_loadwmc_server.php	2009-04-28 12:21:47 UTC (rev 3913)
+++ branches/2.6/http/php/mod_loadwmc_server.php	2009-04-28 13:06:37 UTC (rev 3914)
@@ -50,17 +50,19 @@
 		array_push($t, 's');
 	}
 
-	$sql = "SELECT DISTINCT wmc_id, wmc_title, wmc_timestamp " . 
-		"FROM mb_user_wmc WHERE wmc_id IN (" . $wmcIdList . ") " .
-		"ORDER BY wmc_timestamp DESC";
+	if ($wmcIdList !== "") {
+		$sql = "SELECT DISTINCT wmc_id, wmc_title, wmc_timestamp FROM mb_user_wmc ";
+		$sql .= "WHERE wmc_id IN (" . $wmcIdList . ") ";
+		$sql .=	"ORDER BY wmc_timestamp DESC";
 	
-	$res = db_prep_query($sql, $v, $t);
-	while($row = db_fetch_array($res)){
-		$currentResult = array();
-		$currentResult["id"] = $row["wmc_id"];
-		$currentResult["title"] = administration::convertIncomingString($row["wmc_title"]);
-		$currentResult["timestamp"] = date("M d Y H:i:s", $row["wmc_timestamp"]); 
-		array_push($wmcArray, $currentResult);
+		$res = db_prep_query($sql, $v, $t);
+		while($row = db_fetch_array($res)){
+			$currentResult = array();
+			$currentResult["id"] = $row["wmc_id"];
+			$currentResult["title"] = administration::convertIncomingString($row["wmc_title"]);
+			$currentResult["timestamp"] = date("M d Y H:i:s", $row["wmc_timestamp"]); 
+			array_push($wmcArray, $currentResult);
+		}
 	}
 	return $wmcArray;
 }

Modified: trunk/mapbender/http/php/mod_loadwmc_server.php
===================================================================
--- trunk/mapbender/http/php/mod_loadwmc_server.php	2009-04-28 12:21:47 UTC (rev 3913)
+++ trunk/mapbender/http/php/mod_loadwmc_server.php	2009-04-28 13:06:37 UTC (rev 3914)
@@ -50,17 +50,19 @@
 		array_push($t, 's');
 	}
 
-	$sql = "SELECT DISTINCT wmc_id, wmc_title, wmc_timestamp " . 
-		"FROM mb_user_wmc WHERE wmc_id IN (" . $wmcIdList . ") " .
-		"ORDER BY wmc_timestamp DESC";
+	if ($wmcIdList !== "") {
+		$sql = "SELECT DISTINCT wmc_id, wmc_title, wmc_timestamp FROM mb_user_wmc ";
+		$sql .= "WHERE wmc_id IN (" . $wmcIdList . ") ";
+		$sql .=	"ORDER BY wmc_timestamp DESC";
 	
-	$res = db_prep_query($sql, $v, $t);
-	while($row = db_fetch_array($res)){
-		$currentResult = array();
-		$currentResult["id"] = $row["wmc_id"];
-		$currentResult["title"] = administration::convertIncomingString($row["wmc_title"]);
-		$currentResult["timestamp"] = date("M d Y H:i:s", $row["wmc_timestamp"]); 
-		array_push($wmcArray, $currentResult);
+		$res = db_prep_query($sql, $v, $t);
+		while($row = db_fetch_array($res)){
+			$currentResult = array();
+			$currentResult["id"] = $row["wmc_id"];
+			$currentResult["title"] = administration::convertIncomingString($row["wmc_title"]);
+			$currentResult["timestamp"] = date("M d Y H:i:s", $row["wmc_timestamp"]); 
+			array_push($wmcArray, $currentResult);
+		}
 	}
 	return $wmcArray;
 }



More information about the Mapbender_commits mailing list