Merge pull request #34 from nodiscc/master

HTTPS support for RSS feed URL generation + move $gallery_link generation into rss.php
This commit is contained in:
Tom.C. 2014-05-22 07:45:43 +02:00
commit 70fe4b9d9b
2 changed files with 9 additions and 1 deletions

View file

@ -38,7 +38,6 @@ $label_noimages = "No images"; //Empty folder text
$label_loading = "Loading..."; //Thumbnail loading text $label_loading = "Loading..."; //Thumbnail loading text
//RSS SETTINGS //RSS SETTINGS
$gallery_link = substr("http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 0, strlen("http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'])-7); // the -7 is to remove "rss.php"
$description = "MiniGal Nano"; $description = "MiniGal Nano";
$nb_items_rss = 25; //number ef elements to display in the feed. If you add a lot of pictures at the time, consider increasing this number $nb_items_rss = 25; //number ef elements to display in the feed. If you add a lot of pictures at the time, consider increasing this number
$rss_refresh_interval = 60;//time, in seconds, between two RSS refresh. for example, 3600 = 1update max per hour, 86400 = 1/day. $rss_refresh_interval = 60;//time, in seconds, between two RSS refresh. for example, 3600 = 1update max per hour, 86400 = 1/day.

View file

@ -1,4 +1,13 @@
<?php <?php
/*==========================*/
/*Gallery address definition*/
/*==========================*/
$gallery_protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://";
$gallery_domain = $_SERVER['HTTP_HOST'].'/';
$gallery_path = dirname($_SERVER['REQUEST_URI']);
$gallery_link = $gallery_protocol.$gallery_domain.$gallery_path;
/*===================*/ /*===================*/
/*Functions*/ /*Functions*/
/*===================*/ /*===================*/