Skip to content

Commit cdabbbd

Browse files
committed
pull/135 - fetch powered image from https when required
1 parent c2bb42d commit cdabbbd

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

public_html/lists/admin/defaultconfig.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@
671671
} else {
672672
$v = VERSION;
673673
}
674-
$PoweredBy = '<p align="left"><a href="http://www.phplist.com"><img src="http://powered.phplist.com/images/' . $v . '/power-phplist.png" width="88" height="31" title="powered by phplist" alt="powered by phplist" border="0" /></a></p>';
674+
$PoweredBy = '<p align="left"><a href="http://www.phplist.com"><img src="'.PHPLIST_POWEREDBY_URLROOT.'/' . $v . '/power-phplist.png" width="88" height="31" title="powered by phplist" alt="powered by phplist" border="0" /></a></p>';
675675
} else {
676676
$PoweredBy = '<center><a href="http://www.phplist.com"><img src="images/power-phplist.png" width="88" height="31" title="powered by phplist" alt="powered by phplist" border="0" /></a></center>';
677677
}

public_html/lists/admin/init.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,11 @@
602602
define('AWS_POSTURL', 'https://email.us-east-1.amazonaws.com/');
603603
}
604604
if (!defined('PHPLIST_POWEREDBY_URLROOT')) {
605-
define('PHPLIST_POWEREDBY_URLROOT', 'http://powered.phplist.com/images');
605+
if ($GLOBALS['public_scheme'] == 'https') {
606+
define('PHPLIST_POWEREDBY_URLROOT', 'https://d3u7tsw7cvar0t.cloudfront.net/images');
607+
} else {
608+
define('PHPLIST_POWEREDBY_URLROOT', 'http://powered.phplist.com/images');
609+
}
606610
}
607611

608612
if (!isset($allowed_referrers) || !is_array($allowed_referrers)) {

public_html/lists/admin/lib.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ function cleanEmail($value)
630630
}
631631

632632
if (TEST && REGISTER) {
633-
$pixel = '<img src="http://powered.phplist.com/images/pixel.gif" width="1" height="1" />';
633+
$pixel = '<img src="'.PHPLIST_POWEREDBY_URLROOT.'/pixel.gif" width="1" height="1" />';
634634
}
635635

636636
function timeDiff($time1, $time2)

0 commit comments

Comments
 (0)