[fusion-commits] r1823 - trunk/layers/MapGuide/php

svn_fusion at osgeo.org svn_fusion at osgeo.org
Wed Apr 1 10:25:28 EDT 2009


Author: madair
Date: 2009-04-01 10:25:28 -0400 (Wed, 01 Apr 2009)
New Revision: 1823

Modified:
   trunk/layers/MapGuide/php/Utilities.php
Log:
closes #234: use built-in methods where appropriate

Modified: trunk/layers/MapGuide/php/Utilities.php
===================================================================
--- trunk/layers/MapGuide/php/Utilities.php	2009-04-01 14:11:39 UTC (rev 1822)
+++ trunk/layers/MapGuide/php/Utilities.php	2009-04-01 14:25:28 UTC (rev 1823)
@@ -321,8 +321,7 @@
 {
     try
     {
-        $cnt = $resourceSrvc->GetResourceContent($dataSourceId);
-        return true;
+        return $resourceSrvc->ResourceExists($dataSourceId);
     }
     catch(MgResourceNotFoundException $rnfe)
     {
@@ -650,18 +649,7 @@
 
 function ByteReaderToString($byteReader)
 {
-    $buffer = '';
-    do
-    {
-        $data = str_pad("\0", 50000, "\0");
-        $len = $byteReader->Read($data, 50000);
-        if ($len > 0)
-        {
-            $buffer = $buffer . substr($data, 0, $len);
-        }
-    } while ($len > 0);
-
-    return $buffer;
+    return $byteReader->ToString();
 }
 
 



More information about the fusion-commits mailing list