[fusion-commits] r2118 - in sandbox/adsk/2.2gp: layers/MapGuide/php
layers/MapServer/php widgets/FeatureInfo widgets/Query widgets/Theme
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Fri Mar 26 17:17:50 EDT 2010
Author: chrisclaydon
Date: 2010-03-26 17:17:49 -0400 (Fri, 26 Mar 2010)
New Revision: 2118
Modified:
sandbox/adsk/2.2gp/layers/MapGuide/php/Buffer.php
sandbox/adsk/2.2gp/layers/MapGuide/php/ClearSelection.php
sandbox/adsk/2.2gp/layers/MapGuide/php/Common.php
sandbox/adsk/2.2gp/layers/MapGuide/php/CreateSession.php
sandbox/adsk/2.2gp/layers/MapGuide/php/LayerInfo.php
sandbox/adsk/2.2gp/layers/MapGuide/php/LoadMap.php
sandbox/adsk/2.2gp/layers/MapGuide/php/Measure.php
sandbox/adsk/2.2gp/layers/MapGuide/php/Query.php
sandbox/adsk/2.2gp/layers/MapGuide/php/SaveMap.php
sandbox/adsk/2.2gp/layers/MapGuide/php/SetLayers.php
sandbox/adsk/2.2gp/layers/MapGuide/php/UserManager.php
sandbox/adsk/2.2gp/layers/MapGuide/php/Utilities.php
sandbox/adsk/2.2gp/layers/MapServer/php/Measure.php
sandbox/adsk/2.2gp/widgets/FeatureInfo/featureinfocontroller.php
sandbox/adsk/2.2gp/widgets/FeatureInfo/featureinfomain.php
sandbox/adsk/2.2gp/widgets/Query/querycontroller.php
sandbox/adsk/2.2gp/widgets/Query/querymain.php
sandbox/adsk/2.2gp/widgets/Theme/themecontroller.php
sandbox/adsk/2.2gp/widgets/Theme/thememain.php
Log:
Re #378 - Apply patch on behalf of Bruce Dechant
Modified: sandbox/adsk/2.2gp/layers/MapGuide/php/Buffer.php
===================================================================
--- sandbox/adsk/2.2gp/layers/MapGuide/php/Buffer.php 2010-03-25 17:19:28 UTC (rev 2117)
+++ sandbox/adsk/2.2gp/layers/MapGuide/php/Buffer.php 2010-03-26 21:17:49 UTC (rev 2118)
@@ -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: sandbox/adsk/2.2gp/layers/MapGuide/php/ClearSelection.php
===================================================================
--- sandbox/adsk/2.2gp/layers/MapGuide/php/ClearSelection.php 2010-03-25 17:19:28 UTC (rev 2117)
+++ sandbox/adsk/2.2gp/layers/MapGuide/php/ClearSelection.php 2010-03-26 21:17:49 UTC (rev 2118)
@@ -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: sandbox/adsk/2.2gp/layers/MapGuide/php/Common.php
===================================================================
--- sandbox/adsk/2.2gp/layers/MapGuide/php/Common.php 2010-03-25 17:19:28 UTC (rev 2117)
+++ sandbox/adsk/2.2gp/layers/MapGuide/php/Common.php 2010-03-26 21:17:49 UTC (rev 2118)
@@ -134,7 +134,7 @@
}
catch (MgException $e)
{
- $initializationErrorMessage = $e->GetMessage();
+ $initializationErrorMessage = $e->GetExceptionMessage();
$initializationErrorDetail = $e->GetDetails();
$initializationErrorStackTrace = $e->GetStackTrace();
$initializationErrorOccurred = true;
Modified: sandbox/adsk/2.2gp/layers/MapGuide/php/CreateSession.php
===================================================================
--- sandbox/adsk/2.2gp/layers/MapGuide/php/CreateSession.php 2010-03-25 17:19:28 UTC (rev 2117)
+++ sandbox/adsk/2.2gp/layers/MapGuide/php/CreateSession.php 2010-03-26 21:17:49 UTC (rev 2118)
@@ -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: sandbox/adsk/2.2gp/layers/MapGuide/php/LayerInfo.php
===================================================================
--- sandbox/adsk/2.2gp/layers/MapGuide/php/LayerInfo.php 2010-03-25 17:19:28 UTC (rev 2117)
+++ sandbox/adsk/2.2gp/layers/MapGuide/php/LayerInfo.php 2010-03-26 21:17:49 UTC (rev 2118)
@@ -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: sandbox/adsk/2.2gp/layers/MapGuide/php/LoadMap.php
===================================================================
--- sandbox/adsk/2.2gp/layers/MapGuide/php/LoadMap.php 2010-03-25 17:19:28 UTC (rev 2117)
+++ sandbox/adsk/2.2gp/layers/MapGuide/php/LoadMap.php 2010-03-26 21:17:49 UTC (rev 2118)
@@ -201,7 +201,7 @@
}
catch (MgException $e)
{
- echo "ERROR: " . $e->GetMessage() . "\n";
+ echo "ERROR: " . $e->GetExceptionMessage() . "\n";
echo $e->GetDetails() . "\n";
echo $e->GetStackTrace() . "\n";
}
@@ -252,7 +252,7 @@
}
catch (MgException $e)
{
- echo "ERROR: " . $e->GetMessage() . "\n";
+ echo "ERROR: " . $e->GetExceptionMessage() . "\n";
echo $e->GetDetails() . "\n";
echo $e->GetStackTrace() . "\n";
}
Modified: sandbox/adsk/2.2gp/layers/MapGuide/php/Measure.php
===================================================================
--- sandbox/adsk/2.2gp/layers/MapGuide/php/Measure.php 2010-03-25 17:19:28 UTC (rev 2117)
+++ sandbox/adsk/2.2gp/layers/MapGuide/php/Measure.php 2010-03-26 21:17:49 UTC (rev 2118)
@@ -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: sandbox/adsk/2.2gp/layers/MapGuide/php/Query.php
===================================================================
--- sandbox/adsk/2.2gp/layers/MapGuide/php/Query.php 2010-03-25 17:19:28 UTC (rev 2117)
+++ sandbox/adsk/2.2gp/layers/MapGuide/php/Query.php 2010-03-26 21:17:49 UTC (rev 2118)
@@ -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: sandbox/adsk/2.2gp/layers/MapGuide/php/SaveMap.php
===================================================================
--- sandbox/adsk/2.2gp/layers/MapGuide/php/SaveMap.php 2010-03-25 17:19:28 UTC (rev 2117)
+++ sandbox/adsk/2.2gp/layers/MapGuide/php/SaveMap.php 2010-03-26 21:17:49 UTC (rev 2118)
@@ -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: sandbox/adsk/2.2gp/layers/MapGuide/php/SetLayers.php
===================================================================
--- sandbox/adsk/2.2gp/layers/MapGuide/php/SetLayers.php 2010-03-25 17:19:28 UTC (rev 2117)
+++ sandbox/adsk/2.2gp/layers/MapGuide/php/SetLayers.php 2010-03-26 21:17:49 UTC (rev 2118)
@@ -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: sandbox/adsk/2.2gp/layers/MapGuide/php/UserManager.php
===================================================================
--- sandbox/adsk/2.2gp/layers/MapGuide/php/UserManager.php 2010-03-25 17:19:28 UTC (rev 2117)
+++ sandbox/adsk/2.2gp/layers/MapGuide/php/UserManager.php 2010-03-26 21:17:49 UTC (rev 2118)
@@ -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: sandbox/adsk/2.2gp/layers/MapGuide/php/Utilities.php
===================================================================
--- sandbox/adsk/2.2gp/layers/MapGuide/php/Utilities.php 2010-03-25 17:19:28 UTC (rev 2117)
+++ sandbox/adsk/2.2gp/layers/MapGuide/php/Utilities.php 2010-03-26 21:17:49 UTC (rev 2118)
@@ -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: sandbox/adsk/2.2gp/layers/MapServer/php/Measure.php
===================================================================
--- sandbox/adsk/2.2gp/layers/MapServer/php/Measure.php 2010-03-25 17:19:28 UTC (rev 2117)
+++ sandbox/adsk/2.2gp/layers/MapServer/php/Measure.php 2010-03-26 21:17:49 UTC (rev 2118)
@@ -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: sandbox/adsk/2.2gp/widgets/FeatureInfo/featureinfocontroller.php
===================================================================
--- sandbox/adsk/2.2gp/widgets/FeatureInfo/featureinfocontroller.php 2010-03-25 17:19:28 UTC (rev 2117)
+++ sandbox/adsk/2.2gp/widgets/FeatureInfo/featureinfocontroller.php 2010-03-26 21:17:49 UTC (rev 2118)
@@ -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: sandbox/adsk/2.2gp/widgets/FeatureInfo/featureinfomain.php
===================================================================
--- sandbox/adsk/2.2gp/widgets/FeatureInfo/featureinfomain.php 2010-03-25 17:19:28 UTC (rev 2117)
+++ sandbox/adsk/2.2gp/widgets/FeatureInfo/featureinfomain.php 2010-03-26 21:17:49 UTC (rev 2118)
@@ -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: sandbox/adsk/2.2gp/widgets/Query/querycontroller.php
===================================================================
--- sandbox/adsk/2.2gp/widgets/Query/querycontroller.php 2010-03-25 17:19:28 UTC (rev 2117)
+++ sandbox/adsk/2.2gp/widgets/Query/querycontroller.php 2010-03-26 21:17:49 UTC (rev 2118)
@@ -72,7 +72,7 @@
}
catch (MgException $mge)
{
- $errorMsg = $mge->GetMessage();
+ $errorMsg = $mge->GetExceptionMessage();
$errorDetail = $mge->GetDetails();
}
catch (Exception $e)
Modified: sandbox/adsk/2.2gp/widgets/Query/querymain.php
===================================================================
--- sandbox/adsk/2.2gp/widgets/Query/querymain.php 2010-03-25 17:19:28 UTC (rev 2117)
+++ sandbox/adsk/2.2gp/widgets/Query/querymain.php 2010-03-26 21:17:49 UTC (rev 2118)
@@ -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: sandbox/adsk/2.2gp/widgets/Theme/themecontroller.php
===================================================================
--- sandbox/adsk/2.2gp/widgets/Theme/themecontroller.php 2010-03-25 17:19:28 UTC (rev 2117)
+++ sandbox/adsk/2.2gp/widgets/Theme/themecontroller.php 2010-03-26 21:17:49 UTC (rev 2118)
@@ -63,7 +63,7 @@
}
catch (MgException $mge)
{
- $errorMsg = $mge->GetMessage();
+ $errorMsg = $mge->GetExceptionMessage();
$errorDetail = $mge->GetDetails();
}
catch (Exception $e)
Modified: sandbox/adsk/2.2gp/widgets/Theme/thememain.php
===================================================================
--- sandbox/adsk/2.2gp/widgets/Theme/thememain.php 2010-03-25 17:19:28 UTC (rev 2117)
+++ sandbox/adsk/2.2gp/widgets/Theme/thememain.php 2010-03-26 21:17:49 UTC (rev 2118)
@@ -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