aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2017-08-04 23:51:42 +0100
committerAndreas Schneider <asn@cryptomilk.org>2017-08-14 08:38:01 +0200
commit17a3374197086474fded2ea4a2c738284d75e89c (patch)
treea1fbbaed79f98da267bd75702bb3151d2528ce22
parent40fdbaf9cb162f6bc8c356492fc00529372414fe (diff)
downloadmlmmj-webarchiver-master.tar.gz
mlmmj-webarchiver-master.tar.xz
mlmmj-webarchiver-master.zip
index.php, index.php.newlist: explicitly set *lists and archived_monthsHEADmaster
When these variables are first set using .= they raise an error about them being undefined. Explicitly setting them should get rid of the error and avoid an error if there are no list directories (this would be odd) or if there are no months for a list (maybe not quite as unusual). Signed-off-by: Tomasz Kramkowski <tk@the-tk.com>
-rw-r--r--mlmmj-webarchiver/index.php.newlist1
-rw-r--r--mlmmj-webarchiver/skel/index.php1
2 files changed, 2 insertions, 0 deletions
diff --git a/mlmmj-webarchiver/index.php.newlist b/mlmmj-webarchiver/index.php.newlist
index 425d4b2..1d78851 100644
--- a/mlmmj-webarchiver/index.php.newlist
+++ b/mlmmj-webarchiver/index.php.newlist
@@ -10,6 +10,7 @@ while($file = readdir($handle)) {
closedir($handle);
rsort($files);
reset($files);
+$archived_months = "";
foreach($files as $k => $file) {
if (! isset($year) || $year != substr($file, 0, 4)) {
$year = substr($file, 0, 4);
diff --git a/mlmmj-webarchiver/skel/index.php b/mlmmj-webarchiver/skel/index.php
index 7247927..64ebd55 100644
--- a/mlmmj-webarchiver/skel/index.php
+++ b/mlmmj-webarchiver/skel/index.php
@@ -2,6 +2,7 @@
$baselistdir = getcwd();
$mlist = substr(strrchr ($baselistdir, "/"), 1);
$mlistdir = opendir($baselistdir);
+ $navlists = $bodylists = "";
while($file = readdir($mlistdir)) {
if($file != "." && $file != ".." && $file != "images" && $file != "style"
&& is_dir($baselistdir . "/" . $file)) {