Commit 34dd8f3158bc6d5483d7828ebfa3d26e6a7b200a

Authored by kevin_fourie
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 259 function arrayToXML($aItems){
260 260 // Build path to host
261 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 264 $feed = "<?xml version=\"1.0\"?>\n";
264 265 $feed .= "<rss version=\"2.0\">\n".
265 266 "<channel>\n" .
... ... @@ -371,7 +372,8 @@ class KTrss{
371 372 function errorToXML($sError){
372 373 // Build path to host
373 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 377 $feed = "<?xml version=\"1.0\"?>\n";
376 378 $feed .= "<rss version=\"2.0\">\n".
377 379 "<channel>\n" .
... ... @@ -495,7 +497,8 @@ class KTrss{
495 497 // get icon link for rss
496 498 function getRssLinkIcon(){
497 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 503 // create image
501 504 $icon = "<img src='".$sHostPath."resources/graphics/rss.gif' alt='RSS' border=0/>";
... ... @@ -513,7 +516,8 @@ class KTrss{
513 516 }
514 517  
515 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 522 // build link
519 523 $sLink = $sHostPath.KTBrowseUtil::buildBaseUrl('rss').$sItemParameter.'='.$iItemId;
... ... @@ -540,17 +544,19 @@ class KTrss{
540 544  
541 545 // get mime information for a document
542 546 function getMimeTypeInfo($iUserId, $iDocumentId){
  547 + global $default;
543 548 $mimeinfo['typeId'] = KTrss::getDocumentMimeTypeId($iUserId, $iDocumentId); // mime type id
544 549 $mimeinfo['typeName'] = KTMime::getMimeTypeName($mimeinfo['typeId']); // mime type name
545 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 553 return $mimeinfo;
549 554 }
550 555  
551 556 // get the default folder icon
552 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 562 // get a document information
... ...