[geeklog-hg] geeklog: Fix $_CONF['cookiesecure'] during migration, in case we...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Thu Jun 4 13:17:23 EDT 2015


changeset 9604:db9a526e3116
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/db9a526e3116
user: Dirk Haun <dirk at haun-online.de>
date: Thu Jun 04 19:17:07 2015 +0200
description:
Fix $_CONF['cookiesecure'] during migration, in case we're switching from https to http or vice versa (bug #0001800)

diffstat:

 public_html/admin/install/migrate.php |  8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diffs (18 lines):

diff -r f200cfe01546 -r db9a526e3116 public_html/admin/install/migrate.php
--- a/public_html/admin/install/migrate.php	Wed Jun 03 01:36:36 2015 +0900
+++ b/public_html/admin/install/migrate.php	Thu Jun 04 19:17:07 2015 +0200
@@ -851,6 +851,14 @@
         $config->set('cookie_path', INST_guessCookiePath($_CONF['site_url']));
         $_CONF['cookie_path'] = INST_guessCookiePath($_CONF['site_url']);
 
+        if (substr($_CONF['site_url'], 0, 6) == 'https:') {
+            $config->set('cookiesecure', TRUE);
+            $_CONF['cookiesecure'] = 1;
+        } else {
+            $config->set('cookiesecure', FALSE);
+            $_CONF['cookiesecure'] = 0;
+        }
+
         // check the default theme
         $theme = '';
         if (empty($_CONF['theme'])) {



More information about the geeklog-cvs mailing list