forked from HPR/hpr_hub
A series of fixes related to stuff I came across
This commit is contained in:
22
cms/say.php
22
cms/say.php
@@ -35,7 +35,24 @@ else {
|
||||
Header('Content-type: text/tab-separated-values');
|
||||
header("Content-disposition: inline; filename=say.txt");
|
||||
|
||||
$ep_retrieve = "SELECT UNIX_TIMESTAMP(eps.date) AS timestamp, eps.title, eps.duration, eps.summary, hosts.host, eps.hostid, eps.series, eps.license, eps.explicit FROM eps, hosts WHERE hosts.valid = '1' AND id = '$id' AND eps.hostid = hosts.hostid";
|
||||
$ep_retrieve = "SELECT
|
||||
UNIX_TIMESTAMP(eps.date) AS timestamp,
|
||||
eps.title,
|
||||
eps.duration,
|
||||
eps.summary,
|
||||
hosts.host,
|
||||
eps.hostid,
|
||||
eps.series,
|
||||
eps.license,
|
||||
licenses.long_name,
|
||||
eps.explicit
|
||||
FROM
|
||||
eps
|
||||
LEFT JOIN hosts ON eps.hostid = hosts.hostid
|
||||
LEFT JOIN licenses ON licenses.short_name = eps.license
|
||||
WHERE
|
||||
hosts.valid = '1'
|
||||
AND eps.id = '$id'";
|
||||
if ($result = mysqli_query($connection, $ep_retrieve)) {
|
||||
while ($row = mysqli_fetch_array($result)) {
|
||||
$date = $row['timestamp'];
|
||||
@@ -46,6 +63,7 @@ if ($result = mysqli_query($connection, $ep_retrieve)) {
|
||||
$hostid = $row['hostid'];
|
||||
$series = $row['series'];
|
||||
$license = $row['license'];
|
||||
$license_long_name = $row['long_name'];
|
||||
$explicit = $row['explicit'];
|
||||
|
||||
$id = fixid($id);
|
||||
@@ -91,7 +109,7 @@ if ( !empty( $summary ) ) {
|
||||
$HPR_summary = "${HPR_summary}. The summary is. $summary";
|
||||
}
|
||||
if (strcmp($license, "CC-BY-SA" ) !== 0) {
|
||||
$HPR_summary = "${HPR_summary}. Todays show is licensed under a $license license.";
|
||||
$HPR_summary = "${HPR_summary}. Todays show is licensed under a $license_long_name license.";
|
||||
}
|
||||
|
||||
$HPR_summary = str_replace($host,$espeak_name,$HPR_summary);
|
||||
|
Reference in New Issue
Block a user