[geeklog-cvs] geeklog: Changed the 'default_perm_cookie_timeout' config option...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sat Jan 2 11:30:53 EST 2010


changeset 7572:576bacb11108
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/576bacb11108
user: Dirk Haun <dirk at haun-online.de>
date: Sat Jan 02 10:00:59 2010 +0100
description:
Changed the 'default_perm_cookie_timeout' config option to a dropdown so that it's consistent with the "Remember me for" dropdown in My Account

diffstat:

 public_html/admin/configuration.php          |  26 +++++++++++++++++++++++++-
 public_html/admin/install/config-install.php |   4 ++--
 public_html/docs/history                     |   3 +++
 sql/updates/mssql_1.6.1_to_1.6.2.php         |   3 +++
 sql/updates/mysql_1.6.1_to_1.6.2.php         |   3 +++
 5 files changed, 36 insertions(+), 3 deletions(-)

diffs (105 lines):

diff -r dc6b98fef467 -r 576bacb11108 public_html/admin/configuration.php
--- a/public_html/admin/configuration.php	Fri Jan 01 23:13:54 2010 +0100
+++ b/public_html/admin/configuration.php	Sat Jan 02 10:00:59 2010 +0100
@@ -8,9 +8,10 @@
 // |                                                                           |
 // | Loads the administration UI and sends input to config.class               |
 // +---------------------------------------------------------------------------+
-// | Copyright (C) 2007-2009 by the following authors:                         |
+// | Copyright (C) 2007-2010 by the following authors:                         |
 // |                                                                           |
 // | Authors: Aaron Blankstein  - kantai AT gmail DOT com                      |
+// |          Dirk Haun         - dirk AT haun-online DOT de                   |
 // +---------------------------------------------------------------------------+
 // |                                                                           |
 // | This program is free software; you can redistribute it and/or             |
@@ -98,6 +99,29 @@
     return array_flip(TimeZoneConfig::listAvailableTimeZones());
 }
 
+/**
+* Helper function: Provide dropdown for Permanent Cookie Timeout
+*
+* @return   array   Array of (description, timeout-in-seconds) pairs
+*
+*/
+function configmanager_select_default_perm_cookie_timeout_helper()
+{
+    global $_TABLES;
+
+    $retval = array();
+
+    $result = DB_query("SELECT cc_value,cc_descr FROM {$_TABLES['cookiecodes']}");
+    $num_values = DB_numRows($result);
+
+    for ($i = 0; $i < $num_values; $i++) {
+        list($cc_value, $cc_descr) = DB_fetchArray($result);
+        $retval[$cc_descr] = $cc_value;
+    }
+
+    return $retval;
+}
+
 
 // MAIN
 $display = '';
diff -r dc6b98fef467 -r 576bacb11108 public_html/admin/install/config-install.php
--- a/public_html/admin/install/config-install.php	Fri Jan 01 23:13:54 2010 +0100
+++ b/public_html/admin/install/config-install.php	Sat Jan 02 10:00:59 2010 +0100
@@ -8,7 +8,7 @@
 // |                                                                           |
 // | Initial configuration setup.                                              |
 // +---------------------------------------------------------------------------+
-// | Copyright (C) 2007-2009 by the following authors:                         |
+// | Copyright (C) 2007-2010 by the following authors:                         |
 // |                                                                           |
 // | Authors: Aaron Blankstein  - kantai AT gmail DOT com                      |
 // +---------------------------------------------------------------------------+
@@ -306,7 +306,7 @@
     $c->add('cookie_tzid','timezone','text',7,30,NULL,575,TRUE);
     $c->add('cookie_anon_name','anon_name','text',7,30,NULL,577,TRUE);
     $c->add('cookie_ip',0,'select',7,30,0,580,TRUE);
-    $c->add('default_perm_cookie_timeout',28800,'text',7,30,NULL,590,TRUE);
+    $c->add('default_perm_cookie_timeout',28800,'select',7,30,NULL,590,TRUE);
     $c->add('session_cookie_timeout',7200,'text',7,30,NULL,600,TRUE);
     $c->add('cookie_path','/','text',7,30,NULL,610,TRUE);
     $c->add('cookiedomain','','text',7,30,NULL,620,TRUE);
diff -r dc6b98fef467 -r 576bacb11108 public_html/docs/history
--- a/public_html/docs/history	Fri Jan 01 23:13:54 2010 +0100
+++ b/public_html/docs/history	Sat Jan 02 10:00:59 2010 +0100
@@ -3,6 +3,9 @@
 ??? ??, 2010 (1.6.2)
 ------------
 
+- Changed the 'default_perm_cookie_timeout' config option to a dropdown so that
+  it's consistent with the "Remember me for" dropdown in My Account [Dirk]
+- Raised minimum required MySQL version to MySQL 4.0.18 [Dirk]
 - Fixed a non-feature where canceling out of the story editor would select that
   story's topic in the admin's list of stories [Dirk]
 - Fixed problem uninstalling plugins - missing globals (bug #0001048)
diff -r dc6b98fef467 -r 576bacb11108 sql/updates/mssql_1.6.1_to_1.6.2.php
--- a/sql/updates/mssql_1.6.1_to_1.6.2.php	Fri Jan 01 23:13:54 2010 +0100
+++ b/sql/updates/mssql_1.6.1_to_1.6.2.php	Sat Jan 02 10:00:59 2010 +0100
@@ -4,6 +4,9 @@
 $_SQL[] = "UPDATE {$_TABLES['conf_values']} SET type = '%select', selectionArray = 24 WHERE name = 'menu_elements' AND group_name = 'Core'";
 $_SQL[] = "UPDATE {$_TABLES['conf_values']} SET type = '%select', selectionArray = 25 WHERE name = 'notification' AND group_name = 'Core'";
 
+// make $_CONF['default_perm_cookie_timeout'] option a dropdown
+$_SQL[] = "UPDATE {$_TABLES['conf_values']} SET type = 'select' WHERE name = 'default_perm_cookie_timeout' AND group_name = 'Core'";
+
 // make room to store IPv6 addresses
 $_SQL[] = "ALTER TABLE {$_TABLES['comments']} ALTER COLUMN [ipaddress] varchar(39) NOT NULL";
 $_SQL[] = "ALTER TABLE {$_TABLES['commentsubmissions']} ALTER COLUMN [ipaddress] varchar(39) NOT NULL";
diff -r dc6b98fef467 -r 576bacb11108 sql/updates/mysql_1.6.1_to_1.6.2.php
--- a/sql/updates/mysql_1.6.1_to_1.6.2.php	Fri Jan 01 23:13:54 2010 +0100
+++ b/sql/updates/mysql_1.6.1_to_1.6.2.php	Sat Jan 02 10:00:59 2010 +0100
@@ -4,6 +4,9 @@
 $_SQL[] = "UPDATE {$_TABLES['conf_values']} SET type = '%select', selectionArray = 24 WHERE name = 'menu_elements' AND group_name = 'Core'";
 $_SQL[] = "UPDATE {$_TABLES['conf_values']} SET type = '%select', selectionArray = 25 WHERE name = 'notification' AND group_name = 'Core'";
 
+// make $_CONF['default_perm_cookie_timeout'] option a dropdown
+$_SQL[] = "UPDATE {$_TABLES['conf_values']} SET type = 'select' WHERE name = 'default_perm_cookie_timeout' AND group_name = 'Core'";
+
 // make room to store IPv6 addresses
 $_SQL[] = "ALTER TABLE {$_TABLES['comments']} CHANGE ipaddress ipaddress varchar(39) NOT NULL default ''";
 $_SQL[] = "ALTER TABLE {$_TABLES['commentsubmissions']} CHANGE ipaddress ipaddress varchar(39) NOT NULL default ''";



More information about the geeklog-cvs mailing list