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";
|
||||
$feed = "total";
|
||||
break;
|
||||
case "/rss-future.php":
|
||||
$format = "mp3";
|
||||
$mimetype = "audio/mpeg";
|
||||
$feed = "future";
|
||||
break;
|
||||
case "/hpr_ogg_rss.php":
|
||||
$format = "ogg";
|
||||
$mimetype = "audio/ogg";
|
||||
@ -116,14 +121,10 @@ if (isset($_GET['full'])) {
|
||||
}
|
||||
}
|
||||
|
||||
$gomax = "0";
|
||||
if (isset($_GET['gomax'])) {
|
||||
$gomax = $_GET['gomax'];
|
||||
if ( $gomax === "1" ) {
|
||||
$gomax = "1";
|
||||
}
|
||||
if ( $feed === "future" ) {
|
||||
$query = "${query}\nAND eps.date >= UTC_DATE() ";
|
||||
}
|
||||
if ( $gomax === "0" ) {
|
||||
else {
|
||||
$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>
|
||||
<copyright>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) License</copyright>
|
||||
<managingEditor>feedback@NOSPAM-hackerpublicradio.org (HPR Feedback)</managingEditor>
|
||||
<!-- <author>feedback@NOSPAM-hackerpublicradio.org (HPR Feedback)</author> -->
|
||||
<itunes:owner>
|
||||
<itunes:name>HPR Volunteer</itunes:name>
|
||||
<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))));
|
||||
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"];
|
||||
$warning = "<p>This show has been flagged as $episode_explicit by the host.</p>\n";
|
||||
}
|
||||
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"]))) ;
|
||||
$warning = "This show has been flagged as $episode_explicit by the host.\n";
|
||||
}
|
||||
# $show_notes = utf8_encode ( $show_notes );
|
||||
$warning = utf8_encode ( $warning );
|
||||
echo " <item>\n";
|
||||
if ( $episode_explicit === "Clean" ) {
|
||||
@ -272,7 +269,6 @@ if ($result = mysqli_query($connection, $query)) {
|
||||
else {
|
||||
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 " <pubDate>" .date(DATE_RFC1123, strtotime($row['date'])) . "</pubDate>\n";
|
||||
$length = $row['size'];
|
||||
@ -284,8 +280,6 @@ if ($result = mysqli_query($connection, $query)) {
|
||||
|
||||
}
|
||||
}
|
||||
//Display non-connection errors
|
||||
//Close sql connection
|
||||
mysqli_close($connection);
|
||||
echo " </channel>
|
||||
</rss>
|
||||
|
Loading…
Reference in New Issue
Block a user