airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From machris...@apache.org
Subject [01/50] airavata-php-gateway git commit: Fix for AIRAVATA-2463
Date Thu, 03 Aug 2017 17:02:52 GMT
Repository: airavata-php-gateway
Updated Branches:
  refs/heads/master ff9a1840d -> aedf097d6


Fix for AIRAVATA-2463


Project: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/commit/c1bedd40
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/c1bedd40
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/c1bedd40

Branch: refs/heads/master
Commit: c1bedd400a935cefcffb687cb299cad14398214d
Parents: 26a207a
Author: Sneha Tilak <tilaks@Snehas-MacBook-Pro.local>
Authored: Mon Jul 3 16:51:59 2017 -0500
Committer: Sneha Tilak <tilaks@Snehas-MacBook-Pro.local>
Committed: Mon Jul 3 16:51:59 2017 -0500

----------------------------------------------------------------------
 app/controllers/AdminController.php | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/c1bedd40/app/controllers/AdminController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AdminController.php b/app/controllers/AdminController.php
index 1227901..b9adfed 100644
--- a/app/controllers/AdminController.php
+++ b/app/controllers/AdminController.php
@@ -494,6 +494,7 @@ class AdminController extends BaseController {
         if ($validator->fails()) {
             Session::put("validationMessages", [$validator->messages()] );
             return Redirect::to("admin/dashboard")
+                ->withInput()
                 ->withErrors($validator);
         }
         else{
@@ -505,11 +506,14 @@ class AdminController extends BaseController {
                 $user_profile = Keycloak::getUserProfile($username);
                 EmailUtilities::gatewayRequestMail($user_profile["firstname"], $user_profile["lastname"],
$email, $inputs["gateway-name"]);
                 Session::put("message", "Your request for Gateway " . $inputs["gateway-name"]
. " has been created.");
+                return Redirect::to("admin/dashboard");
             }
             else{
-                Session::put("errorMessages", "Error: A Gateway already exists with the same
GatewayId, Name or URL! Please make a new request.");
+                $error = "A Gateway already exists with the same GatewayId, Name or URL!
Please make a new request.";
+                return Redirect::to("admin/dashboard")
+                    ->withInput()
+                    ->withErrors($error);
             }
-            return Redirect::to("admin/dashboard");
         }
     }
 


Mime
View raw message