Browse Source

Command-line argument to specify sponsor to show (for testing only)

(cherry picked from commit 5388df68f852db8a27f327fdf907fedc3ba2d778)

Source commit: 88400ffbd8571d807723364e562ff80e95395cfb
Martin Prikryl 7 years ago
parent
commit
e434c50d5a
1 changed files with 6 additions and 0 deletions
  1. 6 0
      deployment/winscpsetup.iss

+ 6 - 0
deployment/winscpsetup.iss

@@ -1308,6 +1308,7 @@ var
   S: string;
 #ifdef Sponsor
   SponsorQueryUrl: string;
+  PreferredSponsor: string;
 #endif
 begin
   if CurPageID = wpLicense then
@@ -1430,6 +1431,11 @@ begin
           '{#WebReport}?' +
           Format('mode=sponsorrequest&ver=%s&lang=%s&prevver=%s&scale=%d&images=%s', [
             '{#VersionOnly}', ActiveLanguage, PrevVersion, GetScalingFactor, '{#SponsorImages}']);
+        PreferredSponsor := ExpandConstant('{param:Sponsor}');
+        if PreferredSponsor <> '' then
+        begin
+          SponsorQueryUrl := SponsorQueryUrl + Format('&sponsor=%s', [PreferredSponsor]);
+        end;
 
         Log('Sending sponsor query request: ' + SponsorQueryUrl);