diff options
author | simo <simo> | 2005-06-11 01:24:34 +0200 |
---|---|---|
committer | simo <simo> | 2005-06-11 01:24:34 +0200 |
commit | e45d8daaba0fed0deb766f46b773c3f83c596ed1 (patch) | |
tree | a98f167f7d799edc340ad27c54a3a9471062f19c /web/html/rss2.php | |
parent | a81f22da2dc0435b7417e635abcf5cb2ebe6e18f (diff) | |
download | aur-e45d8daaba0fed0deb766f46b773c3f83c596ed1.tar.gz aur-e45d8daaba0fed0deb766f46b773c3f83c596ed1.tar.xz |
fixed some relative links and rss problems with https
Diffstat (limited to 'web/html/rss2.php')
-rw-r--r-- | web/html/rss2.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/web/html/rss2.php b/web/html/rss2.php index c716ac66..2ec05b07 100644 --- a/web/html/rss2.php +++ b/web/html/rss2.php @@ -9,12 +9,12 @@ $rss->useCached("RSS2.0","xml/newestpkg.xml",3600); #All the general RSS setup $rss->title = "AUR Newest Packages"; $rss->description = "The latest and greatest packages in the AUR"; -$rss->link = 'http://'.$_SERVER['HTTP_HOST']; -$rss->syndicationURL = 'http://'.$_SERVER['HTTP_HOST'].'/rss2.php'; +$rss->link = "http" . ($_SERVER["HTTPS"]=='on'?"s":"") . "://".$_SERVER['HTTP_HOST']; +$rss->syndicationURL = "http" . ($_SERVER["HTTPS"]=='on'?"s":"") . "://".$_SERVER['HTTP_HOST']."/rss2.php"; $image = new FeedImage(); $image->title = "AUR"; -$image->url = "http://".$_SERVER['HTTP_HOST']."/images/AUR-logo-80.png"; -$image->link = "http://".$_SERVER['HTTP_HOST']; +$image->url = "http" . ($_SERVER["HTTPS"]=='on'?"s":"") . "://".$_SERVER['HTTP_HOST']."/images/AUR-logo-80.png"; +$image->link = "http" . ($_SERVER["HTTPS"]=='on'?"s":"") . "://".$_SERVER['HTTP_HOST']; $image->description = "AUR Newest Packages Feed"; $rss->image = $image; @@ -28,10 +28,10 @@ $result = db_query($q, $dbh); while ($row = mysql_fetch_assoc($result)) { $item = new FeedItem(); $item->title = $row["Name"]; - $item->link = 'http://'.$_SERVER['HTTP_HOST'].'/packages.php?do_Details&ID='.$row["ID"]; + $item->link = "http" . ($_SERVER["HTTPS"]=='on'?"s":"") . "://".$_SERVER['HTTP_HOST'].'/packages.php?do_Details&ID='.$row["ID"]; $item->description = $row["Description"]; $item->date = intval($row["SubmittedTS"]); - $item->source = 'http://'.$_SERVER['HTTP_HOST']; + $item->source = "http" . ($_SERVER["HTTPS"]=='on'?"s":"") . "://".$_SERVER['HTTP_HOST']; $item->author = username_from_id($row["MaintainerUID"]); $rss->addItem($item); } |