Share Pastebin
Guest
Public paste!

Rego

By: a guest | Jan 19th, 2009 | Syntax: None | Size: 1.73 KB | Hits: 276 | Expires: Never
Copy text to clipboard
  1. Index: pi1/class.tx_chcforumfeed_pi1.php
  2. ===================================================================
  3. --- pi1/class.tx_chcforumfeed_pi1.php   (revision 1)
  4. +++ pi1/class.tx_chcforumfeed_pi1.php   (working copy)
  5.  -76,8 +76,9 @@
  6.                 $entries = '';
  7.                 $i=0;
  8.  
  9. -               // Remove http://
  10. -               $conf['url'] = str_replace('http://','',$conf['url']);
  11. +               $protocol = ($_SERVER['HTTPS'] == 'on') ? 'https' : 'http';
  12. +               // Remove http:// or https://
  13. +               $conf['url'] = str_replace($protocol . '://','',$conf['url']);
  14.                 // Remove slash at the end
  15.                 if(strrpos($conf['url'],'/')==strlen($conf['url'])-1) {
  16.                         $conf['url'] = substr($conf['url'],0,strlen($conf['url'])-1);
  17.  -99,7 +100,7 @@
  18.                         $id = "tag:".$conf['url'].",".date("Y-m-d",$r['crdate']).":".$r['uid'];
  19.  
  20.                         // Create Link (still anchor and subpage is missing in link)
  21. -                       $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'])));
  22. +                       $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'])));
  23.                         $entries .= '<entry>
  24.                             <title>'.$r['post_subject'].'</title>
  25.                             <link href="'.$link.'"/>
  26.  -126,7 +127,7 @@
  27.  
  28.                           <title>'.$conf['title'].'</title>
  29.                           <link rel="self" href="'.t3lib_div::locationHeaderUrl(t3lib_div::getIndpEnv(REQUEST_URI)).'" />
  30. -                         <link href="http://'.$conf['url'].'"/>
  31. +                         <link href="'.$protocol.'://'.$conf['url'].'"/>
  32.                           <updated>'.$updated.'</updated>
  33.                           <author>
  34.                             <name>'.$conf['copy'].'</name>