Permalink
Browse files

Use unsecure project web url for donor checks, as the ssl certificate…

… seems not accepted on some Wine systems.
  • Loading branch information...
ansgarbecker committed Mar 5, 2017
1 parent c75054b commit 31dc8f3f97e4aab3e48566fb2dfb93c03afa87cd
Showing with 23 additions and 13 deletions.
  1. +3 −3 source/about.pas
  2. +1 −1 source/const.inc
  3. +1 −1 source/exportgrid.pas
  4. +11 −1 source/helpers.pas
  5. +3 −3 source/main.pas
  6. +1 −1 source/sqlhelp.pas
  7. +3 −3 source/updatecheck.pas
View
@@ -122,9 +122,9 @@ procedure TAboutBox.FormShow(Sender: TObject);
lblAppName.Caption := APPNAME;
lblAppVersion.Caption := _('Version') + ' ' + Mainform.AppVersion + ' (' + IntToStr(GetExecutableBits) + ' Bit)';
lblAppCompiled.Caption := _('Compiled on:') + ' ' + DateTimeToStr(GetImageLinkTimeStamp(Application.ExeName));
lblAppWebpage.Caption := AppDomain;
lblAppWebpage.Hint := AppDomain+'?place='+EncodeURLParam(lblAppWebpage.Name);
ImageHeidisql.Hint := AppDomain+'?place='+EncodeURLParam(ImageHeidisql.Name);
lblAppWebpage.Caption := GetAppWebsite(True);
lblAppWebpage.Hint := GetAppWebsite(True)+'?place='+EncodeURLParam(lblAppWebpage.Name);
ImageHeidisql.Hint := GetAppWebsite(True)+'?place='+EncodeURLParam(ImageHeidisql.Name);
Screen.Cursor := crDefault;
end;
View
@@ -12,7 +12,7 @@ const
// General things
APPNAME = 'HeidiSQL';
APPDOMAIN = 'https://www.heidisql.com/';
APPDOMAIN = 'www.heidisql.com';
REGKEY_SESSIONS = 'Servers';
REGKEY_QUERYHISTORY = 'QueryHistory';
REGKEY_RECENTFILTERS = 'RecentFilters';
View
@@ -890,7 +890,7 @@ procedure TfrmExportGrid.btnOKClick(Sender: TObject);
' </table>' + CRLF + CRLF +
' <p>' + CRLF +
' <em>generated ' + DateToStr(now) + ' ' + TimeToStr(now) +
' by <a href="'+APPDOMAIN+'">' + APPNAME + ' ' + Mainform.AppVersion + '</a></em>' + CRLF +
' by <a href="'+GetAppWebsite(True)+'">' + APPNAME + ' ' + Mainform.AppVersion + '</a></em>' + CRLF +
' </p>' + CRLF + CRLF +
' </body>' + CRLF +
'</html>' + CRLF;
View
@@ -331,6 +331,7 @@ TAppSettings = class(TObject)
procedure Help(Sender: TObject; Anchor: String);
function PortOpen(Port: Word): Boolean;
function IsValidFilePath(FilePath: String): Boolean;
function GetAppWebsite(Secure: Boolean): String;
var
@@ -2742,7 +2743,7 @@ procedure Help(Sender: TObject; Anchor: String);
Place := 'unhandled-'+Sender.ClassName;
if IsNotEmpty(Anchor) then
Anchor := '#'+Anchor;
ShellExec(APPDOMAIN+'help.php?place='+EncodeURLParam(Place)+Anchor);
ShellExec(GetAppWebsite(True)+'help.php?place='+EncodeURLParam(Place)+Anchor);
end;
@@ -2785,6 +2786,15 @@ function IsValidFilePath(FilePath: String): Boolean;
end;
function GetAppWebsite(Secure: Boolean): String;
begin
// Get project web url, with or without ssl
if Secure then
Result := 'https://' + APPDOMAIN + '/'
else
Result := 'http://' + APPDOMAIN + '/';
end;
{ Threading stuff }
View
@@ -1990,7 +1990,7 @@ procedure TMainForm.AfterFormCreate;
if DaysBetween(Now, LastStatsCall) >= 30 then begin
// Report used SVN revision
StatsCall := THttpDownload.Create(Self);
StatsCall.URL := APPDOMAIN + 'savestats.php?c=' + IntToStr(FAppVerRevision) + '&bits=' + IntToStr(GetExecutableBits);
StatsCall.URL := GetAppWebsite(True) + 'savestats.php?c=' + IntToStr(FAppVerRevision) + '&bits=' + IntToStr(GetExecutableBits);
// Enumerate actively used server versions
for i:=0 to SessionPaths.Count-1 do begin
AppSettings.SessionPath := SessionPaths[i];
@@ -2498,7 +2498,7 @@ procedure TMainForm.DonateClick(Sender: TObject);
ErrorDialog(f_('Could not determine parent form of this %s', [Sender.ClassName]))
else begin
place := LowerCase(Dialog.UnitName);
ShellExec(APPDOMAIN + 'donatebutton.php?place=' + EncodeURLParam(place));
ShellExec(GetAppWebsite(True) + 'donatebutton.php?place=' + EncodeURLParam(place));
end;
end;
@@ -12100,7 +12100,7 @@ function TMainForm.HasDonated(ForceCheck: Boolean): TThreeStateBoolean;
// = 2 : Valid donor
rx := TRegExpr.Create;
CheckWebpage := THttpDownload.Create(MainForm);
CheckWebpage.URL := APPDOMAIN + 'hasdonated.php?email='+EncodeURLParam(Email);
CheckWebpage.URL := GetAppWebsite(False) + 'hasdonated.php?email='+EncodeURLParam(Email);
CheckWebpage.TimeOut := 3;
TempFileName := GetTempDir + '\' + APPNAME + '_hasdonated_check.tmp';
try
View
@@ -278,7 +278,7 @@ procedure TfrmSQLhelp.FormShow(Sender: TObject);
procedure TfrmSQLhelp.ButtonOnlinehelpClick(Sender: TObject);
begin
// Link/redirect to mysql.com for further help
ShellExec( APPDOMAIN + 'sqlhelp.php?mysqlversion='+inttostr(MainForm.ActiveConnection.ServerVersionInt)+
ShellExec(GetAppWebsite(True) + 'sqlhelp.php?mysqlversion='+inttostr(MainForm.ActiveConnection.ServerVersionInt)+
'&keyword='+EncodeURLParam(keyword));
end;
View
@@ -119,7 +119,7 @@ procedure TfrmUpdateCheck.ReadCheckFile;
// Prepare download
CheckfileDownload := THttpDownload.Create(Self);
CheckfileDownload.TimeOut := 5;
CheckfileDownload.URL := APPDOMAIN+'updatecheck.php?r='+IntToStr(Mainform.AppVerRevision)+'&bits='+IntToStr(GetExecutableBits)+'&t='+DateTimeToStr(Now);
CheckfileDownload.URL := GetAppWebsite(True)+'updatecheck.php?r='+IntToStr(Mainform.AppVerRevision)+'&bits='+IntToStr(GetExecutableBits)+'&t='+DateTimeToStr(Now);
CheckFilename := GetTempDir + APPNAME + '_updatecheck.ini';
// Download the check file
@@ -177,13 +177,13 @@ procedure TfrmUpdateCheck.ReadCheckFile;
}
procedure TfrmUpdateCheck.btnReleaseClick(Sender: TObject);
begin
ShellExec(APPDOMAIN+'download.php?download=installer');
ShellExec(GetAppWebsite(True)+'download.php?download=installer');
end;
procedure TfrmUpdateCheck.btnChangelogClick(Sender: TObject);
begin
ShellExec(APPDOMAIN+'download.php?place='+EncodeURLParam(TButton(Sender).Name)+'#nightlybuilds');
ShellExec(GetAppWebsite(True)+'download.php?place='+EncodeURLParam(TButton(Sender).Name)+'#nightlybuilds');
end;

0 comments on commit 31dc8f3

Please sign in to comment.