[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [2152] trunk
- Subject: SF.net SVN: ledger-smb: [2152] trunk
- From: ..hidden..
- Date: Mon, 19 May 2008 15:36:59 -0700
Revision: 2152
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2152&view=rev
Author: einhverfr
Date: 2008-05-19 15:36:45 -0700 (Mon, 19 May 2008)
Log Message:
-----------
Correcting problem in DBObject.pm constructor
Correcting method->procedure mappings for DBD::Pg 2.0 and above.
Modified Paths:
--------------
trunk/LedgerSMB/DBObject.pm
trunk/LedgerSMB/Template.pm
trunk/LedgerSMB.pm
trunk/lsmb-request.pl
Modified: trunk/LedgerSMB/DBObject.pm
===================================================================
--- trunk/LedgerSMB/DBObject.pm 2008-05-18 00:53:09 UTC (rev 2151)
+++ trunk/LedgerSMB/DBObject.pm 2008-05-19 22:36:45 UTC (rev 2152)
@@ -65,7 +65,7 @@
$self->error('Mergelist not set');
}
else {
- @mergelist = [];
+ @mergelist = ();
}
if ( !$base->isa('LedgerSMB') ) {
$self->error("Constructor called without LedgerSMB object arg");
@@ -122,19 +122,16 @@
my $args = $ref->{proargnames};
my @proc_args;
- $ref->{pronargs} = 0 unless defined $ref->{pronargs};
- if ($ref->{pronargs}){
- $args =~ s/\{(.*)\}/$1/;
- @proc_args = split /,/, $args if $args;
- }
-
+
if ( !$ref->{proname} ) { # no such function
$self->error( "No such function: $funcname");
# die;
}
-
- if ($args) {
+ $ref->{pronargs} = 0 unless defined $ref->{pronargs};
+
+ @proc_args = $self->_parse_array($args);
+ if (@proc_args) {
for my $arg (@proc_args) {
if ( $arg =~ s/^in_// ) {
push @call_args, $self->{$arg};
@@ -249,14 +246,14 @@
sub _parse_array {
my ($self, $value) = @_;
return @$value if ref $value eq 'ARRAY';
-
+ return if !defined $value;
my $next;
my $separator;
my @return_array;
while ($value ne '{}') {
- my $next = "";
- my $separator = "";
+ $next = "";
+ $separator = "";
if ($value =~ /^\{"/){
while ($next eq "" or ($next =~ /\\".$/)){
$value =~ s/^\{("[^"]*".)/\{/;
Modified: trunk/LedgerSMB/Template.pm
===================================================================
--- trunk/LedgerSMB/Template.pm 2008-05-18 00:53:09 UTC (rev 2151)
+++ trunk/LedgerSMB/Template.pm 2008-05-19 22:36:45 UTC (rev 2152)
@@ -235,6 +235,7 @@
throw Error::Simple "Invalid format";
}
my $format = "LedgerSMB::Template::$self->{format}";
+
# if ($self->{myconfig}){
# $self->_preprocess($vars);
# }
Modified: trunk/LedgerSMB.pm
===================================================================
--- trunk/LedgerSMB.pm 2008-05-18 00:53:09 UTC (rev 2151)
+++ trunk/LedgerSMB.pm 2008-05-19 22:36:45 UTC (rev 2152)
@@ -197,11 +197,12 @@
if (!$self->{script}) {
$self->{script} = 'login.pl';
}
- if ($self->{action} eq 'migrate_user'){
- return $self;
- }
+# if ($self->{action} eq 'migrate_user'){
+# return $self;
+# }
if ($self->{script} eq 'login.pl' &&
- ($self->{action} eq 'authenticate' || !$self->{action})){
+ ($self->{action} eq 'authenticate' || $self->{action} eq '__default'
+ || !$self->{action})){
return $self;
}
if (!$self->{company} && $self->is_run_mode('cgi', 'mod_perl')){
Modified: trunk/lsmb-request.pl
===================================================================
--- trunk/lsmb-request.pl 2008-05-18 00:53:09 UTC (rev 2151)
+++ trunk/lsmb-request.pl 2008-05-19 22:36:45 UTC (rev 2152)
@@ -49,10 +49,9 @@
&call_script( $script, $request );
sub call_script {
-
+
my $script = shift @_;
my $request = shift @_;
-
eval { require "scripts/$script" }
|| $request->error($locale->text('Unable to open script') . ": scripts/$script : $!");
$script =~ s/\.pl$//;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.