[fusion-commits] r1613 - branches/fusion-1.1/MapGuide/php
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Mon Oct 27 13:36:44 EDT 2008
Author: madair
Date: 2008-10-27 13:36:44 -0400 (Mon, 27 Oct 2008)
New Revision: 1613
Modified:
branches/fusion-1.1/MapGuide/php/Utilities.php
Log:
re #92: convert MgDateTime object to a string property value
Modified: branches/fusion-1.1/MapGuide/php/Utilities.php
===================================================================
--- branches/fusion-1.1/MapGuide/php/Utilities.php 2008-10-27 15:00:33 UTC (rev 1612)
+++ branches/fusion-1.1/MapGuide/php/Utilities.php 2008-10-27 17:36:44 UTC (rev 1613)
@@ -668,6 +668,7 @@
function GetPropertyValueFromFeatReader($featureReader, $propertyType, $propertyName)
{
+ //echo "/* propertyType:".$propertyType." propertyName:".$propertyName." */";
$val = "";
if ($propertyType == null) {
$propertyType = $featureReader->GetPropertyType($propertyName);
@@ -688,8 +689,10 @@
$val = $featureReader->GetByte($propertyName);
break;
case MgPropertyType::DateTime :
- $val = $featureReader->GetDateTime($propertyName);
- //$valStr = printDateTime($val);
+ $dateTime = $featureReader->GetDateTime($propertyName);
+ if ($dateTime != NULL) {
+ $val = printDateTime($dateTime);
+ }
break;
case MgPropertyType::Single :
$val = $featureReader->GetSingle($propertyName);
@@ -885,6 +888,14 @@
return sprintf( $epsg42003, $lon, $lat);
}
+function printDateTime($mgDateTime)
+{
+ $dayToday = $mgDateTime->GetDay();
+ $month = $mgDateTime->GetMonth();
+ $year = $mgDateTime->GetYear();
+ return $dayToday.".".$month.".".$year;
+}
+
function GetSiteVersion() {
global $user;
$serverAdmin = new MgServerAdmin();
More information about the fusion-commits
mailing list