Commit 3ee7853c0a5e6c6e4d51cff10cb0e0d9ac1d59bb

Authored by kevin_fourie
1 parent b1fdb385

Merged in from DEV trunk...

KTS-2773
"CLONE -RSS Feeds from KTDMS(SUP-525)"
Fixed. Updated path mechanism.

Committed By: Jalaloedien Abrahams
Reviewed By: Megan Watson

git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/STABLE/trunk@7814 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 10 additions and 2 deletions
plugins/rssplugin/KTrss.inc.php
... ... @@ -279,7 +279,15 @@ class KTrss{
279 279 // Build path to host
280 280 $aPath = explode('/', trim($_SERVER['PHP_SELF']));
281 281 global $default;
282   - $hostPath = "http" . ($default->sslEnabled ? "s" : "") . "://".$_SERVER['HTTP_HOST']."/".$aPath[1]."/";
  282 + if(count($aPath) > 2){
  283 + for($i = 0; $i < count($aPath)-1; $i++){
  284 + $sSuffix .= $aPath[$i];
  285 + }
  286 + $sSuffix = $aPath[1]."/";
  287 + }else{
  288 + $sSuffix = '';
  289 + }
  290 + $hostPath = "http" . ($default->sslEnabled ? "s" : "") . "://".$_SERVER['HTTP_HOST']."/".$sSuffix;
283 291 $feed = "<?xml version=\"1.0\"?>\n";
284 292 $feed .= "<rss version=\"2.0\">\n".
285 293 "<channel>\n" .
... ... @@ -546,7 +554,7 @@ class KTrss{
546 554  
547 555 // get rss icon link
548 556 function getImageLink($iItemId, $sItemType){
549   - return "<a title='View RSS Page' href='".KTrss::getRssLink($iItemId, $sItemType)."' target='_blank'>".KTrss::getRssLinkIcon()."</a>";
  557 + return "<a href='".KTrss::getRssLink($iItemId, $sItemType)."' target='_blank'>".KTrss::getRssLinkIcon()."</a>";
550 558 }
551 559  
552 560 // get the mime type id for a document
... ...