From d482264b6af8598ce50677ac6a8f781e219b7d6f Mon Sep 17 00:00:00 2001 From: Jim Hu Date: Sun, 28 Dec 2008 19:30:41 +0000 Subject: fix misc bugs; rewrite some places where warnings squelched with @; require php5.1 or greater --- functions/init.inc.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'functions/init.inc.php') diff --git a/functions/init.inc.php b/functions/init.inc.php index 8d15778..1b227cc 100644 --- a/functions/init.inc.php +++ b/functions/init.inc.php @@ -11,11 +11,12 @@ include_once(BASE.'error.php'); include_once(BASE.'functions/calendar_functions.php'); include_once(BASE.'functions/userauth_functions.php'); - +# require php 5 +if (phpversion() < '5.1') die (error(sprintf($lang['l_php_version_required'],phpversion()) ) ); // Grab the action (login or logout). +$action = ''; if (isset($_GET['action'])) $action = $_GET['action']; -else if (isset($_POST['action'])) $action = $_POST['action']; -else $action = ''; +else if (isset($_POST['action'])) $action = $_POST['action']; // Login and/or logout. list($username, $password, $invalid_login) = user_login(); -- cgit v1.2.3