From b197f985e0ca1e5eedd17cdcc345181423fae64b Mon Sep 17 00:00:00 2001 From: m-bene Date: Thu, 1 May 2014 09:53:45 +0200 Subject: [PATCH] make expiry date relative (~10years) --- web/includes/config.php.in | 5 ----- web/index.php | 2 +- web/skins/classic/views/options.php | 2 +- web/skins/flat/views/options.php | 2 +- 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/web/includes/config.php.in b/web/includes/config.php.in index b434ea3a0..be956d75c 100644 --- a/web/includes/config.php.in +++ b/web/includes/config.php.in @@ -114,11 +114,6 @@ define( "SCALE_BASE", 100 ); // The additional scalin define( "STRF_FMT_DATETIME_DB", "%Y-%m-%d %H:%M:%S" ); // Strftime format for database queries, don't change define( "MYSQL_FMT_DATETIME_SHORT", "%y/%m/%d %H:%i:%S" ); // MySQL date_format shorter format for dates with time -// -// zmSkin Cookie validity -// -define ( "ZMSKIN_COOKIE_EXPIRES", 2147483647 ); - require_once( 'database.php' ); loadConfig(); diff --git a/web/index.php b/web/index.php index c960792f5..0fb8fd158 100644 --- a/web/index.php +++ b/web/index.php @@ -79,7 +79,7 @@ session_start(); if ( !isset($_SESSION['skin']) || isset($_REQUEST['skin']) ) { $_SESSION['skin'] = $skin; - setcookie( "zmSkin", $skin, ZMSKIN_COOKIE_EXPIRES ); + setcookie( "zmSkin", $skin, time()+3600*24*30*12*10 ); } require_once( 'includes/config.php' ); diff --git a/web/skins/classic/views/options.php b/web/skins/classic/views/options.php index 7310d6118..4efcbe5f0 100644 --- a/web/skins/classic/views/options.php +++ b/web/skins/classic/views/options.php @@ -85,7 +85,7 @@ foreach ( $tabs as $name=>$value ) if($tab == 'skins') { $current_skin = $_COOKIE['zmSkin']; if (isset($_GET['skin-choice'])) { - setcookie('zmSkin',$_GET['skin-choice'], ZMSKIN_COOKIE_EXPIRES ); + setcookie('zmSkin',$_GET['skin-choice'], time()+3600*24*30*12*10 ); //header("Location: index.php?view=options&tab=skins&reset_parent=1"); echo ""; } diff --git a/web/skins/flat/views/options.php b/web/skins/flat/views/options.php index 7310d6118..4efcbe5f0 100644 --- a/web/skins/flat/views/options.php +++ b/web/skins/flat/views/options.php @@ -85,7 +85,7 @@ foreach ( $tabs as $name=>$value ) if($tab == 'skins') { $current_skin = $_COOKIE['zmSkin']; if (isset($_GET['skin-choice'])) { - setcookie('zmSkin',$_GET['skin-choice'], ZMSKIN_COOKIE_EXPIRES ); + setcookie('zmSkin',$_GET['skin-choice'], time()+3600*24*30*12*10 ); //header("Location: index.php?view=options&tab=skins&reset_parent=1"); echo ""; }