[Mapbender-commits] r7611 - in trunk/mapbender: lib tools
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed Feb 16 02:37:26 EST 2011
Author: armin11
Date: 2011-02-15 23:37:26 -0800 (Tue, 15 Feb 2011)
New Revision: 7611
Modified:
trunk/mapbender/lib/class_Monitor.php
trunk/mapbender/tools/mod_monitorCapabilities_main.php
Log:
exchange exception with notice, change path
Modified: trunk/mapbender/lib/class_Monitor.php
===================================================================
--- trunk/mapbender/lib/class_Monitor.php 2011-02-15 15:24:36 UTC (rev 7610)
+++ trunk/mapbender/lib/class_Monitor.php 2011-02-16 07:37:26 UTC (rev 7611)
@@ -64,8 +64,8 @@
$this->wmsId = $this->getTagOutOfXML($this->reportFile,'wms_id');
$this->uploadId = $this->getTagOutOfXML($this->reportFile,'upload_id');
$this->autoUpdate = $autoUpdate;
- $e=new mb_exception("Monitor Report File: ".$this->reportFile);
- $e=new mb_exception("WMS ID: ".$this->wmsId);
+ $e=new mb_notice("Monitor Report File: ".$this->reportFile);
+ $e=new mb_notice("WMS ID: ".$this->wmsId);
$this->capabilitiesURL = urldecode($this->getTagOutOfXML($this->reportFile,'getcapurl'));//read out from xml
$e=new mb_notice("GetCapURL: ".$this->capabilitiesURL);
Modified: trunk/mapbender/tools/mod_monitorCapabilities_main.php
===================================================================
--- trunk/mapbender/tools/mod_monitorCapabilities_main.php 2011-02-15 15:24:36 UTC (rev 7610)
+++ trunk/mapbender/tools/mod_monitorCapabilities_main.php 2011-02-16 07:37:26 UTC (rev 7611)
@@ -17,7 +17,7 @@
require_once dirname(__FILE__) ."/../http/classes/class_administration.php";
require_once dirname(__FILE__) ."/../tools/mod_monitorCapabilities_defineGetMapBbox.php";
require_once dirname(__FILE__) ."/../http/classes/class_bbox.php";
-require_once(dirname(__FILE__)."/../http/classes/class_mb_exception.php");
+require_once(dirname(__FILE__)."/../http/classes/class_mb_notice.php");
#do db close at the most reasonable point
$admin = new administration();
@@ -80,7 +80,7 @@
$br = "\n\n";
}
-$e = new mb_exception("mod_monitorCapabilities_main.php: group: ".$group);
+$e = new mb_notice("mod_monitorCapabilities_main.php: group: ".$group);
$userIdArray = array();
@@ -134,7 +134,7 @@
$user_id_all = $userIdArray;
echo $br ."Count of registrating users: " . count($user_id_all) . $br;
-$e = new mb_exception("mod_monitorCapabilities_main.php: count of group members: ".count($user_id_all));
+$e = new mb_notice("mod_monitorCapabilities_main.php: count of group members: ".count($user_id_all));
$time_array = array();
for ($iz = 0; $iz < count($user_id_all); $iz++) {
@@ -147,7 +147,7 @@
echo "Starting monitoring cycle...$br";
echo "WMS services are requested for availability.$br";
echo "Capabilities documents are requested and compared to the infos in the service db.$br";
- $e = new mb_exception("mod_monitorCapabilities_main.php: monitoring for user: ".$userid);
+ $e = new mb_notice("mod_monitorCapabilities_main.php: monitoring for user: ".$userid);
//new: time user-monitoring cycle must stored in array
$time_array[$userid] = strval(time());
//wait 2 seconds to give enough time between to different users the time can differ also for one user!
@@ -189,7 +189,7 @@
//initialize monitoriung in db (set status=-2)
echo "initialize monitoring for user: " . $userid .
" WMS: " . $wms_id_own[$k] . $br;
- $e = new mb_exception("mod_monitorCapabilities_main.php: wms: ".$wms_id_own[$k]);
+ $e = new mb_notice("mod_monitorCapabilities_main.php: wms: ".$wms_id_own[$k]);
$sql = "INSERT INTO mb_monitor (upload_id, fkey_wms_id, " .
"status, status_comment, timestamp_begin, timestamp_end, " .
"upload_url, updated)";
@@ -216,7 +216,8 @@
// look in class_monitor.php !
$currentFilename = "wms_monitor_report_" . $time . "_" .
$wms_id_own[$k] . "_" . $userid . ".xml";
- $report = fopen("./tmp/" . $currentFilename,"a");
+ $report = fopen(dirname(__FILE__)."/tmp/".$currentFilename,"a");
+ //$e = new mb_notice("mod_monitorCapabilities_main.php: currentFilename: ".dirname(__FILE__)."/tmp/".$currentFilename);
$lb = chr(13).chr(10);
fwrite($report,"<monitorreport>".$lb);
@@ -241,7 +242,7 @@
// start of the monitoring processes on shell
// (maybe problematic for windows os)
- $e = new mb_exception("mod_monitorCapabilities_main.php: php call: ".$exec);
+ //$e = new mb_notice("mod_monitorCapabilities_main.php: php call: ".$exec);
$exec = PHP_PATH . "php5 " . dirname(__FILE__) . "/mod_monitorCapabilities_write.php " .
$currentFilename . " 0 > /dev/null &";
/*
@@ -276,7 +277,7 @@
$monitorFile = "./tmp/wms_monitor_report_" . $time . "_" .
$wms_id_own[$k] . "_".$userid.".xml";
- $e = new mb_exception("mod_monitorCapabilities_main.php: look for following file: ".$monitorFile);
+ $e = new mb_notice("mod_monitorCapabilities_main.php: look for following file: ".$monitorFile);
$status = getTagOutOfXML($monitorFile,"status");
$status_comment = getTagOutOfXML($monitorFile,"comment");
$cap_diff = getTagOutOfXML($monitorFile,"getcapdiff");
More information about the Mapbender_commits
mailing list