Merge code github > bitbucket 2014-05-23 16:35

This commit is contained in:
Julio Cesar Laura
2014-05-23 16:32:18 -04:00
75 changed files with 2274 additions and 724 deletions

View File

@@ -290,7 +290,10 @@ if (is_null($timelife)) {
$timelife = 1440;
}
ini_set('session.gc_maxlifetime', $timelife);
if ((isset($_SERVER ['HTTP_USER_AGENT']) && preg_match("/msie/i", $_SERVER ['HTTP_USER_AGENT']) != 1) || $config['ie_cookie_lifetime'] == 1) {
if ((preg_match("/msie/i", $_SERVER ['HTTP_USER_AGENT']) != 1 ||
$config['ie_cookie_lifetime'] == 1) &&
(!(preg_match("/safari/i", $_SERVER ['HTTP_USER_AGENT']) == 1 && preg_match("/chrome/i", $_SERVER ['HTTP_USER_AGENT']) == 0) ||
$config['safari_cookie_lifetime'] == 1)) {
ini_set('session.cookie_lifetime', $timelife);
}
//session_start();
@@ -298,7 +301,7 @@ if ((isset($_SERVER ['HTTP_USER_AGENT']) && preg_match("/msie/i", $_SERVER ['HTT
//$e_all = defined( 'E_DEPRECATED' ) ? E_ALL & ~ E_DEPRECATED : E_ALL;
//$e_all = defined( 'E_STRICT' ) ? $e_all & ~ E_STRICT : $e_all;
//$e_all = $config['debug'] ? $e_all : $e_all & ~ E_NOTICE;
//$e_all = E_ALL & ~ E_DEPRECATED & ~ E_STRICT & ~ E_NOTICE & ~E_WARNING;
//$e_all = E_ALL & ~ E_DEPRECATED & ~ E_STRICT & ~ E_NOTICE & ~E_WARNING;
// Do not change any of these settings directly, use env.ini instead
ini_set( 'display_errors', $config['display_errors']);
@@ -838,7 +841,10 @@ if (! defined( 'EXECUTE_BY_CRON' )) {
define( 'SYS_LANG_DIRECTION', $oServerConf->getLanDirection() );
if ((isset( $_SESSION['USER_LOGGED'] )) && (! (isset( $_GET['sid'] )))) {
if (preg_match("/msie/i", $_SERVER ['HTTP_USER_AGENT']) != 1 || $config['ie_cookie_lifetime'] == 1) {
if ((preg_match("/msie/i", $_SERVER ['HTTP_USER_AGENT']) != 1 ||
$config['ie_cookie_lifetime'] == 1) &&
(!(preg_match("/safari/i", $_SERVER ['HTTP_USER_AGENT']) == 1 && preg_match("/chrome/i", $_SERVER ['HTTP_USER_AGENT']) == 0) ||
$config['safari_cookie_lifetime'] == 1)) {
if (PHP_VERSION < 5.2) {
setcookie(session_name(), session_id(), time() + $timelife, '/', '; HttpOnly');
} else {
@@ -907,7 +913,10 @@ if (! defined( 'EXECUTE_BY_CRON' )) {
$_SESSION['USER_LOGGED'] = $aUser['USR_UID'];
$_SESSION['USR_USERNAME'] = $aUser['USR_USERNAME'];
$bRedirect = false;
if (preg_match("/msie/i", $_SERVER ['HTTP_USER_AGENT']) != 1 || $config['ie_cookie_lifetime'] == 1) {
if ((preg_match("/msie/i", $_SERVER ['HTTP_USER_AGENT']) != 1 ||
$config['ie_cookie_lifetime'] == 1) &&
(!(preg_match("/safari/i", $_SERVER ['HTTP_USER_AGENT']) == 1 && preg_match("/chrome/i", $_SERVER ['HTTP_USER_AGENT']) == 0) ||
$config['safari_cookie_lifetime'] == 1)) {
if (PHP_VERSION < 5.2) {
setcookie(session_name(), session_id(), time() + $timelife, '/', '; HttpOnly');
} else {