Removed gomax as it was not used and it didn't work
Added a future switch to switch before `now()` and after Cleaned up some commented out lines
This commit is contained in:
parent
50945b9968
commit
236cd08e6f
22
www/rss.php
22
www/rss.php
@ -35,6 +35,11 @@ switch ($atomurl) {
|
|||||||
$mimetype = "audio/mpeg";
|
$mimetype = "audio/mpeg";
|
||||||
$feed = "total";
|
$feed = "total";
|
||||||
break;
|
break;
|
||||||
|
case "/rss-future.php":
|
||||||
|
$format = "mp3";
|
||||||
|
$mimetype = "audio/mpeg";
|
||||||
|
$feed = "future";
|
||||||
|
break;
|
||||||
case "/hpr_ogg_rss.php":
|
case "/hpr_ogg_rss.php":
|
||||||
$format = "ogg";
|
$format = "ogg";
|
||||||
$mimetype = "audio/ogg";
|
$mimetype = "audio/ogg";
|
||||||
@ -116,14 +121,10 @@ if (isset($_GET['full'])) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$gomax = "0";
|
if ( $feed === "future" ) {
|
||||||
if (isset($_GET['gomax'])) {
|
$query = "${query}\nAND eps.date >= UTC_DATE() ";
|
||||||
$gomax = $_GET['gomax'];
|
|
||||||
if ( $gomax === "1" ) {
|
|
||||||
$gomax = "1";
|
|
||||||
}
|
}
|
||||||
}
|
else {
|
||||||
if ( $gomax === "0" ) {
|
|
||||||
$query = "${query}\nAND eps.date <= UTC_DATE() ";
|
$query = "${query}\nAND eps.date <= UTC_DATE() ";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -184,7 +185,6 @@ print '<?xml version="1.0" encoding="UTF-8" ?>' . "\n";
|
|||||||
<itunes:keywords>Community Radio, Tech Interviews, Linux, Open, Hobby, Software Freedom</itunes:keywords>
|
<itunes:keywords>Community Radio, Tech Interviews, Linux, Open, Hobby, Software Freedom</itunes:keywords>
|
||||||
<copyright>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) License</copyright>
|
<copyright>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) License</copyright>
|
||||||
<managingEditor>feedback@NOSPAM-hackerpublicradio.org (HPR Feedback)</managingEditor>
|
<managingEditor>feedback@NOSPAM-hackerpublicradio.org (HPR Feedback)</managingEditor>
|
||||||
<!-- <author>feedback@NOSPAM-hackerpublicradio.org (HPR Feedback)</author> -->
|
|
||||||
<itunes:owner>
|
<itunes:owner>
|
||||||
<itunes:name>HPR Volunteer</itunes:name>
|
<itunes:name>HPR Volunteer</itunes:name>
|
||||||
<itunes:email>admin@hackerpublicradio.org</itunes:email>
|
<itunes:email>admin@hackerpublicradio.org</itunes:email>
|
||||||
@ -237,16 +237,13 @@ if ($result = mysqli_query($connection, $query)) {
|
|||||||
|
|
||||||
$itunes_summary = htmlspecialchars(stripslashes(strip_tags(substr($row["notes"],0,4000))));
|
$itunes_summary = htmlspecialchars(stripslashes(strip_tags(substr($row["notes"],0,4000))));
|
||||||
if ( $html == 1 ) {
|
if ( $html == 1 ) {
|
||||||
# $show_notes = "<p>This show has been flagged as $episode_explicit by the host.</p>\n" . $row["notes"];
|
|
||||||
$show_notes = $row["notes"];
|
$show_notes = $row["notes"];
|
||||||
$warning = "<p>This show has been flagged as $episode_explicit by the host.</p>\n";
|
$warning = "<p>This show has been flagged as $episode_explicit by the host.</p>\n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
# $show_notes = "This show has been flagged as $episode_explicit by the host.\n" . htmlspecialchars(stripslashes(strip_tags($row["notes"]))) ;
|
|
||||||
$show_notes = htmlspecialchars(stripslashes(strip_tags($row["notes"]))) ;
|
$show_notes = htmlspecialchars(stripslashes(strip_tags($row["notes"]))) ;
|
||||||
$warning = "This show has been flagged as $episode_explicit by the host.\n";
|
$warning = "This show has been flagged as $episode_explicit by the host.\n";
|
||||||
}
|
}
|
||||||
# $show_notes = utf8_encode ( $show_notes );
|
|
||||||
$warning = utf8_encode ( $warning );
|
$warning = utf8_encode ( $warning );
|
||||||
echo " <item>\n";
|
echo " <item>\n";
|
||||||
if ( $episode_explicit === "Clean" ) {
|
if ( $episode_explicit === "Clean" ) {
|
||||||
@ -272,7 +269,6 @@ if ($result = mysqli_query($connection, $query)) {
|
|||||||
else {
|
else {
|
||||||
echo " <description><![CDATA[" . $show_notes . "]]>\n</description>\n";
|
echo " <description><![CDATA[" . $show_notes . "]]>\n</description>\n";
|
||||||
}
|
}
|
||||||
// echo " <googleplay:description><![CDATA[" . $show_notes . "]]>\n</googleplay:description>\n";
|
|
||||||
echo " <itunes:summary><![CDATA[" . $itunes_summary . "]]>\n</itunes:summary>\n";
|
echo " <itunes:summary><![CDATA[" . $itunes_summary . "]]>\n</itunes:summary>\n";
|
||||||
echo " <pubDate>" .date(DATE_RFC1123, strtotime($row['date'])) . "</pubDate>\n";
|
echo " <pubDate>" .date(DATE_RFC1123, strtotime($row['date'])) . "</pubDate>\n";
|
||||||
$length = $row['size'];
|
$length = $row['size'];
|
||||||
@ -284,8 +280,6 @@ if ($result = mysqli_query($connection, $query)) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//Display non-connection errors
|
|
||||||
//Close sql connection
|
|
||||||
mysqli_close($connection);
|
mysqli_close($connection);
|
||||||
echo " </channel>
|
echo " </channel>
|
||||||
</rss>
|
</rss>
|
||||||
|
Loading…
Reference in New Issue
Block a user