Commit 34dd8f3158bc6d5483d7828ebfa3d26e6a7b200a
1 parent
fda812d5
KTS-2148
"Security Information Warning in Internet Explorer (IE) when viewing documents folders." Fixed/In Progress/Updated. Description of work done... Committed By: Kevin Reviewed By: Conrad git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/STABLE/trunk@6880 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
12 additions
and
6 deletions
plugins/rssplugin/KTrss.inc.php
| @@ -259,7 +259,8 @@ class KTrss{ | @@ -259,7 +259,8 @@ class KTrss{ | ||
| 259 | function arrayToXML($aItems){ | 259 | function arrayToXML($aItems){ |
| 260 | // Build path to host | 260 | // Build path to host |
| 261 | $aPath = explode('/', trim($_SERVER['PHP_SELF'])); | 261 | $aPath = explode('/', trim($_SERVER['PHP_SELF'])); |
| 262 | - $hostPath = "http://".$_SERVER['HTTP_HOST']."/".$aPath[1]."/"; | 262 | + global $default; |
| 263 | + $hostPath = "http" . ($default->sslEnabled ? "s" : "") . "://".$_SERVER['HTTP_HOST']."/".$aPath[1]."/"; | ||
| 263 | $feed = "<?xml version=\"1.0\"?>\n"; | 264 | $feed = "<?xml version=\"1.0\"?>\n"; |
| 264 | $feed .= "<rss version=\"2.0\">\n". | 265 | $feed .= "<rss version=\"2.0\">\n". |
| 265 | "<channel>\n" . | 266 | "<channel>\n" . |
| @@ -371,7 +372,8 @@ class KTrss{ | @@ -371,7 +372,8 @@ class KTrss{ | ||
| 371 | function errorToXML($sError){ | 372 | function errorToXML($sError){ |
| 372 | // Build path to host | 373 | // Build path to host |
| 373 | $aPath = explode('/', trim($_SERVER['PHP_SELF'])); | 374 | $aPath = explode('/', trim($_SERVER['PHP_SELF'])); |
| 374 | - $hostPath = "http://".$_SERVER['HTTP_HOST']."/".$aPath[1]."/"; | 375 | + global $default; |
| 376 | + $hostPath = "http" . ($default->sslEnabled ? "s" : "") . "://".$_SERVER['HTTP_HOST']."/".$aPath[1]."/"; | ||
| 375 | $feed = "<?xml version=\"1.0\"?>\n"; | 377 | $feed = "<?xml version=\"1.0\"?>\n"; |
| 376 | $feed .= "<rss version=\"2.0\">\n". | 378 | $feed .= "<rss version=\"2.0\">\n". |
| 377 | "<channel>\n" . | 379 | "<channel>\n" . |
| @@ -495,7 +497,8 @@ class KTrss{ | @@ -495,7 +497,8 @@ class KTrss{ | ||
| 495 | // get icon link for rss | 497 | // get icon link for rss |
| 496 | function getRssLinkIcon(){ | 498 | function getRssLinkIcon(){ |
| 497 | // built server path | 499 | // built server path |
| 498 | - $sHostPath = "http://".$_SERVER['HTTP_HOST']."/".$GLOBALS['KTRootUrl']."/"; | 500 | + global $default; |
| 501 | + $sHostPath = "http" . ($default->sslEnabled ? "s" : "") . "://".$_SERVER['HTTP_HOST']."/".$GLOBALS['KTRootUrl']."/"; | ||
| 499 | 502 | ||
| 500 | // create image | 503 | // create image |
| 501 | $icon = "<img src='".$sHostPath."resources/graphics/rss.gif' alt='RSS' border=0/>"; | 504 | $icon = "<img src='".$sHostPath."resources/graphics/rss.gif' alt='RSS' border=0/>"; |
| @@ -513,7 +516,8 @@ class KTrss{ | @@ -513,7 +516,8 @@ class KTrss{ | ||
| 513 | } | 516 | } |
| 514 | 517 | ||
| 515 | // built server path | 518 | // built server path |
| 516 | - $sHostPath = "http://".$_SERVER['HTTP_HOST']; | 519 | + global $default; |
| 520 | + $sHostPath = "http" . ($default->sslEnabled ? "s" : "") . "://" . $_SERVER['HTTP_HOST']; | ||
| 517 | 521 | ||
| 518 | // build link | 522 | // build link |
| 519 | $sLink = $sHostPath.KTBrowseUtil::buildBaseUrl('rss').$sItemParameter.'='.$iItemId; | 523 | $sLink = $sHostPath.KTBrowseUtil::buildBaseUrl('rss').$sItemParameter.'='.$iItemId; |
| @@ -540,17 +544,19 @@ class KTrss{ | @@ -540,17 +544,19 @@ class KTrss{ | ||
| 540 | 544 | ||
| 541 | // get mime information for a document | 545 | // get mime information for a document |
| 542 | function getMimeTypeInfo($iUserId, $iDocumentId){ | 546 | function getMimeTypeInfo($iUserId, $iDocumentId){ |
| 547 | + global $default; | ||
| 543 | $mimeinfo['typeId'] = KTrss::getDocumentMimeTypeId($iUserId, $iDocumentId); // mime type id | 548 | $mimeinfo['typeId'] = KTrss::getDocumentMimeTypeId($iUserId, $iDocumentId); // mime type id |
| 544 | $mimeinfo['typeName'] = KTMime::getMimeTypeName($mimeinfo['typeId']); // mime type name | 549 | $mimeinfo['typeName'] = KTMime::getMimeTypeName($mimeinfo['typeId']); // mime type name |
| 545 | $mimeinfo['typeFName'] = KTMime::getFriendlyNameForString($mimeinfo['typeName']); // mime type friendly name | 550 | $mimeinfo['typeFName'] = KTMime::getFriendlyNameForString($mimeinfo['typeName']); // mime type friendly name |
| 546 | - $mimeinfo['typeIcon'] = "http://".$_SERVER['HTTP_HOST']."/".$GLOBALS['KTRootUrl']."/resources/mimetypes/".KTMime::getIconPath($mimeinfo['typeId']).".png"; //icon path | 551 | + $mimeinfo['typeIcon'] = "http" . ($default->sslEnabled ? "s" : "") . "://".$_SERVER['HTTP_HOST']."/".$GLOBALS['KTRootUrl']."/resources/mimetypes/".KTMime::getIconPath($mimeinfo['typeId']).".png"; //icon path |
| 547 | 552 | ||
| 548 | return $mimeinfo; | 553 | return $mimeinfo; |
| 549 | } | 554 | } |
| 550 | 555 | ||
| 551 | // get the default folder icon | 556 | // get the default folder icon |
| 552 | function getFolderIcon(){ | 557 | function getFolderIcon(){ |
| 553 | - return $mimeinfo['typeIcon'] = "http://".$_SERVER['HTTP_HOST']."/".$GLOBALS['KTRootUrl']."/thirdparty/icon-theme/16x16/mimetypes/x-directory-normal.png"; //icon path | 558 | + global $default; |
| 559 | + return $mimeinfo['typeIcon'] = "http" . ($default->sslEnabled ? "s" : "") . "://".$_SERVER['HTTP_HOST']."/".$GLOBALS['KTRootUrl']."/thirdparty/icon-theme/16x16/mimetypes/x-directory-normal.png"; //icon path | ||
| 554 | } | 560 | } |
| 555 | 561 | ||
| 556 | // get a document information | 562 | // get a document information |