[fusion-commits] r2150 - in trunk: layers/MapGuide/php layers/MapServer/php widgets/FeatureInfo widgets/Query widgets/Theme

svn_fusion at osgeo.org svn_fusion at osgeo.org
Thu Apr 22 12:21:55 EDT 2010


Author: chrisclaydon
Date: 2010-04-22 12:21:53 -0400 (Thu, 22 Apr 2010)
New Revision: 2150

Modified:
   trunk/layers/MapGuide/php/Buffer.php
   trunk/layers/MapGuide/php/ClearSelection.php
   trunk/layers/MapGuide/php/Common.php
   trunk/layers/MapGuide/php/CreateSession.php
   trunk/layers/MapGuide/php/LayerInfo.php
   trunk/layers/MapGuide/php/LoadMap.php
   trunk/layers/MapGuide/php/Measure.php
   trunk/layers/MapGuide/php/Query.php
   trunk/layers/MapGuide/php/SaveMap.php
   trunk/layers/MapGuide/php/SetLayers.php
   trunk/layers/MapGuide/php/UserManager.php
   trunk/layers/MapGuide/php/Utilities.php
   trunk/layers/MapServer/php/Measure.php
   trunk/widgets/FeatureInfo/featureinfocontroller.php
   trunk/widgets/FeatureInfo/featureinfomain.php
   trunk/widgets/Query/querycontroller.php
   trunk/widgets/Query/querymain.php
   trunk/widgets/Theme/themecontroller.php
   trunk/widgets/Theme/thememain.php
Log:
Re #378 - MapGuide-related PHP files use MgException methods that have been renamed

Patch was approved by Paul Spencer for submission to trunk stream

Modified: trunk/layers/MapGuide/php/Buffer.php
===================================================================
--- trunk/layers/MapGuide/php/Buffer.php	2010-04-16 20:26:33 UTC (rev 2149)
+++ trunk/layers/MapGuide/php/Buffer.php	2010-04-22 16:21:53 UTC (rev 2150)
@@ -275,7 +275,7 @@
     echo "</Buffer>";
 } catch (MgException $e) {
     echo "last error";
-    echo "ERROR: " . $e->GetMessage() . "\n";
+    echo "ERROR: " . $e->GetExceptionMessage() . "\n";
     echo $e->GetDetails() . "\n";
     echo $e->GetStackTrace() . "\n";
 }

Modified: trunk/layers/MapGuide/php/ClearSelection.php
===================================================================
--- trunk/layers/MapGuide/php/ClearSelection.php	2010-04-16 20:26:33 UTC (rev 2149)
+++ trunk/layers/MapGuide/php/ClearSelection.php	2010-04-22 16:21:53 UTC (rev 2150)
@@ -48,7 +48,7 @@
 }
 catch(MgException $e)
 {
-    echo "ERROR: " . $e->GetMessage() . "\n";
+    echo "ERROR: " . $e->GetExceptionMessage() . "\n";
     echo $e->GetDetails() . "\n";
     echo $e->GetStackTrace() . "\n";
 }

Modified: trunk/layers/MapGuide/php/Common.php
===================================================================
--- trunk/layers/MapGuide/php/Common.php	2010-04-16 20:26:33 UTC (rev 2149)
+++ trunk/layers/MapGuide/php/Common.php	2010-04-22 16:21:53 UTC (rev 2150)
@@ -134,7 +134,7 @@
 }
 catch (MgException $e)
 {
-    $initializationErrorMessage = $e->GetMessage();
+    $initializationErrorMessage = $e->GetExceptionMessage();
     $initializationErrorDetail = $e->GetDetails();
     $initializationErrorStackTrace = $e->GetStackTrace();
     $initializationErrorOccurred = true;

Modified: trunk/layers/MapGuide/php/CreateSession.php
===================================================================
--- trunk/layers/MapGuide/php/CreateSession.php	2010-04-16 20:26:33 UTC (rev 2149)
+++ trunk/layers/MapGuide/php/CreateSession.php	2010-04-22 16:21:53 UTC (rev 2150)
@@ -49,7 +49,7 @@
     $result->userName = $username;
     $result->acceptLanguage = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
     echo var2json($result);
-    
+
     /* start a php session in the web tier as well, using same session id */
     session_id(str_replace('_', '-', $sessionId));
     session_start();
@@ -57,7 +57,7 @@
     loadFusionConfig();
 
 } catch (MgException $e) {
-     echo "ERROR: " . $e->GetMessage() . "n";
+     echo "ERROR: " . $e->GetExceptionMessage() . "n";
      echo $e->GetDetails() . "n";
      echo $e->GetStackTrace() . "n";
 }
\ No newline at end of file

Modified: trunk/layers/MapGuide/php/LayerInfo.php
===================================================================
--- trunk/layers/MapGuide/php/LayerInfo.php	2010-04-16 20:26:33 UTC (rev 2149)
+++ trunk/layers/MapGuide/php/LayerInfo.php	2010-04-22 16:21:53 UTC (rev 2150)
@@ -92,7 +92,7 @@
     /*****************************************************************************
      get the layer's geometric type(s)
      *****************************************************************************/
- 
+
     /*****************************************************************************
      get the layer's attributes and types
      *****************************************************************************/
@@ -104,12 +104,12 @@
      *****************************************************************************/
     // convert the feature resource for the selected layer to the shadow version
     $shadowResourceId = CreateSessionResourceId($dataSourceId, '-shadow');
-                                            
+
     $hasShadow = 'false';
     if (DataSourceExists($resourceService, $shadowResourceId)) {
          $hasShadow = 'true';
-    } 
- 
+    }
+
     //get class definition from the featureSource
     $classDefinition = GetFeatureClassDefinition($featureService, $layer, $dataSourceId);
 
@@ -140,7 +140,7 @@
     header('content-type: text/xml');
     echo "<LayerInfo>\n";
     for ( $i=0; $i < count($aLayerTypes); $i++ )
-    { 
+    {
         echo "<LayerType>".$aLayerTypes[$i]."</LayerType>\n";
     }
     echo "<!--is editable?-->";
@@ -165,7 +165,7 @@
         echo "<Precision>".$attribute['precision']."</Precision>";
         echo "<Scale>".$attribute['scale']."</Scale>";
         echo "<Nullable>".$attribute['nullable']."</Nullable>";
-    
+
         echo "</Attribute>\n";
     }
     echo "</Attributes>\n";
@@ -173,7 +173,7 @@
     exit;
 
 } catch (MgException $e) {
-    echo "ERROR: " . $e->GetMessage() . "\n";
+    echo "ERROR: " . $e->GetExceptionMessage() . "\n";
     echo $e->GetDetails() . "\n";
     echo $e->GetStackTrace() . "\n";
     exit;

Modified: trunk/layers/MapGuide/php/LoadMap.php
===================================================================
--- trunk/layers/MapGuide/php/LoadMap.php	2010-04-16 20:26:33 UTC (rev 2149)
+++ trunk/layers/MapGuide/php/LoadMap.php	2010-04-22 16:21:53 UTC (rev 2150)
@@ -208,7 +208,7 @@
 }
 catch (MgException $e)
 {
-  echo "ERROR: " . $e->GetMessage() . "\n";
+  echo "ERROR: " . $e->GetExceptionMessage() . "\n";
   echo $e->GetDetails() . "\n";
   echo $e->GetStackTrace() . "\n";
 }
@@ -259,7 +259,7 @@
     }
     catch (MgException $e)
     {
-        echo "ERROR: " . $e->GetMessage() . "\n";
+        echo "ERROR: " . $e->GetExceptionMessage() . "\n";
         echo $e->GetDetails() . "\n";
         echo $e->GetStackTrace() . "\n";
     }

Modified: trunk/layers/MapGuide/php/Measure.php
===================================================================
--- trunk/layers/MapGuide/php/Measure.php	2010-04-16 20:26:33 UTC (rev 2149)
+++ trunk/layers/MapGuide/php/Measure.php	2010-04-22 16:21:53 UTC (rev 2150)
@@ -68,7 +68,7 @@
     exit;
 } catch (MgException $e) {
     echo "last error";
-    echo "ERROR: " . $e->GetMessage() . "\n";
+    echo "ERROR: " . $e->GetExceptionMessage() . "\n";
     echo $e->GetDetails() . "\n";
     echo $e->GetStackTrace() . "\n";
 }

Modified: trunk/layers/MapGuide/php/Query.php
===================================================================
--- trunk/layers/MapGuide/php/Query.php	2010-04-16 20:26:33 UTC (rev 2149)
+++ trunk/layers/MapGuide/php/Query.php	2010-04-22 16:21:53 UTC (rev 2150)
@@ -203,7 +203,7 @@
             try {
                  $featureReader = $featureService->SelectFeatures($featureResId, $class, $queryOptions);
             } catch (MgException $e) {
-                echo "ERROR2: " . $e->GetMessage() . "\n";
+                echo "ERROR2: " . $e->GetExceptionMessage() . "\n";
                 echo $e->GetDetails() . "\n";
                 echo $e->GetStackTrace() . "\n";
             }
@@ -249,7 +249,7 @@
                         $bNeedsTransform = ($srsLayer->GetUnitScale() != 1.0);
                     }
                 } catch (MgException $e) {
-                    echo "ERROR: " . $e->GetMessage() . "\n";
+                    echo "ERROR: " . $e->GetExceptionMessage() . "\n";
                     echo $e->GetDetails() . "\n";
                     echo $e->GetStackTrace() . "\n";
                 }
@@ -267,7 +267,7 @@
         } catch (MgObjectNotFoundException $onfe) {
             //skip layers not in the map?
             echo "Object not found";
-            echo "ERROR: " . $onfe->GetMessage() . "\n";
+            echo "ERROR: " . $onfe->GetExceptionMessage() . "\n";
             echo $onfe->GetDetails() . "\n";
             echo $onfe->GetStackTrace() . "\n";
             if ($featureReader) {
@@ -276,7 +276,7 @@
         } catch (MgException $e) {
             //what should we do with general exceptions?
             echo "/*general exception:";
-            echo "ERROR: " . $e->GetMessage();
+            echo "ERROR: " . $e->GetExceptionMessage();
             echo $e->GetDetails() . "*/";
             if ($featureReader) {
               $featureReader->Close();
@@ -400,7 +400,7 @@
 }
 catch (MgException $e)
 {
-  echo "ERROR: " . $e->GetMessage() . "\n";
+  echo "ERROR: " . $e->GetExceptionMessage() . "\n";
   echo $e->GetDetails() . "\n";
   echo $e->GetStackTrace() . "\n";
 }

Modified: trunk/layers/MapGuide/php/SaveMap.php
===================================================================
--- trunk/layers/MapGuide/php/SaveMap.php	2010-04-16 20:26:33 UTC (rev 2149)
+++ trunk/layers/MapGuide/php/SaveMap.php	2010-04-22 16:21:53 UTC (rev 2150)
@@ -94,7 +94,7 @@
 }
 catch (MgException $e)
 {
-  echo "ERROR: " . $e->GetMessage() . "\n";
+  echo "ERROR: " . $e->GetExceptionMessage() . "\n";
   echo $e->GetDetails() . "\n";
   echo $e->GetStackTrace() . "\n";
   exit;

Modified: trunk/layers/MapGuide/php/SetLayers.php
===================================================================
--- trunk/layers/MapGuide/php/SetLayers.php	2010-04-16 20:26:33 UTC (rev 2149)
+++ trunk/layers/MapGuide/php/SetLayers.php	2010-04-22 16:21:53 UTC (rev 2150)
@@ -104,7 +104,7 @@
 }
 catch (MgException $e)
 {
-  echo "ERROR: '" . $e->GetMessage() . "\n";
+  echo "ERROR: '" . $e->GetExceptionMessage() . "\n";
   echo $e->GetDetails() . "\n";
   echo $e->GetStackTrace() . "',\n";
   echo "success: false, layerindex: [".$_REQUEST['layerindex']."]";

Modified: trunk/layers/MapGuide/php/UserManager.php
===================================================================
--- trunk/layers/MapGuide/php/UserManager.php	2010-04-16 20:26:33 UTC (rev 2149)
+++ trunk/layers/MapGuide/php/UserManager.php	2010-04-22 16:21:53 UTC (rev 2150)
@@ -27,7 +27,7 @@
 /*****************************************************************************
  * Purpose: manage user login and preferences
  *****************************************************************************/
- 
+
 /* used to salt passwords */
 define('SALT', "U2FsdGVkX1/TY2/7nsjOUmLc/sOW4O8z+/zmyQQjy3k=");
 
@@ -44,14 +44,14 @@
     private $site = null;
     private $currentUserId = null;
     private $aszInitialPrefs = array();
-    
+
     function __construct($admin_user, $admin_pass, $db, $default_prefs = array()) {
         global $siteConnection;
         global $user;
-        
+
         $this->admin_user = $admin_user;
         $this->admin_pass = $admin_pass;
-        
+
         $this->site = $siteConnection->GetSite();
         $this->site->Open($user);
 
@@ -77,16 +77,16 @@
             }
             if ($szPrefsSQL != ''){
                 $this->db->queryExec($szPrefsSQL);
-            }            
+            }
         }
-        
+
     }
 
 
      // = =======================================================================
      // = AddUser will be invoked with new user credentials assuming login failed
      // = in MgCommon
-     // = =======================================================================           
+     // = =======================================================================
     function AddUser ($username, $password, $email) {
         try {
             $user = new MgUserInformation(MG_ADMIN_USER, MG_ADMIN_PASSWD);
@@ -95,14 +95,14 @@
             $site = $siteConnection->GetSite();
             $username = trim($username);
             $fullname = $username;
-            $site->AddUser($username, $username, $password, $fullname);                
+            $site->AddUser($username, $username, $password, $fullname);
             //set author role
             $usersToGrant = new MgStringCollection();
             $roleToUpdate = new MgStringCollection();
             $roleToUpdate->Add( MgRole::Author );
             $usersToGrant->Add( $username ) ;
-            $site->GrantRoleMembershipsToUsers( $roleToUpdate, $usersToGrant );                
-            
+            $site->GrantRoleMembershipsToUsers( $roleToUpdate, $usersToGrant );
+
             // Create user directory in repository:
             // Create Header
             $headerContent = $this->GetUserFolderHeader($username);
@@ -134,18 +134,18 @@
                 echo "<Error>Failed to insert user</Error>";
                 return FALSE;
             }
-            
+
         } catch (MgDuplicateUserException $du_e) {
             echo '<Error>Duplicate user!</Error>';
             return FALSE;
         } catch (MgException $e) {
-            echo "<Error>" . $e->GetMessage() . "\n";
+            echo "<Error>" . $e->GetExceptionMessage() . "\n";
             echo $e->GetDetails() . "\n";
             echo $e->GetStackTrace() . "</Error>\n";
             return FALSE;
         }
     }
-    
+
     function EnableUser ($userId) {
         $success = $this->db->queryExec('UPDATE users SET disabled = 1 where userid ='.$userId.';');
         if ($success) {
@@ -155,7 +155,7 @@
             return FALSE;
         }
     }
-    
+
     function DisableUser ($userId) {
         $success = $this->db->queryExec('UPDATE users SET disabled = 1 where userid ='.$userId.';');
         if ($success) {
@@ -165,7 +165,7 @@
             return FALSE;
         }
     }
-    
+
     function DeleteUser ($userId, $userName) {
         $user = new MgUserInformation(MG_ADMIN_USER, MG_ADMIN_PASSWD);
         $siteConnection = new MgSiteConnection();
@@ -173,7 +173,7 @@
         $users = new MgStringCollection();
         $users->Add($userName);
         if (!$users->GetCount()) {
-            throw new Exception("User was not removed from MapGuide.");                  
+            throw new Exception("User was not removed from MapGuide.");
         }
         $siteConnection->GetSite()->DeleteUsers($users);
         $success = $this->db->queryExec('DELETE FROM users WHERE userid ='.$userId.';'.
@@ -186,15 +186,15 @@
             return FALSE;
         }
     }
-    
-    function AddPref ($name, $defaultValue) {        
+
+    function AddPref ($name, $defaultValue) {
         $this->db->query('INSERT INTO prefs (name, default_value) VALUES ("'.$name.'","'.$defaultValue.'");');
         return $this->db->lastInsertRowid();
     }
 
     function SetUserPref($userId, $pref, $value) {
         $prefId = $this->db->SingleQuery('select prefid from prefs where name = "'.$pref.'"');
-        
+
         // use default value from prefs table if value is not supplied.
         if ($value == '') {
             $result = $this->db->SingleQuery('SELECT default_value FROM prefs WHERE prefid='.$prefId.';');
@@ -211,7 +211,7 @@
         }else{
             $this->db->queryExec('INSERT INTO user_prefs (userid, prefid, value) VALUES ('.
                                  $userId.', '.$prefId.', "'.$value.'");');
-            return $this->db->lastInsertRowid();           
+            return $this->db->lastInsertRowid();
         }
     }
 
@@ -240,7 +240,7 @@
         }
         return $user;
     }
-    
+
     //
     //TODO secure these functions so only admin can get values
     //
@@ -253,7 +253,7 @@
         $result = $this->db->query('SELECT * FROM users;');
         return $result->FetchAll(SQLITE_ASSOC);
     }
-    
+
     function GetPrefs() {
         $result = $this->db->query('SELECT prefid, name, default_value FROM prefs;');
         return $result->FetchAll(SQLITE_ASSOC);
@@ -274,15 +274,15 @@
         </ResourceFolderHeader>',$user);
         return $szContent;
     }
-    
+
     /* remove all managed users */
     function Clean() {
         $aUsers = $this->GetUsers();
         foreach ($aUsers as $user) {
-            $this->DeleteUser($user['userid'], $user['username']); 
+            $this->DeleteUser($user['userid'], $user['username']);
         }
     }
-    
+
     /* enumerate groups - this requires admin privileges */
     function GetGroups($username=NULL) {
         $aGroups = array();
@@ -306,15 +306,15 @@
                 $description = $descElt->item(0)->nodeValue;
                 array_push($aGroups, array('name'        => $name,
                                            'description' => $description));
-            }            
+            }
         } catch (MgException $e) {
-            echo "ERROR: " . $e->GetMessage() . "\n";
+            echo "ERROR: " . $e->GetExceptionMessage() . "\n";
             echo $e->GetDetails() . "\n";
             echo $e->GetStackTrace() . "\n";
         }
         return $aGroups;
     }
-    
+
     function AddGroup($name, $description) {
         try {
             $user = new MgUserInformation(MG_ADMIN_USER, MG_ADMIN_PASSWD);
@@ -327,7 +327,7 @@
         }
         return TRUE;
     }
-        
+
     function RemoveGroup($group) {
         try {
             $user = new MgUserInformation(MG_ADMIN_USER, MG_ADMIN_PASSWD);
@@ -338,15 +338,15 @@
             $groups->Add( $group ) ;
             $site->DeleteGroups($groups);
         } catch (MgException $e) {
-            echo "ERROR: " . $e->GetMessage() . "\n";
+            echo "ERROR: " . $e->GetExceptionMessage() . "\n";
             echo $e->GetDetails() . "\n";
             echo $e->GetStackTrace() . "\n";
             return FALSE;
         }
         return TRUE;
-        
+
     }
-    
+
     function AddUserToGroup($group, $username) {
         try {
             $user = new MgUserInformation(MG_ADMIN_USER, MG_ADMIN_PASSWD);
@@ -359,14 +359,14 @@
             $groupToUpdate->Add( $group );
             $site->GrantGroupMembershipsToUsers($groupToUpdate, $userToGrant);
         } catch (MgException $e) {
-            echo "ERROR: " . $e->GetMessage() . "\n";
+            echo "ERROR: " . $e->GetExceptionMessage() . "\n";
             echo $e->GetDetails() . "\n";
             echo $e->GetStackTrace() . "\n";
             return FALSE;
         }
         return TRUE;
     }
-    
+
     function RemoveUserFromGroup($group, $username) {
         try {
             $user = new MgUserInformation(MG_ADMIN_USER, MG_ADMIN_PASSWD);
@@ -383,8 +383,8 @@
         }
         return TRUE;
     }
-    
-    
+
+
     function GetUser($id) {
         $user = FALSE;
         if (!empty($id)) {
@@ -400,7 +400,7 @@
               }
               $groups = array();
               $aGroups = $this->GetGroups($a['username']);
-              for ( $i=0; $i < count($aGroups); $i++) { 
+              for ( $i=0; $i < count($aGroups); $i++) {
                   array_push($groups, $aGroups[$i]['name']);
               }
               $user = new FusionUser($a['userid'], $a['username'], $a['email'], $prefs, $groups );
@@ -408,18 +408,18 @@
         }
         return $user;
     }
-    
+
     function GetUserByName($username) {
         $user = FALSE;
         $result = $this->db->query('SELECT * FROM users where username = "'.$username.'";');
         if ($result) {
             $a = $result->fetch();
             $user = $this->GetUser($a['userid']);
-            
+
         }
         return $user;
     }
-    
+
     function GetUserByEmail($email) {
         $user = FALSE;
         $result = $this->db->query('SELECT * FROM users where email = "'.$email.'";');
@@ -429,7 +429,7 @@
         }
         return $user;
     }
-    
+
     function GetUserByKey($key) {
         $user = FALSE;
         $result = $this->db->query('SELECT * FROM users where resetkey = "'.$key.'";');
@@ -439,29 +439,29 @@
         }
         return $user;
     }
-    
+
     function ResetPassword($id) {
         $uuid = uuid();
         $this->db->query('UPDATE users SET resetkey = "'.$uuid.'" where userid = '.$id);
         return $uuid;
     }
-    
+
     function SetPassword($id, $password) {
         $encryptedPassword = crypt($password, SALT);
         $success = $this->db->queryExec('UPDATE users SET password = "'.$encryptedPassword.'", resetkey = "" where userid = '.$id);
-        
+
         $user = $this->GetUser($id);
         if ($success) {
             $adminUser = new MgUserInformation(MG_ADMIN_USER, MG_ADMIN_PASSWD);
             $siteConnection = new MgSiteConnection();
             $siteConnection->Open($adminUser);
             $site = $siteConnection->GetSite();
-        
+
             $site->UpdateUser( $user->userName(), "", $user->userName(), $password, "" );
         } else {
             echo "/* failed to update user password */";
         }
-        
+
         return $success;
     }
 }
@@ -471,7 +471,7 @@
     private $id = -1;
     private $email = '';
     private $preferences = array();
-    
+
     function __construct($id, $username, $email, $preferences, $groups) {
         $this->id = $id;
         $this->username = $username;
@@ -479,23 +479,23 @@
         $this->preferences = $preferences;
         $this->groups = $groups;
     }
-    
+
     function userName() {
         return $this->username;
     }
-    
+
     function id() {
         return $this->id;
     }
-    
+
     function email() {
         return $this->email;
     }
-    
+
     function preferences() {
         return $this->preferences;
     }
-    
+
     function toXML() {
         $result = '';
         $result .= "<User>\n";
@@ -531,11 +531,11 @@
     $manager->AddUserPref($userId, $prefId, 'MyMap');
     $manager->AddUserPref($userId, $prefId2, 'Red');
     $manager->SetUserPref($userId, $prefId, 'MyMapModified');
-    
+
     echo $manager->Login('bob', 'foo');
 
     $manager->DeleteUser($userId, 'bob');
-    
+
 }
 
 function uuid()

Modified: trunk/layers/MapGuide/php/Utilities.php
===================================================================
--- trunk/layers/MapGuide/php/Utilities.php	2010-04-16 20:26:33 UTC (rev 2149)
+++ trunk/layers/MapGuide/php/Utilities.php	2010-04-22 16:21:53 UTC (rev 2150)
@@ -117,7 +117,7 @@
     }
      catch (MgException $e)
     {
-        echo "ERROR: " . $e->GetMessage() . "n";
+        echo "ERROR: " . $e->GetExceptionMessage() . "n";
         echo $e->GetDetails() . "n";
         echo $e->GetStackTrace() . "n";
     }
@@ -177,7 +177,7 @@
      catch (MgException $e)
     {
         echo "CopyLayerToSession threw exception\n";
-        echo "ERROR: " . $e->GetMessage() . "n";
+        echo "ERROR: " . $e->GetExceptionMessage() . "n";
         echo $e->GetDetails() . "n";
         echo $e->GetStackTrace() . "n";
     }
@@ -370,7 +370,7 @@
         $newResourceID->Validate();
     }
      catch (MgException $e) {
-        echo "ERROR: " . $e->GetMessage() . "n";
+        echo "ERROR: " . $e->GetExceptionMessage() . "n";
         echo $e->GetDetails() . "n";
         echo $e->GetStackTrace() . "n";
     }
@@ -834,7 +834,7 @@
                             $geom = $ageom;
                         } catch (MgException $ee) {
                           echo "/*transform exception:";
-                          echo "ERROR: " . $ee->GetMessage() . "\n";
+                          echo "ERROR: " . $ee->GetExceptionMessage() . "\n";
                           echo $ee->GetDetails() . "\n*/";
                         }
                     }

Modified: trunk/layers/MapServer/php/Measure.php
===================================================================
--- trunk/layers/MapServer/php/Measure.php	2010-04-16 20:26:33 UTC (rev 2149)
+++ trunk/layers/MapServer/php/Measure.php	2010-04-22 16:21:53 UTC (rev 2150)
@@ -12,7 +12,7 @@
  *****************************************************************************
  * This code shall not be copied or used without the expressed written consent
  * of DM Solutions Group Inc.
- * 
+ *
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
@@ -20,7 +20,7 @@
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
- * 
+ *
  * The above copyright notice and this permission notice shall be included
  * in all copies or substantial portions of the Software.
  *
@@ -32,11 +32,11 @@
 include('../../../common/php/Utilities.php');
 
 try {
-    if (!isset($_REQUEST['session']) || 
+    if (!isset($_REQUEST['session']) ||
         !isset($_REQUEST['mapname']) ||
-        !isset($_REQUEST['x1']) || 
-        !isset($_REQUEST['y1']) || 
-        !isset($_REQUEST['x2']) || 
+        !isset($_REQUEST['x1']) ||
+        !isset($_REQUEST['y1']) ||
+        !isset($_REQUEST['x2']) ||
         !isset($_REQUEST['y2'])) {
         echo "<Error>Arguments missing </Error>";
         exit;
@@ -57,14 +57,14 @@
         /*convert to meter*/
         $distance = GetMetersPerUnit($oMap->units)*$distance;
     }
-      
+
     header('Content-type: application/json');
     header('X-JSON: true');
     echo "{distance:$distance}";
     exit;
 } catch (MgException $e) {
     echo "last error";
-    echo "ERROR: " . $e->GetMessage() . "\n";
+    echo "ERROR: " . $e->GetExceptionMessage() . "\n";
     echo $e->GetDetails() . "\n";
     echo $e->GetStackTrace() . "\n";
 }
@@ -75,7 +75,7 @@
 /*         Calculate distance in meters fro 2 lat/long coordinates.     */
 /*      Comes from http://www.movable-type.co.uk/scripts/latlong.html   */
 /************************************************************************/
-function distHaversine($lon1, $lat1, $lon2, $lat2) 
+function distHaversine($lon1, $lat1, $lon2, $lat2)
 {
   $R = 6371000; // earth's mean radius in m
   $dLat = ($lat2-$lat1)*(M_PI/180);//toRad();
@@ -84,7 +84,7 @@
   $lat2 = $lat2*(M_PI/180);
 
   $a = sin($dLat/2) * sin($dLat/2) +
-          cos($lat1) * cos($lat2) * 
+          cos($lat1) * cos($lat2) *
           sin($dLon/2) * sin($dLon/2);
   $c = 2 * atan2(sqrt($a), sqrt(1-$a));
   $d = $R * $c;
@@ -105,7 +105,7 @@
       return 1000;
   else if ($unit == MS_DD)
     return (111118.7516);
-    
+
     else if ($unit == MS_PIXELS)
       return 1;
 }

Modified: trunk/widgets/FeatureInfo/featureinfocontroller.php
===================================================================
--- trunk/widgets/FeatureInfo/featureinfocontroller.php	2010-04-16 20:26:33 UTC (rev 2149)
+++ trunk/widgets/FeatureInfo/featureinfocontroller.php	2010-04-22 16:21:53 UTC (rev 2150)
@@ -100,7 +100,7 @@
         $response = json_encode($properties);
 
     } catch (MgException $e) {
-        echo "ERROR: " . $e->GetMessage() . "\n";
+        echo "ERROR: " . $e->GetExceptionMessage() . "\n";
         echo $e->GetDetails() . "\n";
         echo $e->GetStackTrace() . "\n";
     }

Modified: trunk/widgets/FeatureInfo/featureinfomain.php
===================================================================
--- trunk/widgets/FeatureInfo/featureinfomain.php	2010-04-16 20:26:33 UTC (rev 2149)
+++ trunk/widgets/FeatureInfo/featureinfomain.php	2010-04-22 16:21:53 UTC (rev 2150)
@@ -38,7 +38,7 @@
 
     $errorMsg = null;
     $errorDetail = null;
-    
+
     $titleLocal = GetLocalizedString('FEATUREINFOTITLE', $locale );
     $subtitleLocal = GetLocalizedString('FEATUREINFOSUBTITLE', $locale );
     $layerLocal = GetLocalizedString('FEATUREINFOLAYER', $locale );
@@ -65,7 +65,7 @@
     }
     catch (MgException $mge)
     {
-        $errorMsg = $mge->GetMessage();
+        $errorMsg = $mge->GetExceptionMessage();
         $errorDetail = $mge->GetDetails();
     }
     catch (Exception $e)

Modified: trunk/widgets/Query/querycontroller.php
===================================================================
--- trunk/widgets/Query/querycontroller.php	2010-04-16 20:26:33 UTC (rev 2149)
+++ trunk/widgets/Query/querycontroller.php	2010-04-22 16:21:53 UTC (rev 2150)
@@ -72,7 +72,7 @@
     }
     catch (MgException $mge)
     {
-        $errorMsg = $mge->GetMessage();
+        $errorMsg = $mge->GetExceptionMessage();
         $errorDetail = $mge->GetDetails();
     }
     catch (Exception $e)

Modified: trunk/widgets/Query/querymain.php
===================================================================
--- trunk/widgets/Query/querymain.php	2010-04-16 20:26:33 UTC (rev 2149)
+++ trunk/widgets/Query/querymain.php	2010-04-22 16:21:53 UTC (rev 2150)
@@ -23,11 +23,11 @@
     {
         DisplayInitializationErrorHTML();
         exit;
-    }    
+    }
     require_once $fusionMGpath . 'Utilities.php';
     require_once $fusionMGpath . '/JSON.php';
     require_once 'classes/query.php';
-    
+
     SetLocalizedFilesPath(GetLocalizationPath());
     if(isset($_REQUEST['locale'])) {
         $locale = $_REQUEST['locale'];
@@ -39,7 +39,7 @@
 
     $errorMsg = null;
     $errorDetail = null;
-    
+
     $titleLocal = GetLocalizedString('QUERYTITLE', $locale );
     $selectLayerLocal = GetLocalizedString('QUERYSELECTLAYER', $locale );
     $layerLocal = GetLocalizedString('QUERYLAYER', $locale );
@@ -72,7 +72,7 @@
     }
     catch (MgException $mge)
     {
-        $errorMsg = $mge->GetMessage();
+        $errorMsg = $mge->GetExceptionMessage();
         $errorDetail = $mge->GetDetails();
     }
     catch (Exception $e)
@@ -169,7 +169,7 @@
             {
                 ToggleSpatialFilter(document.getElementById("spatialFilter").checked);
             }
-            
+
             if(document.getElementById("spatialFilter").checked == false)
                 ClearDigitization();
         }

Modified: trunk/widgets/Theme/themecontroller.php
===================================================================
--- trunk/widgets/Theme/themecontroller.php	2010-04-16 20:26:33 UTC (rev 2149)
+++ trunk/widgets/Theme/themecontroller.php	2010-04-22 16:21:53 UTC (rev 2150)
@@ -63,7 +63,7 @@
       }
       catch (MgException $mge)
       {
-          $errorMsg = $mge->GetMessage();
+          $errorMsg = $mge->GetExceptionMessage();
           $errorDetail = $mge->GetDetails();
       }
       catch (Exception $e)

Modified: trunk/widgets/Theme/thememain.php
===================================================================
--- trunk/widgets/Theme/thememain.php	2010-04-16 20:26:33 UTC (rev 2149)
+++ trunk/widgets/Theme/thememain.php	2010-04-22 16:21:53 UTC (rev 2150)
@@ -26,7 +26,7 @@
     require_once $fusionMGpath . 'Utilities.php';
     require_once $fusionMGpath . 'JSON.php';
     require_once 'classes/theme.php';
-    
+
     SetLocalizedFilesPath(GetLocalizationPath());
     if(isset($_REQUEST['locale'])) {
         $locale = $_REQUEST['locale'];
@@ -38,7 +38,7 @@
 
     $errorMsg = null;
     $errorDetail = null;
-    
+
     $titleLocal = GetLocalizedString('THEMETITLE', $locale );
     $selectLayerLocal = GetLocalizedString('THEMESELECTLAYER', $locale );
     $layerLocal = GetLocalizedString('THEMELAYER', $locale );
@@ -74,7 +74,7 @@
     }
     catch (MgException $mge)
     {
-        $errorMsg = $mge->GetMessage();
+        $errorMsg = $mge->GetExceptionMessage();
         $errorDetail = $mge->GetDetails();
     }
     catch (Exception $e)
@@ -112,7 +112,7 @@
         var session = '<?= $args['SESSION'] ?>';
         var mapName = '<?= $args['MAPNAME'] ?>';
 
-        var distNameArray = ['<?= $individualLocal ?>', '<?= $equalLocal ?>', '<?= $standardDeviationLocal ?>', '<?= $quantileLocal  ?>', '<?= $jenksLocal ?>']; 
+        var distNameArray = ['<?= $individualLocal ?>', '<?= $equalLocal ?>', '<?= $standardDeviationLocal ?>', '<?= $quantileLocal  ?>', '<?= $jenksLocal ?>'];
         var distValueArray = '<?php $json = new Services_JSON(); echo $json->encode($theme->distValueArray) ?>'.parseJSON();
 
         var themeReqHandler = null;



More information about the fusion-commits mailing list