Skip to content
Browse files

Added license header to sessions.php; Session TTL is now set in the c…

…onfig file
  • Loading branch information...
1 parent 1962746 commit 02627aa4f6fc69add6495f39b45082f3767e1d47 @skyebook skyebook committed Apr 9, 2012
Showing with 24 additions and 3 deletions.
  1. +3 −0 config.php
  2. +21 −3 sessions.php
View
3 config.php
@@ -29,4 +29,7 @@
// Set the default timezone
date_default_timezone_set('America/New_York');
+
+// How long a session should last
+define('BETAVILLE_SESSION_TTL', '7200');
?>
View
24 sessions.php
@@ -1,9 +1,27 @@
<?php
-
- $sessionTTL = 7200;
+/**
+ * Betaville Web Service - A service for accessing data from a Betaville server via HTTP requests
+ * Copyright (C) 2011-2012 Betaville
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+ include_once "config.php";
+ $sessionTTL = BETAVILLE_SESSION_TTL;
if(!isset($_SESSION['sessionDB'])){
- include_once "config.php";
+
include_once "class_names.php";
include_once "db_constants.php";
$dsn = "mysql:host=".DB_HOST.";dbname=".DB_NAME;

3 comments on commit 02627aa

@ibby923
Betaville member
ibby923 commented on 02627aa Apr 9, 2012

yup.....cant have an unlimited session :D

@skyebook
Betaville member

It was in the sessions.php file before, but this was one of those values that should be set in the config file

@ibby923
Betaville member
ibby923 commented on 02627aa Apr 9, 2012

oh k

Please sign in to comment.
Something went wrong with that request. Please try again.