[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[5834] branches/1.3



Revision: 5834
          http://sourceforge.net/p/ledger-smb/code/5834
Author:   einhverfr
Date:     2013-05-20 06:21:21 +0000 (Mon, 20 May 2013)
Log Message:
-----------
Fixing user management/datestyle issues per changelog, merged from 5831 and 5832 in trunk

Modified Paths:
--------------
    branches/1.3/Changelog
    branches/1.3/sql/modules/Fixes.sql
    branches/1.3/sql/modules/admin.sql

Modified: branches/1.3/Changelog
===================================================================
--- branches/1.3/Changelog	2013-05-20 05:33:38 UTC (rev 5833)
+++ branches/1.3/Changelog	2013-05-20 06:21:21 UTC (rev 5834)
@@ -11,6 +11,7 @@
 * Fixed tax boxes cannot be all unset (Chris T, 818)
 * Project, serial number, and notes now appear initially (Chris T, 824)
 * Fixed double-counting first date's balance on gl report (Chris T)
+* Fixed user creation failing on some timezones with some datestyles (Chris T)
 
 Changelog for 1.3.32
 * Fixed em-dash handling for pdfs (Chris T)

Modified: branches/1.3/sql/modules/Fixes.sql
===================================================================
--- branches/1.3/sql/modules/Fixes.sql	2013-05-20 05:33:38 UTC (rev 5833)
+++ branches/1.3/sql/modules/Fixes.sql	2013-05-20 06:21:21 UTC (rev 5834)
@@ -523,3 +523,8 @@
 DELETE FROM menu_acl WHERE node_id = 60 AND exists (select 1 from menu_attribute where node_id = 60 and attribute = 'menu');
 
 COMMIT;
+
+BEGIN;
+ALTER FUNCTION admin__save_user(int, int, text, text, bool) SET datestyle = 'ISO,YMD';
+ALTER FUNCTION user__change_password(text) SET datestyle = 'ISO,YMD';
+COMMIT;

Modified: branches/1.3/sql/modules/admin.sql
===================================================================
--- branches/1.3/sql/modules/admin.sql	2013-05-20 05:33:38 UTC (rev 5833)
+++ branches/1.3/sql/modules/admin.sql	2013-05-20 06:21:21 UTC (rev 5834)
@@ -301,7 +301,7 @@
 within on week.$$;
 
 CREATE OR REPLACE FUNCTION user__change_password(in_new_password text)
-returns int as
+returns int SET datestyle = 'ISO, YMD' as
 $$
 DECLARE
 	t_expires timestamp;
@@ -336,7 +336,9 @@
     in_username text, 
     in_password TEXT,
     in_import BOOL
-) returns int AS $$
+) returns int 
+SET datestyle = 'ISO, YMD'
+AS $$
     DECLARE
     
         a_user users;

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.