[Mapbender-commits] r4354 - branches/kmq_dev/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Jul 14 10:58:22 EDT 2009
Author: kmq
Date: 2009-07-14 10:58:21 -0400 (Tue, 14 Jul 2009)
New Revision: 4354
Modified:
branches/kmq_dev/http/javascripts/user.php
Log:
Fail properly when an error occurs in the RPC endpoint
Modified: branches/kmq_dev/http/javascripts/user.php
===================================================================
--- branches/kmq_dev/http/javascripts/user.php 2009-07-14 14:47:53 UTC (rev 4353)
+++ branches/kmq_dev/http/javascripts/user.php 2009-07-14 14:58:21 UTC (rev 4354)
@@ -29,6 +29,7 @@
{
$ajaxResponse->setSuccess(false);
$ajaxResponse->setMessage(_mb("Could not create user"));
+ break;
}
try{
@@ -38,6 +39,7 @@
{
$ajaxResponse->setSuccess(false);
$ajaxResponse->setMessage(_mb("Could not create user"));
+ break;
}
break;
@@ -48,6 +50,7 @@
{
$ajaxResponse->setSuccess(false);
$ajaxResponse->setMessage(_mb("No such user"));
+ break;
}
try{
$user->change($userinfo);
@@ -56,6 +59,7 @@
{
$ajaxResponse->setSuccess(false);
$ajaxResponse->setMessage(_mb("Could not change user"));
+ break;
}
try{
@@ -65,6 +69,7 @@
{
$ajaxResponse->setSuccess(false);
$ajaxResponse->setMessage(_mb("Could not change user"));
+ break;
}
break;
@@ -84,6 +89,7 @@
{
$ajaxResponse->setSuccess(false);
$ajaxResponse->setMessage(_mb("Could not delete user"));
+ break;
}
break;
@@ -101,11 +107,13 @@
$result = $user->toJSON();
$ajaxResponse->setSuccess(true);
$ajaxResponse->setMessage($result);
+ break;
}
catch(Exception $E)
{
$ajaxResponse->setSuccess(false);
$ajaxResponse->setMessage(_mb("Could not load user data"));
+ break;
}
break;
@@ -117,6 +125,7 @@
{
$ajaxResponse->setSuccess(false);
$ajaxResponse->setMessage(_mb("Error fetching list of users"));
+ break;
}
foreach( $users as $user)
More information about the Mapbender_commits
mailing list