Rego
By: a guest | Jan 19th, 2009 | Syntax:
None | Size: 1.73 KB | Hits: 276 | Expires: Never
Index: pi1/class.tx_chcforumfeed_pi1.php
===================================================================
--- pi1/class.tx_chcforumfeed_pi1.php (revision 1)
+++ pi1/class.tx_chcforumfeed_pi1.php (working copy)
-76,8 +76,9 @@
$entries = '';
$i=0;
- // Remove http://
- $conf['url'] = str_replace('http://','',$conf['url']);
+ $protocol = ($_SERVER['HTTPS'] == 'on') ? 'https' : 'http';
+ // Remove http:// or https://
+ $conf['url'] = str_replace($protocol . '://','',$conf['url']);
// Remove slash at the end
if(strrpos($conf['url'],'/')==strlen($conf['url'])-1) {
$conf['url'] = substr($conf['url'],0,strlen($conf['url'])-1);
-99,7 +100,7 @@
$id = "tag:".$conf['url'].",".date("Y-m-d",$r['crdate']).":".$r['uid'];
// Create Link (still anchor and subpage is missing in link)
- $link = 'http://'.$conf['url'].'/'.htmlspecialchars($this->pi_getPageLink($conf['forum_page_id'],'',array("view" => "single_thread","thread_uid" => $r['thread_id'],"cat_uid" => $r['cat_uid'],"conf_uid" => $r['conf_uid'])));
+ $link = $protocol . '://'.$conf['url'].'/'.htmlspecialchars($this->pi_getPageLink($conf['forum_page_id'],'',array("view" => "single_thread","thread_uid" => $r['thread_id'],"cat_uid" => $r['cat_uid'],"conf_uid" => $r['conf_uid'])));
$entries .= '<entry>
<title>'.$r['post_subject'].'</title>
<link href="'.$link.'"/>
-126,7 +127,7 @@
<title>'.$conf['title'].'</title>
<link rel="self" href="'.t3lib_div::locationHeaderUrl(t3lib_div::getIndpEnv(REQUEST_URI)).'" />
- <link href="http://'.$conf['url'].'"/>
+ <link href="'.$protocol.'://'.$conf['url'].'"/>
<updated>'.$updated.'</updated>
<author>
<name>'.$conf['copy'].'</name>