Browse Source

* Make sure that the value of ActionVar is passed as actionname to the OnGetAction event

git-svn-id: trunk@16341 -
joost 14 years ago
parent
commit
af40e489dc
1 changed files with 7 additions and 6 deletions
  1. 7 6
      packages/fcl-web/src/base/fphttp.pp

+ 7 - 6
packages/fcl-web/src/base/fphttp.pp

@@ -397,15 +397,16 @@ end;
 function TCustomWebActions.GetActionName(ARequest: TRequest): String;
 
 begin
+  If (FActionVar<>'') then
+    Result:=ARequest.QueryFields.Values[FActionVar]
+  else
+    Result := '';
   If Assigned(FOnGetAction) then
     FOnGetAction(Self,ARequest,Result);
+  // GetNextPathInfo is only used after OnGetAction, so that the call to 
+  // GetNextPathInfo can be avoided in the event.
   If (Result='') then
-    begin
-    If (FActionVar<>'') then
-      Result:=ARequest.QueryFields.Values[FActionVar];
-    If (Result='') then
-      Result:=ARequest.GetNextPathInfo;
-    end;
+    Result:=ARequest.GetNextPathInfo;
 end;
 
 constructor TCustomWebActions.Create(AItemClass: TCollectionItemClass);