From ea55978aa96b15f8591c82d7b870f2e5625f17e1 Mon Sep 17 00:00:00 2001 From: james Date: Thu, 8 Mar 2007 21:35:52 +0000 Subject: [PATCH] Make sure $config['dates']['postparticipants'] is valid before relying on it. --- common.inc.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/common.inc.php b/common.inc.php index 7bbb1f3..d10bd16 100644 --- a/common.inc.php +++ b/common.inc.php @@ -415,13 +415,18 @@ echo "

".i18n($config['fairname'])."

"; //then we will show the registration confirmation page as a link in the menu, $registrationconfirmationlink=""; - $q=mysql_query("SELECT (NOW()>'".$config['dates']['postparticipants']."') AS test"); - $r=mysql_fetch_object($q); - if($r->test==1) + //only display it if a date is set to begin with. + if($config['dates']['postparticipants'] && $config['dates']['postparticipants']!="0000-00-00 00:00:00") { - $registrationconfirmationlink="
  • ".i18n("Confirmed Participants")."
  • "; + $q=mysql_query("SELECT (NOW()>'".$config['dates']['postparticipants']."') AS test"); + $r=mysql_fetch_object($q); + if($r->test==1) + { + $registrationconfirmationlink="
  • ".i18n("Confirmed Participants")."
  • "; + } } ?> +