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

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



Revision: 4454
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4454&view=rev
Author:   einhverfr
Date:     2012-03-13 13:45:50 +0000 (Tue, 13 Mar 2012)
Log Message:
-----------
Moving to Config::IniFiles which is in Fedora and Debian reposepos, because apparently Config::General doesn't handle ini files' section handlers.
Also, global parts of the ini file are now under section [main] because this module requires this

Modified Paths:
--------------
    trunk/LedgerSMB/Sysconfig.pm
    trunk/Makefile.PL
    trunk/dists/rpm/ledgersmb.spec
    trunk/ledgersmb.conf.default
    trunk/sql/modules/Menu.sql

Modified: trunk/LedgerSMB/Sysconfig.pm
===================================================================
--- trunk/LedgerSMB/Sysconfig.pm	2012-03-13 10:51:13 UTC (rev 4453)
+++ trunk/LedgerSMB/Sysconfig.pm	2012-03-13 13:45:50 UTC (rev 4454)
@@ -9,7 +9,7 @@
 use Cwd;
 
 # use LedgerSMB::Form;
-use Config::General;
+use Config::IniFiles;
 use DBI qw(:sql_types);
 binmode STDOUT, ':utf8';
 binmode STDERR, ':utf8';
@@ -99,8 +99,7 @@
 our %printer;
 
 our %config;
-my $cfg_h = new Config::General("ledgersmb.conf") or die;
-%config = $cfg_h->getall;
+tie %config, 'Config::IniFiles', (-file=> 'ledgersmb.conf' );
 
 # Root variables
 for my $var (
@@ -109,7 +108,7 @@
     return_accno no_db_str tempdir cache_templates)
   )
 {
-    ${$var} = $config{$var} if $config{$var};
+    ${$var} = $config{'main'}{$var} if $config{$var};
 }
 
 %printer = %{ $config{printers} } if $config{printers};

Modified: trunk/Makefile.PL
===================================================================
--- trunk/Makefile.PL	2012-03-13 10:51:13 UTC (rev 4453)
+++ trunk/Makefile.PL	2012-03-13 13:45:50 UTC (rev 4454)
@@ -27,7 +27,7 @@
 requires 'Encode';
 requires 'Time::Local';
 requires 'Cwd';
-requires 'Config::General';
+requires 'Config::IniFiles';
 requires 'MIME::Lite';
 requires 'Template' => '2.14';
 requires 'Error';

Modified: trunk/dists/rpm/ledgersmb.spec
===================================================================
--- trunk/dists/rpm/ledgersmb.spec	2012-03-13 10:51:13 UTC (rev 4453)
+++ trunk/dists/rpm/ledgersmb.spec	2012-03-13 13:45:50 UTC (rev 4454)
@@ -20,7 +20,7 @@
 Requires: perl-IO-String 
 Requires: perl-Math-BigInt-GMP
 Requires: perl-Log-Log4perl perl-DateTime perl-DateTime-Format-Strptime
-Requires: perl-Config-General perl-Moose perl-Number-Format
+Requires: perl-Config-IniFiles perl-Moose perl-Number-Format
 BuildRequires: perl
 # avoid bogus autodetection of perl modules:
 AutoReqProv: no

Modified: trunk/ledgersmb.conf.default
===================================================================
--- trunk/ledgersmb.conf.default	2012-03-13 10:51:13 UTC (rev 4453)
+++ trunk/ledgersmb.conf.default	2012-03-13 13:45:50 UTC (rev 4454)
@@ -1,3 +1,4 @@
+[main]
 auth = DB
 logging  = 0
 #Be aware of tempdir setting.If client_browser and server_apache on same machine, sharing tmp-dir , problems 'Permission denied' if server tries to write temp-file wich already exists as client-owned

Modified: trunk/sql/modules/Menu.sql
===================================================================
--- trunk/sql/modules/Menu.sql	2012-03-13 10:51:13 UTC (rev 4453)
+++ trunk/sql/modules/Menu.sql	2012-03-13 13:45:50 UTC (rev 4454)
@@ -37,7 +37,7 @@
                WHERE n.id IN (select node_id 
                                 FROM menu_acl acl
                           LEFT JOIN pg_roles pr on pr.rolname = acl.role_name
-                               WHERE CASE WHEN rolname 
+                               WHERE CASE WHEN role_name 
                                                            ilike 'public'
                                                       THEN true
                                                       WHEN rolname IS NULL

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