[geeklog-cvs] geeklog: Added an ISO 8601-ish format to the gl_dateformats table
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sun Feb 1 07:35:08 EST 2009
details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/29e633449941
changeset: 6744:29e633449941
user: Dirk Haun <dirk at haun-online.de>
date: Sun Feb 01 10:57:08 2009 +0100
description:
Added an ISO 8601-ish format to the gl_dateformats table
diffstat:
6 files changed, 32 insertions(+)
public_html/admin/install/lib-upgrade.php | 1 +
public_html/docs/history | 1 +
sql/mssql_tableanddata.php | 1 +
sql/mysql_tableanddata.php | 1 +
sql/updates/mssql_1.5.2_to_1.6.0.php | 14 ++++++++++++++
sql/updates/mysql_1.5.2_to_1.6.0.php | 14 ++++++++++++++
diffs (88 lines):
diff -r 99c4995f2ef1 -r 29e633449941 public_html/admin/install/lib-upgrade.php
--- a/public_html/admin/install/lib-upgrade.php Sun Feb 01 09:49:03 2009 +0100
+++ b/public_html/admin/install/lib-upgrade.php Sun Feb 01 10:57:08 2009 +0100
@@ -465,6 +465,7 @@
update_ConfValues();
upgrade_addPluginPermissions();
+ upgrade_addIsoFormat();
$current_gl_version = '1.6.0';
$_SQL = '';
diff -r 99c4995f2ef1 -r 29e633449941 public_html/docs/history
--- a/public_html/docs/history Sun Feb 01 09:49:03 2009 +0100
+++ b/public_html/docs/history Sun Feb 01 10:57:08 2009 +0100
@@ -11,6 +11,7 @@
+ (TBD) Comment moderation and editable comments, by Jared Wenerd
Other changes:
+- Added an ISO 8601-ish format to the gl_dateformats table [Dirk]
- Let users with user.mail permissions only email groups that they are in
themselves [Dirk]
- Gave the Groups and User editors a facelift. Requires a new template file,
diff -r 99c4995f2ef1 -r 29e633449941 sql/mssql_tableanddata.php
--- a/sql/mssql_tableanddata.php Sun Feb 01 09:49:03 2009 +0100
+++ b/sql/mssql_tableanddata.php Sun Feb 01 10:57:08 2009 +0100
@@ -1234,6 +1234,7 @@
$_SQL[] = "INSERT INTO {$_TABLES['dateformats']} (dfid, format, description) VALUES (16,'%y-%m-%d %I:%M','99-03-21 10:00')";
$_SQL[] = "INSERT INTO {$_TABLES['dateformats']} (dfid, format, description) VALUES (17,'%d/%m/%y %H:%M','21/03/99 22:00')";
$_SQL[] = "INSERT INTO {$_TABLES['dateformats']} (dfid, format, description) VALUES (18,'%a %d %b %I:%M%p','Sun 21 Mar 10:00PM')";
+$_SQL[] = "INSERT INTO {$_TABLES['dateformats']} (dfid, format, description) VALUES (19,'%Y-%m-%d %H:%M','1999-03-21 22:00')";
$_SQL[] = "INSERT INTO {$_TABLES['featurecodes']} (code, name) VALUES (0,'Not Featured')";
$_SQL[] = "INSERT INTO {$_TABLES['featurecodes']} (code, name) VALUES (1,'Featured')";
diff -r 99c4995f2ef1 -r 29e633449941 sql/mysql_tableanddata.php
--- a/sql/mysql_tableanddata.php Sun Feb 01 09:49:03 2009 +0100
+++ b/sql/mysql_tableanddata.php Sun Feb 01 10:57:08 2009 +0100
@@ -553,6 +553,7 @@
$_DATA[] = "INSERT INTO {$_TABLES['dateformats']} (dfid, format, description) VALUES (16,'%y-%m-%d %I:%M','99-03-21 10:00') ";
$_DATA[] = "INSERT INTO {$_TABLES['dateformats']} (dfid, format, description) VALUES (17,'%d/%m/%y %H:%M','21/03/99 22:00') ";
$_DATA[] = "INSERT INTO {$_TABLES['dateformats']} (dfid, format, description) VALUES (18,'%a %d %b %I:%M%p','Sun 21 Mar 10:00PM') ";
+$_DATA[] = "INSERT INTO {$_TABLES['dateformats']} (dfid, format, description) VALUES (19,'%Y-%m-%d %H:%M','1999-03-21 22:00') ";
$_DATA[] = "INSERT INTO {$_TABLES['featurecodes']} (code, name) VALUES (0,'Not Featured') ";
$_DATA[] = "INSERT INTO {$_TABLES['featurecodes']} (code, name) VALUES (1,'Featured') ";
diff -r 99c4995f2ef1 -r 29e633449941 sql/updates/mssql_1.5.2_to_1.6.0.php
--- a/sql/updates/mssql_1.5.2_to_1.6.0.php Sun Feb 01 09:49:03 2009 +0100
+++ b/sql/updates/mssql_1.5.2_to_1.6.0.php Sun Feb 01 10:57:08 2009 +0100
@@ -48,4 +48,18 @@
}
}
+/**
+ * Add ISO 8601-ish date/time format
+ *
+ */
+function upgrade_addIsoFormat()
+{
+ global $_TABLES;
+
+ $maxid = DB_getItem($_TABLES['dateformats'], 'MAX(dfid)');
+ $maxid++;
+ DB_save($_TABLES['dateformats'], 'dfid,format,description',
+ "$maxid,'%Y-%m-%d %H:%M','1999-03-21 22:00'");
+}
+
?>
diff -r 99c4995f2ef1 -r 29e633449941 sql/updates/mysql_1.5.2_to_1.6.0.php
--- a/sql/updates/mysql_1.5.2_to_1.6.0.php Sun Feb 01 09:49:03 2009 +0100
+++ b/sql/updates/mysql_1.5.2_to_1.6.0.php Sun Feb 01 10:57:08 2009 +0100
@@ -49,4 +49,18 @@
}
}
+/**
+ * Add ISO 8601-ish date/time format
+ *
+ */
+function upgrade_addIsoFormat()
+{
+ global $_TABLES;
+
+ $maxid = DB_getItem($_TABLES['dateformats'], 'MAX(dfid)');
+ $maxid++;
+ DB_save($_TABLES['dateformats'], 'dfid,format,description',
+ "$maxid,'%Y-%m-%d %H:%M','1999-03-21 22:00'");
+}
+
?>
More information about the geeklog-cvs
mailing list