From 4653a970f0c574750b1ea2e19b112b13d66e80eb Mon Sep 17 00:00:00 2001
From: Mischa POSLAWSKY
Date: Mon, 10 Jul 2017 04:09:49 +0200
Subject: [PATCH] convert ssi html files to php code
Replace includes by equivalent php: single head.inc.php sets up same static
head.inc.html but with mandatory edit container, and existing foot.inc.php
(similar ssi variant no longer needed).
Requires httpd to change .html handler from server-parsed (ssi) to
application/x-httpd-php.
---
404.php | 3 +--
edit.php | 4 ++--
foot.inc.html | 22 ----------------------
head.inc.php | 8 ++++++++
4 files changed, 11 insertions(+), 26 deletions(-)
delete mode 100644 foot.inc.html
create mode 100644 head.inc.php
diff --git a/404.php b/404.php
index ba3e820..0410799 100755
--- a/404.php
+++ b/404.php
@@ -1,4 +1,4 @@
-
+
Niet gevonden
@@ -6,4 +6,3 @@
De gevraagde pagina bestaat niet.
-
diff --git a/edit.php b/edit.php
index 357d3a4..afa6c6d 100755
--- a/edit.php
+++ b/edit.php
@@ -29,8 +29,8 @@ if (!strlen($upload)) {
exit;
}
-$prepend = ''."\n\n";
-$append = "\n".''."\n";
+$prepend = "\n\n";
+$append = "\n";
if (!file_put_contents($filename, $prepend . $upload . $append))
abort('500 save error', "fout bij schrijven van $filename");
diff --git a/foot.inc.html b/foot.inc.html
deleted file mode 100644
index 41feac0..0000000
--- a/foot.inc.html
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-