[Mapbender-commits] r1654 - trunk/mapbender/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Fri Aug 10 05:10:51 EDT 2007
Author: christoph
Date: 2007-08-10 05:10:50 -0400 (Fri, 10 Aug 2007)
New Revision: 1654
Modified:
trunk/mapbender/http/php/mod_editWMS_Metadata.php
trunk/mapbender/http/php/mod_exportElement.php
trunk/mapbender/http/php/mod_exportGUI.php
trunk/mapbender/http/php/mod_getStyles.php
trunk/mapbender/http/php/mod_layerMetadata.php
Log:
new column e_title in gui_element
fixed faulty preg_replace call
Modified: trunk/mapbender/http/php/mod_editWMS_Metadata.php
===================================================================
--- trunk/mapbender/http/php/mod_editWMS_Metadata.php 2007-08-10 09:09:40 UTC (rev 1653)
+++ trunk/mapbender/http/php/mod_editWMS_Metadata.php 2007-08-10 09:10:50 UTC (rev 1654)
@@ -132,7 +132,7 @@
if(preg_match("/___/", $key))
{
$myKey = explode("___", $key);
- $layer_id = preg_replace("L_","",$myKey[0]);
+ $layer_id = preg_replace("/L_/","",$myKey[0]);
if($myKey[1]=="layer_abstract")
{
$layer_sql = "UPDATE layer SET layer_abstract = '$val' " .
Modified: trunk/mapbender/http/php/mod_exportElement.php
===================================================================
--- trunk/mapbender/http/php/mod_exportElement.php 2007-08-10 09:09:40 UTC (rev 1653)
+++ trunk/mapbender/http/php/mod_exportElement.php 2007-08-10 09:10:50 UTC (rev 1654)
@@ -50,6 +50,7 @@
$insert .= "e_pos, ";
$insert .= "e_public, ";
$insert .= "e_comment, ";
+ $insert .= "e_title, ";
$insert .= "e_element, ";
$insert .= "e_src, ";
$insert .= "e_attributes, ";
@@ -72,6 +73,7 @@
$insert .= "".$row["e_pos"]. ",";
$insert .= "".$row["e_public"]. ",";
$insert .= "'".db_escape_string($row["e_comment"])."',";
+ $insert .= "'".db_escape_string($row["e_title"])."',";
$insert .= "'".$row["e_element"]."',";
$insert .= "'".$row["e_src"]."',";
$insert .= "'".db_escape_string($row["e_attributes"])."',";
@@ -89,7 +91,7 @@
$insert .= "'".$row["e_requires"]."',";
$insert .= "'".$row["e_url"]."'";
$insert .= ");\n";
- $insert = preg_replace(",,", ",NULL ,", $insert);
+ $insert = preg_replace("/,,/", ",NULL ,", $insert);
}
# export element vars
@@ -114,13 +116,13 @@
$insert .= "'".db_escape_string($row["context"])."' ,";
$insert .= "'".db_escape_string($row["var_type"])."'";
$insert .= ");\n";
- $insert = preg_replace(",,", ",NULL ,", $insert);
+ $insert = preg_replace("/,,/", ",NULL ,", $insert);
$cnt_res++;
}
#------------------
echo "<textarea rows=30 cols=100>";
- echo preg_replace(", ,", ",NULL ,", $insert);
+ echo preg_replace("/, ,/", ",NULL ,", $insert);
echo "</textarea>";
?>
Modified: trunk/mapbender/http/php/mod_exportGUI.php
===================================================================
--- trunk/mapbender/http/php/mod_exportGUI.php 2007-08-10 09:09:40 UTC (rev 1653)
+++ trunk/mapbender/http/php/mod_exportGUI.php 2007-08-10 09:10:50 UTC (rev 1654)
@@ -88,7 +88,7 @@
$cnt_gel = 0;
while ($row = db_fetch_array($res_gel)){
- $insert.="INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,";
+ $insert.="INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element,";
$insert.="e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles,";
$insert.=" e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES (";
@@ -97,6 +97,7 @@
$insert.="".$row["e_pos"].",";
$insert.="".$row["e_public"].",";
$insert.="'".db_escape_string($row["e_comment"])."',";
+ $insert.="'".db_escape_string($row["e_title"])."',";
$insert.="'".$row["e_element"]."',";
$insert.="'".$row["e_src"]."',";
$insert.="'".db_escape_string($row["e_attributes"])."',";
@@ -114,7 +115,7 @@
$insert.="'".$row["e_requires"]."',";
$insert.="'".$row["e_url"]."'";
$insert.= ");\n";
- $insert = preg_replace(",,", ",NULL ,", $insert);
+ $insert = preg_replace("/,,/", ",NULL ,", $insert);
}
@@ -142,8 +143,8 @@
$insert.=", ";
}
$temp = db_escape_string($row[$i]);
- $temp = preg_replace(">",">",$temp);
- $temp = preg_replace("<","<",$temp);
+ $temp = preg_replace("/>/",">",$temp);
+ $temp = preg_replace("/</","<",$temp);
$insert.="'" . $temp . "'";
$i++;
}
@@ -153,8 +154,8 @@
}
- $insert = preg_replace(",,",",NULL,",$insert);
- $insert = preg_replace(", ,", ",NULL,",$insert);
+ $insert = preg_replace("/,,/",",NULL,",$insert);
+ $insert = preg_replace("/, ,/", ",NULL,",$insert);
echo "<textarea rows=40 cols=80>";
echo $insert;
Modified: trunk/mapbender/http/php/mod_getStyles.php
===================================================================
--- trunk/mapbender/http/php/mod_getStyles.php 2007-08-10 09:09:40 UTC (rev 1653)
+++ trunk/mapbender/http/php/mod_getStyles.php 2007-08-10 09:10:50 UTC (rev 1654)
@@ -168,8 +168,8 @@
if($style_filename){
$style_file = fopen($style_filename,"r");
while(!feof($style_file)){
- $content = preg_replace("<","<",fgets($style_file));
- echo preg_replace(">",">",$content)."<br>";
+ $content = preg_replace("/</","<",fgets($style_file));
+ echo preg_replace("/>/",">",$content)."<br>";
}
fclose($style_file);
}
Modified: trunk/mapbender/http/php/mod_layerMetadata.php
===================================================================
--- trunk/mapbender/http/php/mod_layerMetadata.php 2007-08-10 09:09:40 UTC (rev 1653)
+++ trunk/mapbender/http/php/mod_layerMetadata.php 2007-08-10 09:10:50 UTC (rev 1654)
@@ -106,7 +106,7 @@
$layer['Minscale'] = $row['layer_minscale'];
$layer['Maxscale'] = $row['layer_maxscale'];
}
- $layer['Koordinatensysteme'] = preg_replace(" ", ", ", getEpsgByLayerId($row['layer_id']));
+ $layer['Koordinatensysteme'] = preg_replace("/ /", ", ", getEpsgByLayerId($row['layer_id']));
// $layer['Capabilities-Dokument'] = "<a href = '../x_geoportal/getCapabilities_document.php?wms_request=".$row['wms_id']."&layer_request=".$row['layer_pos']."' target=_blank>Capabilities-Dokument</a>";
if ($row['wms_timestamp']) {
$layer['Datum der Registrierung'] = date("d.m.Y",$row['wms_timestamp']);
More information about the Mapbender_commits
mailing list