浏览代码

* Reverted accidentally committed files in r15616

git-svn-id: trunk@15617 -
joost 15 年之前
父节点
当前提交
734dc9e9df

+ 0 - 15
packages/fcl-web/src/base/custcgi.pp

@@ -156,22 +156,7 @@ end;
 
 
 Procedure TCustomCGIApplication.ShowException(E: Exception);
-var
-  LogStr: string;
-  FrameNumber: Integer;
-  Frames: PPointer;
-  FrameCount: integer;
-
 begin
-  logstr := 'Exception occured: ' + e.Message;
-
-  LogStr := LogStr + LineEnding + BackTraceStrFunc(ExceptAddr);
-  FrameCount:=ExceptFrameCount;
-  Frames:=ExceptFrames;
-  for FrameNumber := 0 to FrameCount-1 do
-    LogStr := LogStr + LineEnding + BackTraceStrFunc(Frames[FrameNumber]);
-  Log(etError,LogStr);
-
   if assigned(FResponse) then
     ShowRequestException(FResponse,E)
   else

+ 1 - 4
packages/fcl-web/src/base/fphtml.pp

@@ -1205,10 +1205,7 @@ end;
 
 function TWebController.GetCurrentJavaScriptStack: TJavaScriptStack;
 begin
-  if FScriptStack.Count=0 then
-    result := nil
-  else
-    result := TJavaScriptStack(FScriptStack.Items[FScriptStack.Count-1]);
+  result := TJavaScriptStack(FScriptStack.Items[FScriptStack.Count-1]);
 end;
 
 procedure TWebController.InitializeAjaxRequest;

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

@@ -397,14 +397,15 @@ 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);
   If (Result='') then
-    Result:=ARequest.GetNextPathInfo;
+    begin
+    If (FActionVar<>'') then
+      Result:=ARequest.QueryFields.Values[FActionVar];
+    If (Result='') then
+      Result:=ARequest.GetNextPathInfo;
+    end;
 end;
 
 constructor TCustomWebActions.Create(AItemClass: TCollectionItemClass);

+ 5 - 6
packages/fcl-web/src/base/fpweb.pp

@@ -116,7 +116,7 @@ Type
   Protected
     Procedure DoBeforeRequest(ARequest : TRequest); virtual;
     Procedure DoAfterResponse(AResponse : TResponse); virtual;
-    Procedure GetParam(Const ParamName : String; Out Value : String); // Called by template
+    Procedure GetParam(Const ParamName : String; Out Value : String); virtual; // Called by template
     Procedure GetTemplateContent(ARequest : TRequest; AResponse : TResponse); virtual;
     function GetContent: String;virtual;
   Public
@@ -296,7 +296,7 @@ Type
     FRequest : TRequest;
   Public
     Constructor Create(AOwner :TCustomFPWebModule);
-    Function GetParam(const Key: String; out AValue: String) : boolean; override;
+    Procedure GetParam(Sender : TObject; Const ParamName : String; Out AValue : String);override;
     Property Owner : TCustomFPWebModule Read FOwner;
     Property Request : TRequest Read FRequest Write FRequest;
   end;
@@ -307,11 +307,10 @@ begin
   FOwner:=AOwner;
 end;
 
-function TFPWebTemplate.GetParam(const Key: String; out AValue: String) : boolean;
+procedure TFPWebTemplate.GetParam(Sender: TObject; const ParamName: String;
+  out AValue: String);
 begin
-  result := Inherited GetParam(Key, AValue);
-  if not result then
-    FOwner.GetParam(Key, AValue);
+  FOwner.GetParam(ParamName, AValue);
 end;
 
 { TFPWebModule }

+ 1 - 1
packages/fcl-web/src/base/httpdefs.pp

@@ -1141,7 +1141,7 @@ begin
     if FHandleGetOnPost then
       InitGetVars;
     end
-  else if (CompareText(R,'GET')=0) or (CompareText(R,'HEAD')=0) then
+  else if CompareText(R,'GET')=0 then
     InitGetVars
   else
     Raise Exception.CreateFmt(SErrInvalidRequestMethod,[R]);

+ 1 - 1
packages/fcl-web/src/base/webpage.pp

@@ -63,6 +63,7 @@ type
     procedure DoHandleAjaxRequest(ARequest: TRequest; AnAjaxResponse: TAjaxResponse; var Handled: boolean); virtual;
     procedure DoBeforeRequest(ARequest: TRequest); virtual;
     procedure DoBeforeShowPage(ARequest: TRequest); virtual;
+    function IsAjaxCall: boolean; virtual;
     property WebModule: TFPWebModule read FWebModule;
     procedure DoCleanupAfterRequest(const AContentProducer: THTMLContentProducer);
     procedure SetRequest(ARequest: TRequest); virtual;
@@ -77,7 +78,6 @@ type
     function ExchangeContentProducers(Child1, Child2: THTMLContentProducer) : boolean;
     function MoveContentProducer(MoveElement, MoveBeforeElement: THTMLContentProducer) : boolean;
     procedure ForeachContentProducer(AForeachChildsProc: TForeachContentProducerProc; Recursive: boolean);
-    function IsAjaxCall: boolean; virtual;
 
     procedure HandlePage(ARequest: TRequest; AResponse: TResponse; AWriter: THTMLwriter; AWebModule: TFPWebModule = nil); virtual;
     procedure DoBeforeGenerateXML; virtual;

+ 0 - 1
packages/fcl-web/src/base/websession.pp

@@ -136,7 +136,6 @@ begin
     {$ifdef cgidebug}Senddebug('Creating iniwebsession');{$endif}
     W:=TFPWebSession.Create(Nil);
     W.SessionDir:=GlobalSessionDir;
-    W.Cached:=true;
     Result:=W;
     end;
 {$ifdef cgidebug}SendMethodExit('GetDefaultSession');{$endif}