[Mapbender-commits] r8330 - trunk/mapbender/tools
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Thu Apr 26 10:48:16 EDT 2012
Author: verenadiewald
Date: 2012-04-26 07:48:16 -0700 (Thu, 26 Apr 2012)
New Revision: 8330
Modified:
trunk/mapbender/tools/mod_runScheduler.php
Log:
use root user's mail adress as sender for user notifier mail
Modified: trunk/mapbender/tools/mod_runScheduler.php
===================================================================
--- trunk/mapbender/tools/mod_runScheduler.php 2012-04-26 14:09:01 UTC (rev 8329)
+++ trunk/mapbender/tools/mod_runScheduler.php 2012-04-26 14:48:16 UTC (rev 8330)
@@ -68,7 +68,7 @@
//create new wms object
$updateWms = new wms();
- $createObjFromXml = $updateWms->createObjFromXML($wmsToUepdate[$i]['wms_upload_url']);
+ $createObjFromXml = $updateWms->createObjFromXML($wmsToUpdate[$i]['wms_upload_url']);
if(!$createObjFromXml) {
$errorMsg = "Error while creating object from GetCapabilities XML";
}
@@ -110,18 +110,18 @@
$j++;
}
}
-
- $from = "mapbender_scheduler at mapbender.org";
- $pathArray = explode("http/php/", $_SERVER["PATH_TRANSLATED"]);
- $path = $pathArray[0];
- $body = "WMS '" . $admin->getWmsTitleByWmsId($wmsToUpdate[$i]['wms_id']) . "' has been updated by the scheduler update. \n\nYou may want to check the changes as you are an owner of this WMS.";
- $error_msg = "";
- for ($m=0; $m<count($ownerMailAddresses); $m++) {
- if (!$admin->sendEmail($from, $from, $ownerMailAddresses[$m], $ownerMailAddresses[$m], "[Mapbender Update Scheduler] One of your WMS has been updated", $body, $error)) {
- if ($error){
- $error_msg .= $error . " ";
- }
- }
+ $adrRoot = $admin->getEmailByUserId("1");
+ $from = $adrRoot;
+ if($from != "") {
+ $body = "WMS '" . $admin->getWmsTitleByWmsId($wmsToUpdate[$i]['wms_id']) . "' has been updated by the scheduler update. \n\nYou may want to check the changes as you are an owner of this WMS.";
+ $error_msg = "";
+ for ($m=0; $m<count($ownerMailAddresses); $m++) {
+ if (!$admin->sendEmail($from, $from, $ownerMailAddresses[$m], $ownerMailAddresses[$m], "[Mapbender Update Scheduler] One of your WMS has been updated", $body, $error)) {
+ if ($error){
+ $error_msg .= $error . " ";
+ }
+ }
+ }
}
}
}
More information about the Mapbender_commits
mailing list