Commit cab10cdcc1c57a6cacb11a339a73b4973a842444
1 parent
3bf33f1a
corrected imageLink method
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2668 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
6 additions
and
1 deletions
lib/dashboard/DashboardNews.inc
| ... | ... | @@ -467,7 +467,12 @@ class DashboardNews { |
| 467 | 467 | function getImageLink() { |
| 468 | 468 | global $default; |
| 469 | 469 | if ($this->iImageSize > 0) { |
| 470 | - return "<img src=\"$default->rootUrl/" . $default->siteMap->getPage("viewNewsImage") . "?fNewsID=" . $this->getID() . "\" border=\"0\">"; | |
| 470 | + $sTargetPage = $default->siteMap->getPage("viewNewsImage"); | |
| 471 | + $sLink = "http" . ($default->sslEnabled ? "s" : "") . "://" . $default->serverName . | |
| 472 | + ((substr($sTargetPage, 0, strlen($default->rootUrl)) != $default->rootUrl) ? $default->rootUrl : "") . | |
| 473 | + $sTargetPage . "?fNewsID=" . $this->getID(); | |
| 474 | + | |
| 475 | + return "<img src=\"$sLink\" border=\"0\">"; | |
| 471 | 476 | } else { |
| 472 | 477 | return ""; |
| 473 | 478 | } | ... | ... |