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

SF.net SVN: ledger-smb:[4453] trunk



Revision: 4453
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4453&view=rev
Author:   einhverfr
Date:     2012-03-13 10:51:13 +0000 (Tue, 13 Mar 2012)
Log Message:
-----------
Changing all auth calls for setup.pl from template1 to postgres
cleaning up menu also

Modified Paths:
--------------
    trunk/Changelog
    trunk/LedgerSMB/Database.pm
    trunk/sql/Pg-database.sql

Modified: trunk/Changelog
===================================================================
--- trunk/Changelog	2012-03-13 09:54:44 UTC (rev 4452)
+++ trunk/Changelog	2012-03-13 10:51:13 UTC (rev 4453)
@@ -14,6 +14,7 @@
 * Dynatable forms obtained through GET now show link back to form (Chris T)
 * LedgerSMB->error and Form->error now show db version and company (Chris T)
 * Simpler use of Log::Log4perl instead of LedgerSMB::Log (Chris T)
+* Changing all auth calls to hit postgres db instead of template1 (Chris T)
 
 Customer/Vendor Handling 
 * Added sales tax id and license number fields for companies (Chris T)

Modified: trunk/LedgerSMB/Database.pm
===================================================================
--- trunk/LedgerSMB/Database.pm	2012-03-13 09:54:44 UTC (rev 4452)
+++ trunk/LedgerSMB/Database.pm	2012-03-13 10:51:13 UTC (rev 4453)
@@ -275,9 +275,9 @@
          { AutoCommit => 0, PrintError => $logger->is_warn(), }
     );
     if (!$dbh){ # Could not connect, try to validate existance by connecting
-                # to template1 and checking
+                # to postgres and checking
            $dbh = DBI->connect(
-                   "dbi:Pg:dbname=template1", 
+                   "dbi:Pg:dbname=postgres", 
                    "$creds->{login}", "$creds->{password}", { AutoCommit => 0 }
             );
            return $retval unless $dbh;
@@ -365,7 +365,7 @@
     my $self = shift @_;
     my $creds = LedgerSMB::Auth->get_credentials();
     my $dbh = DBI->connect(
-        "dbi:Pg:dbname=template1", 
+        "dbi:Pg:dbname=postgres", 
          "$creds->{login}", "$creds->{password}", { AutoCommit => 0 }
     );
     my ($version) = $dbh->selectrow_array('SELECT version()');
@@ -378,7 +378,7 @@
 =item $db->create();
 
 Creates a database and loads the contrib files.  This is done from template0, 
-meaning nothing added to template1 will be found in this database.  This was 
+meaning nothing added to postgres will be found in this database.  This was 
 necessary as a workaround for issues on some Debian systems.
 
 Returns true if successful, false of not.  Creates a log called dblog in the 
@@ -403,7 +403,7 @@
     # Hat tip:  irc user nwnw -- CT
 
     use DBI;
-    my $dbh = DBI->connect('dbi:Pg:dbname=template1');
+    my $dbh = DBI->connect('dbi:Pg:dbname=postgres');
 
     $dbh->{RaiseError} = 1;
     $dbh->{AutoCommit} = 1;

Modified: trunk/sql/Pg-database.sql
===================================================================
--- trunk/sql/Pg-database.sql	2012-03-13 09:54:44 UTC (rev 4452)
+++ trunk/sql/Pg-database.sql	2012-03-13 10:51:13 UTC (rev 4453)
@@ -2468,14 +2468,11 @@
 13	Reports	11	2
 14	Search	13	1
 15	History	13	2
-16	Point of Sale	0	2
-17	Sale	16	1
-18	Open	16	2
-19	Receipts	16	3
-20	Close Till	16	4
+16	Budgets	109	6
+17	Add  Budget	16	1
+18	Search	16	2
 21	AP	0	3
 22	Add Transaction	21	1
-145	Add Department	144	1
 25	Transactions	24	1
 26	Outstanding	24	2
 27	AP Aging	24	3
@@ -2490,7 +2487,6 @@
 38	Payment	35	3
 223	Use Overpayment	35	4
 37	Use AR Overpayment	35	2
-146	List Departments	144	2
 42	Receipts	41	1
 43	Payments	41	2
 44	Reconciliation	41	3
@@ -2648,7 +2644,7 @@
 153	SIC	128	12
 150	Language	128	11
 147	Type of Business	128	10
-144	Departments	128	9
+144	Reporting Units	128	9
 141	Warehouses	128	8
 136	Chart of Accounts	128	7
 220	Add User	219	1
@@ -2772,16 +2768,10 @@
 15	db	customer	37
 15	action	history	33
 16	menu	1	38
-17	module	ps.pl	39
-17	action	add	40
-17	nextsub	openinvoices	41
-18	action	openinvoices	42
-18	module	ps.pl	43
-19	module	ps.pl	44
-19	action	receipts	46
-20	module	ps.pl	47
-20	action	till_closing	48
-20	pos	true	49
+17	module	budgets.pl	39
+17	action	new_budget	40
+18	action	begin_search	42
+18	module	budgets.pl	43
 21	menu	1	50
 22	action	add	52
 22	module	ap.pl	51
@@ -3076,10 +3066,8 @@
 143	module	am.pl	365
 142	action	add_warehouse	366
 143	action	list_warehouse	367
-145	module	am.pl	368
-146	module	am.pl	369
-145	action	add_department	370
-146	action	list_department	371
+144	module	business_unit.pl	368
+144	action	list_classes	370
 147	menu	1	372
 148	module	am.pl	373
 149	module	am.pl	374
@@ -3239,7 +3227,6 @@
 192	new	1	531
 0	menu	1	535
 136	menu	1	536
-144	menu	1	537
 195	action	add	540
 195	module	is.pl	541
 196	action	add	543

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