mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 10:29:24 +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;
|
AText: String; Buttons: TWebButtons): string;
|
||||||
var i : integer;
|
var i : integer;
|
||||||
HasCancel: boolean;
|
HasCancel: boolean;
|
||||||
HasOk: boolean;
|
|
||||||
OnOk: string;
|
OnOk: string;
|
||||||
OnCancel: string;
|
OnCancel: string;
|
||||||
begin
|
begin
|
||||||
HasCancel:=false;
|
HasCancel:=false;
|
||||||
HasOk:=false;
|
|
||||||
OnOk:='';
|
OnOk:='';
|
||||||
OnCancel:='';
|
OnCancel:='';
|
||||||
for i := low(Buttons) to High(Buttons) do
|
for i := low(Buttons) to High(Buttons) do
|
||||||
begin
|
begin
|
||||||
if Buttons[i].ButtonType=btOk then
|
if Buttons[i].ButtonType=btOk then
|
||||||
begin
|
|
||||||
HasOk := True;
|
|
||||||
OnOk := Buttons[i].OnClick;
|
OnOk := Buttons[i].OnClick;
|
||||||
end;
|
|
||||||
if Buttons[i].ButtonType=btCancel then
|
if Buttons[i].ButtonType=btCancel then
|
||||||
begin
|
begin
|
||||||
HasCancel := True;
|
HasCancel := True;
|
||||||
@ -425,6 +420,7 @@ begin
|
|||||||
qs := '';
|
qs := '';
|
||||||
result := Action;
|
result := Action;
|
||||||
ARequest := GetRequest;
|
ARequest := GetRequest;
|
||||||
|
ActionVar := '';
|
||||||
if assigned(owner) then
|
if assigned(owner) then
|
||||||
begin
|
begin
|
||||||
if (owner is TWebPage) and assigned(TWebPage(Owner).WebModule) then
|
if (owner is TWebPage) and assigned(TWebPage(Owner).WebModule) then
|
||||||
@ -433,11 +429,9 @@ begin
|
|||||||
WebMod := TFPWebModule(Owner);
|
WebMod := TFPWebModule(Owner);
|
||||||
|
|
||||||
ActionVar := WebMod.ActionVar;
|
ActionVar := WebMod.ActionVar;
|
||||||
if action = '' then
|
if (action = '') and assigned(WebMod.Actions) and assigned(WebMod.Actions.CurrentAction) then
|
||||||
result := WebMod.Actions.CurrentAction.Name;
|
result := WebMod.Actions.CurrentAction.Name;
|
||||||
end
|
end;
|
||||||
else
|
|
||||||
ActionVar := '';
|
|
||||||
if ActionVar='' then FancyTitle:=true;
|
if ActionVar='' then FancyTitle:=true;
|
||||||
if Assigned(ARequest) then
|
if Assigned(ARequest) then
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user