[Mapbender-commits] r1595 - trunk/mapbender/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Aug 6 04:23:32 EDT 2007
Author: christoph
Date: 2007-08-06 04:23:32 -0400 (Mon, 06 Aug 2007)
New Revision: 1595
Modified:
trunk/mapbender/http/php/mod_getStyles.php
Log:
replaced old string functions by multibyte string function
Modified: trunk/mapbender/http/php/mod_getStyles.php
===================================================================
--- trunk/mapbender/http/php/mod_getStyles.php 2007-08-06 08:22:43 UTC (rev 1594)
+++ trunk/mapbender/http/php/mod_getStyles.php 2007-08-06 08:23:32 UTC (rev 1595)
@@ -81,7 +81,7 @@
{
global $proxy_name,$proxy_port,$proxy_cont,$proxy_user,$proxy_pass;
//echo $proxy_user;
- $proxy_fp = fsockopen($proxy_name, $proxy_port) or die ("Fehler beim öffnen der Verbindung zum Proxy");
+ $proxy_fp = fsockopen($proxy_name, $proxy_port) or die ("Fehler beim �ffnen der Verbindung zum Proxy");
if (!$proxy_fp) {return false;}
$headers = "GET $proxy_url HTTP/1.0\r\nHost: $proxy_name\r\n";
$headers .= 'Proxy-Authorization: ' . 'Basic ' . base64_encode($proxy_user . ':' . $proxy_pass)."\r\nConnection: Keep-Alive\r\n\r\n";
@@ -114,7 +114,7 @@
$cnt_line = 0;
fwrite($style_file, "<".chr(63)."php echo '<?xml version=\"1.0\" encoding=\"ISO-8859-1\" standalone=\"yes\" ?>'; ".chr(63).">\r\n");
//while(!feof($style_xml)){
- //$line = str_replace("md5userid", "<".chr(63)."php echo ".chr(36)."_REQUEST['id']; ".chr(63).">",fgets($style_xml));
+ //$line = preg_replace("md5userid", "<".chr(63)."php echo ".chr(36)."_REQUEST['id']; ".chr(63).">",fgets($style_xml));
fwrite($style_file, $style_xml);
#echo fgets($style_xml);
@@ -126,7 +126,7 @@
@fclose($style_xml);
fclose($style_file);
#include(dirname(__FILE__)."/../../conf/www.conf");
- $sql = "UPDATE wms SET wms_filter = '".str_replace(basename($login),$style_filename,$login)."' WHERE wms_id = ". $wmsList;
+ $sql = "UPDATE wms SET wms_filter = '".preg_replace(basename($login),$style_filename,$login)."' WHERE wms_id = ". $wmsList;
echo $sql;
db_query($sql) or die("unable to change filter!");
}
@@ -168,8 +168,8 @@
if($style_filename){
$style_file = fopen($style_filename,"r");
while(!feof($style_file)){
- $content = str_replace("<","<",fgets($style_file));
- echo str_replace(">",">",$content)."<br>";
+ $content = preg_replace("<","<",fgets($style_file));
+ echo preg_replace(">",">",$content)."<br>";
}
fclose($style_file);
}
More information about the Mapbender_commits
mailing list