mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-17 12:39:25 +02:00
* Fixed AV in GetURL
* Removed useless code (warning) git-svn-id: trunk@14879 -
This commit is contained in:
parent
c459100773
commit
257c6b0b89
@ -354,21 +354,16 @@ function TStandardWebController.DefaultMessageBoxHandler(Sender: TObject;
|
||||
AText: String; Buttons: TWebButtons): string;
|
||||
var i : integer;
|
||||
HasCancel: boolean;
|
||||
HasOk: boolean;
|
||||
OnOk: string;
|
||||
OnCancel: string;
|
||||
begin
|
||||
HasCancel:=false;
|
||||
HasOk:=false;
|
||||
OnOk:='';
|
||||
OnCancel:='';
|
||||
for i := low(Buttons) to High(Buttons) do
|
||||
begin
|
||||
if Buttons[i].ButtonType=btOk then
|
||||
begin
|
||||
HasOk := True;
|
||||
OnOk := Buttons[i].OnClick;
|
||||
end;
|
||||
if Buttons[i].ButtonType=btCancel then
|
||||
begin
|
||||
HasCancel := True;
|
||||
@ -425,6 +420,7 @@ begin
|
||||
qs := '';
|
||||
result := Action;
|
||||
ARequest := GetRequest;
|
||||
ActionVar := '';
|
||||
if assigned(owner) then
|
||||
begin
|
||||
if (owner is TWebPage) and assigned(TWebPage(Owner).WebModule) then
|
||||
@ -433,11 +429,9 @@ begin
|
||||
WebMod := TFPWebModule(Owner);
|
||||
|
||||
ActionVar := WebMod.ActionVar;
|
||||
if action = '' then
|
||||
if (action = '') and assigned(WebMod.Actions) and assigned(WebMod.Actions.CurrentAction) then
|
||||
result := WebMod.Actions.CurrentAction.Name;
|
||||
end
|
||||
else
|
||||
ActionVar := '';
|
||||
end;
|
||||
if ActionVar='' then FancyTitle:=true;
|
||||
if Assigned(ARequest) then
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user