From 33ef6ab1974187c6189bf52640d67e33cb77a80e Mon Sep 17 00:00:00 2001 From: Philip Olson Date: Mon, 20 Sep 2010 04:40:21 +0000 Subject: [PATCH] Added missing.xml to show when an XML file is missing. Not yet tested. --- show.php | 4 ++++ tools/missing.xml | 9 +++++++++ 2 files changed, 13 insertions(+) create mode 100644 tools/missing.xml diff --git a/show.php b/show.php index f960ec6..f0bf6f0 100644 --- a/show.php +++ b/show.php @@ -52,6 +52,10 @@ if(!isset($_SESSION['titlesLoaded'])) $_SESSION['titlesLoaded'] = 0; $presFile = str_replace('..','',(string)$_SESSION['currentPres']); // anti-hack $presFile = "$presentationDir/$presFile".'.xml'; + + if (!file_exists($presFile)) { + $presFile = "$baseDir/tools/missing.xml"; + } // Load in the presentation $fh = fopen($presFile, "rb"); diff --git a/tools/missing.xml b/tools/missing.xml new file mode 100644 index 0000000..b4506b4 --- /dev/null +++ b/tools/missing.xml @@ -0,0 +1,9 @@ + + + + + +The desired slide is missing. Please contact the author (with the URL) so that he or she may update this talk. + + +