Update files to use $hubBaseurl

Remove hard coded references to hub.hackerpublicradio.org to allow hub to be run on different servers and make testing locally possible.
This commit is contained in:
2025-09-30 23:22:04 -04:00
parent 2609ee5710
commit 4d51954c3c
5 changed files with 5 additions and 5 deletions

View File

@@ -312,7 +312,7 @@ for ( $slot = $current_episode_number; $slot < ( $current_episode_number + 60 );
$sizeof_show_array--;
}
elseif ( empty( $show_array[$slot] ) ) {
echo "<span style=\"font-family:monospace;\">${this_episode_date}: <a aria-label=\"Upload to the slot hpr${slot}\" href=\"${hubBaseurl}/request.php?id=${slot}\">hpr${slot}</span> is available - upload now</a>.<br />\n";
echo "<span style=\"font-family:monospace;\">${this_episode_date}: <a aria-label=\"Upload to the slot hpr${slot}\" href=\"${hubBaseurl}request.php?id=${slot}\">hpr${slot}</span> is available - upload now</a>.<br />\n";
}
elseif ( $show_array[$slot]["valid"] == 0 ) {
echo "<span style=\"font-family:monospace;\">${this_episode_date}: hpr${slot}</span> <strong>Unavailable</strong>.<br />\n";

View File

@@ -2,7 +2,7 @@
<html lang="en">
<head>
<title>Hacker Public Radio ~ The Technology Community Podcast</title>
<base href="https://hub.hackerpublicradio.org/">
<base href="<?php echo $hubBaseurl ?>">
<meta charset="utf-8" />
<meta http-equiv="X-Clacks-Overhead" content="GNU Terry Pratchett" />
<meta http-equiv="last-modified" content="Thu, 28 Dec 2023 17:36:30 +0000">

View File

@@ -1,3 +1,3 @@
<?php
header('location:https://hub.hackerpublicradio.org/calendar.php');
header("location:${hubBaseurl}calendar.php");
?>

View File

@@ -3,5 +3,5 @@
#require "/home/hpr/php/include.php";
?>
<?php
header('location:https://hub.hackerpublicradio.org/calendar.php');
header("location:${hubBaseurl}calendar.php");
?>

View File

@@ -51,7 +51,7 @@ if ( isset( $_GET['delete'] ) ) {
call412("35a7f4e80ecba8284049e9d6261ae523");
}
else {
header( "Location: https://" . $_SERVER['SERVER_NAME'] . "/calendar.php" ) ;
header( "Location: ${hubBaseurl}calendar.php" ) ;
$dir_structure = "/home/hpr/upload/" . strtotime($db_timestamp) . "_${ep_num}_${ep_date}_${db_key}/";
rrmdir("$dir_structure");
exit;