[Mapbender-commits] r1617 - trunk/mapbender/http/tools
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Aug 6 08:52:29 EDT 2007
Author: christoph
Date: 2007-08-06 08:52:29 -0400 (Mon, 06 Aug 2007)
New Revision: 1617
Modified:
trunk/mapbender/http/tools/mapFiler.php
Log:
removed superfluous curly brace
Modified: trunk/mapbender/http/tools/mapFiler.php
===================================================================
--- trunk/mapbender/http/tools/mapFiler.php 2007-08-06 10:29:13 UTC (rev 1616)
+++ trunk/mapbender/http/tools/mapFiler.php 2007-08-06 12:52:29 UTC (rev 1617)
@@ -48,8 +48,8 @@
/********************************/
function modify($myDir, $myFile){
global $factor;
- $myContent = fopen($myDir."/".$myFile, "r") or die("Datei " . $myDir . " / ". $myFile ." konnte nicht zum Lesen ge�ffnet werden!");
- $myNewContent = fopen($myDir."/".preg_replace(".","_".$factor.".",$myFile), "w") or die("Datei " . $myDir . " / ". preg_replace(".","_".$factor.".",$myFile) ." konnte nicht zum Schreiben ge�ffnet werden!");
+ $myContent = fopen($myDir."/".$myFile, "r") or die("Datei " . $myDir . " / ". $myFile ." konnte nicht zum Lesen geöffnet werden!");
+ $myNewContent = fopen($myDir."/".str_replace(".","_".$factor.".",$myFile), "w") or die("Datei " . $myDir . " / ". str_replace(".","_".$factor.".",$myFile) ." konnte nicht zum Schreiben geöffnet werden!");
fputs($myNewContent, "#Modified by MapbenderTools" . "\n");
fputs($myNewContent, "#Date: ". date("d.m.Y") . "\n");
fputs($myNewContent, "#Factor: ". $factor . "\n\n");
@@ -58,7 +58,7 @@
$myLine = fgets($myContent, 1024);
if(preg_match("/\bSIZE\s*(\d+.?\d*)\s*/i",$myLine,$matches)){
if(count($matches) <= 2){
- fputs($myNewContent, preg_replace($matches[1], multiplicate($matches[1]), $myLine));
+ fputs($myNewContent, str_replace($matches[1], multiplicate($matches[1]), $myLine));
}
}
else if(preg_match("/(.*OFFSET)\s*(\d+.?\d*)(\s*)(\d+.?\d*)(\s*)/i",$myLine,$matches)){
@@ -67,19 +67,19 @@
}
else if(preg_match("/\bMAXSIZE\s*(\d+.?\d*)\s*/i",$myLine,$matches)){
if(count($matches) <= 2){
- fputs($myNewContent, preg_replace($matches[1], multiplicate($matches[1]), $myLine));
+ fputs($myNewContent, str_replace($matches[1], multiplicate($matches[1]), $myLine));
}
}
else if(preg_match("/\bMINSIZE\s*(\d+.?\d*)\s*/i",$myLine,$matches)){
if(count($matches) <= 2){
- fputs($myNewContent, preg_replace($matches[1], multiplicate($matches[1]), $myLine));
+ fputs($myNewContent, str_replace($matches[1], multiplicate($matches[1]), $myLine));
}
}
else if(preg_match("/\bSYMBOLSCALE\s*(\d+.?\d*)\s*/i",$myLine,$matches)){
fputs($myNewContent, "# ". $myLine);
}
else if(preg_match("/\bSYMBOLSET\s*(.*)/i",$myLine,$matches)){ //noch nicht fertig
- $arraySymbolFiles[$countSymbolsFiles] = preg_replace("\"","",$matches[1]);
+ $arraySymbolFiles[$countSymbolsFiles] = str_replace("\"","",$matches[1]);
$countSymbolsFiles++;
fputs($myNewContent, $myLine);
}
@@ -101,10 +101,7 @@
# what is to do...
$myFile = basename($myLocation);
$myDir = dirname($myLocation);
- $suffix = "";
- if (mb_strpos($myFile, ".") !== false) {
- $suffix = mb_substr($myFile, mb_strpos($myFile, "."));
- }}
+ $suffix = strstr($myFile, ".");
if(!isset($dir)){
More information about the Mapbender_commits
mailing list