summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2015-12-09 16:29:04 +0100
committermsquare <msquare@notrademark.de>2015-12-09 16:29:04 +0100
commita92e1e3ea6a4b605662e9933b8aa9998d80a9010 (patch)
tree831ce1988f340b209c6b550ec73776735271bd34 /includes
parent902a5852a4ec938d86b4a77d584ce8479171c6ea (diff)
parent0ae5d85c601ba69d45a0df7420ce0baeeaf59c44 (diff)
Merge pull request #213 from engelsystem/remove-sessionhelper
remove sessionhelper
Diffstat (limited to 'includes')
-rw-r--r--includes/engelsystem_provider.php5
-rw-r--r--includes/helper/session_helper.php30
2 files changed, 1 insertions, 34 deletions
diff --git a/includes/engelsystem_provider.php b/includes/engelsystem_provider.php
index 2dc425a2..fc5553bc 100644
--- a/includes/engelsystem_provider.php
+++ b/includes/engelsystem_provider.php
@@ -76,9 +76,6 @@ require_once realpath(__DIR__ . '/../includes/pages/user_shifts.php');
require_once realpath(__DIR__ . '/../vendor/parsedown/Parsedown.php');
-if (! defined('PHPUNIT_TESTSUITE')) {
- session_lifetime(24 * 60, preg_replace("/[^a-z0-9-]/", '', md5(__DIR__)));
-}
session_start();
gettext_init();
@@ -87,4 +84,4 @@ sql_connect($config['host'], $config['user'], $config['pw'], $config['db']);
load_auth();
-?> \ No newline at end of file
+?>
diff --git a/includes/helper/session_helper.php b/includes/helper/session_helper.php
deleted file mode 100644
index 443701ee..00000000
--- a/includes/helper/session_helper.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-/**
- * Set lifetime of php session.
- *
- * @param int $lifetime
- * Lifetime in minutes
- * @param string $application_name
- * Name of the application
- */
-function session_lifetime($lifetime, $application_name) {
- // Set session save path and name
- $session_save_path = '/tmp/' . $application_name;
- if (! file_exists($session_save_path))
- mkdir($session_save_path);
- if (file_exists($session_save_path))
- session_save_path($session_save_path);
- session_name($application_name);
-
- // Set session lifetime
- ini_set('session.gc_maxlifetime', $lifetime * 60);
- ini_set('session.gc_probability', 1);
- ini_set('session.gc_divisor', 100);
-
- // Cookie settings (lifetime)
- ini_set('session.cookie_secure', ! (isset($_SERVER['HTTP_HOST']) && preg_match("/^localhost/", $_SERVER["HTTP_HOST"]) || isset($_GET['debug'])));
- ini_set('session.use_only_cookies', true);
- ini_set('session.cookie_lifetime', $lifetime * 60);
-}
-
-?> \ No newline at end of file