[mapguide-trac] #710: PATCH: selection containing Datetime values
causes exception
MapGuide Open Source
trac_mapguide at osgeo.org
Wed Sep 24 08:01:05 EDT 2008
#710: PATCH: selection containing Datetime values causes exception
--------------------------+-------------------------------------------------
Reporter: poulet1212 | Owner:
Type: defect | Status: new
Priority: high | Milestone: 2.2
Component: Fusion | Version: 2.0.2
Severity: major | Keywords: mgdatetime selection exception
External_id: |
--------------------------+-------------------------------------------------
File: www\fusion\mapguide\php\Utilities.php
Function function BuildSelectionArray, around line 865
The code here:
{{{
$value = GetPropertyValueFromFeatReader(...);
$value = htmlentities($value);
}}}
Should be changed like this (to avoid exeption of htmlentities on an
MGDateTime object)
{{{
$value = GetPropertyValueFromFeatReader(...);
if($value instanceof MgDateTime)
$value = printDateTime($value);
$value = htmlentities($value);
}}}
where printDateTime is a String representation of MGDateTime Object:
{{{
function printDateTime($mgDateTime)
{
$dayToday = $mgDateTime->GetDay();
$month = $mgDateTime->GetMonth();
$year = $mgDateTime->GetYear();
return $dayToday.".".$month.".".$year;
}
}}}
cheers, Rémy
--
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/710>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals
More information about the mapguide-trac
mailing list