From c1d250092add1d60dfbf2b0a282b8e3d42c4b0e0 Mon Sep 17 00:00:00 2001 From: Tom Lake <tswsl1989@sucs.org> Date: Tue, 19 Jun 2012 08:36:56 +0000 Subject: [PATCH] Some minor fixes to the MOTD poetry thing --- components/motd.php | 6 +++--- components/motd_wrapper.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/motd.php b/components/motd.php index 5b811cb..60a4860 100644 --- a/components/motd.php +++ b/components/motd.php @@ -74,9 +74,9 @@ $motd .= "\n"; } $motd .= "---------------------------- [ http://sucs.org/ ] -----------------------------\n"; -if (date("z",time()-filemtime($motd_file)) < 1 && $poemmode == 1) { +//if (time()-filemtime($motd_file) < 86000 && $poemmode == 1) { //86000 to allow a little slack depending on when cron runs // print "MOTD too recent to replace with a poem!\n"; -} else { +//} else { file_put_contents($motd_file, $motd); -} +//} ?> diff --git a/components/motd_wrapper.php b/components/motd_wrapper.php index 765e824..dfd9422 100644 --- a/components/motd_wrapper.php +++ b/components/motd_wrapper.php @@ -6,7 +6,7 @@ $dbname = 'sucssite'; $dbuser = 'apache'; $DB = NewADOConnection('postgres8'); -$DB->Connect('dbname='.$dbname.',dbuser='$dbuser); +$DB->Connect('dbname='.$dbname.' user='.$dbuser); $DB->SetFetchMode(ADODB_FETCH_ASSOC); -include("./motd.php"); +include($base."components/motd.php"); -- GitLab