[Fusionforge-commits] r15912 - branches/Branch_5_2/src/common/mail

Olivier Berger olberger at fusionforge.org
Mon Jul 2 16:54:19 CEST 2012


Author: olberger
Date: 2012-07-02 16:54:18 +0200 (Mon, 02 Jul 2012)
New Revision: 15912

Modified:
   branches/Branch_5_2/src/common/mail/MailingList.class.php
Log:
Don't force list Archives link to be http but adjust to forge_get_config('use_ssl')

Modified: branches/Branch_5_2/src/common/mail/MailingList.class.php
===================================================================
--- branches/Branch_5_2/src/common/mail/MailingList.class.php	2012-07-02 13:24:26 UTC (rev 15911)
+++ branches/Branch_5_2/src/common/mail/MailingList.class.php	2012-07-02 14:54:18 UTC (rev 15912)
@@ -342,10 +342,15 @@
 	 * @return string url of the archives
 	 */
 	function getArchivesUrl() {
+		if (forge_get_config('use_ssl')) {
+			$proto = 'https';
+		} else {
+			$proto = 'http';
+		}
 		if ($this->isPublic()) {
-			return 'http://'.forge_get_config('lists_host').'/pipermail/'.$this->getName().'/';
+			return "$proto://".forge_get_config('lists_host').'/pipermail/'.$this->getName().'/';
 		} else {
-			return 'http://'.forge_get_config('lists_host').'/mailman/private/'.$this->getName().'/';
+			return "$proto://".forge_get_config('lists_host').'/mailman/private/'.$this->getName().'/';
 		}
 	}
 




More information about the Fusionforge-commits mailing list