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:
		@@ -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";
 | 
			
		||||
 
 | 
			
		||||
@@ -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">
 | 
			
		||||
 
 | 
			
		||||
@@ -1,3 +1,3 @@
 | 
			
		||||
<?php
 | 
			
		||||
   header('location:https://hub.hackerpublicradio.org/calendar.php');
 | 
			
		||||
   header("location:${hubBaseurl}calendar.php");
 | 
			
		||||
?>
 | 
			
		||||
 
 | 
			
		||||
@@ -3,5 +3,5 @@
 | 
			
		||||
#require "/home/hpr/php/include.php";
 | 
			
		||||
?>
 | 
			
		||||
<?php
 | 
			
		||||
   header('location:https://hub.hackerpublicradio.org/calendar.php');
 | 
			
		||||
   header("location:${hubBaseurl}calendar.php");
 | 
			
		||||
?>
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user