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

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



Revision: 931
          http://svn.sourceforge.net/ledger-smb/?rev=931&view=rev
Author:   einhverfr
Date:     2007-03-17 14:05:28 -0700 (Sat, 17 Mar 2007)

Log Message:
-----------
nextsub is now treated the same way as sub, and special handling for ->{action}'s starting with ( |.) is removed

Modified Paths:
--------------
    trunk/LedgerSMB/Form.pm
    trunk/menu.pl

Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm	2007-03-17 21:03:39 UTC (rev 930)
+++ trunk/LedgerSMB/Form.pm	2007-03-17 21:05:28 UTC (rev 931)
@@ -65,6 +65,8 @@
 	if (substr($self->{action}, 0, 1) !~ /( |\.)/) {
 		$self->{action} = lc $self->{action};
 		$self->{action} =~ s/( |-|,|\#|\/|\.$)/_/g;
+		$self->{nextsub} = lc $self->{nextsub};
+		$self->{nextsub} =~ s/( |-|,|\#|\/|\.$)/_/g;
 	}
 
 	$self->{menubar} = 1 if $self->{path} =~ /lynx/i;
@@ -76,7 +78,7 @@
 
 	bless $self, $type;
 
-	if ($self->{action} =~ /:/){
+	if (($self->{action} =~ /:/) || ($self->{nextsub} =~ /:/)){
 		$self->error("Access Denied");
 	}
 	$self;

Modified: trunk/menu.pl
===================================================================
--- trunk/menu.pl	2007-03-17 21:03:39 UTC (rev 930)
+++ trunk/menu.pl	2007-03-17 21:05:28 UTC (rev 931)
@@ -137,11 +137,7 @@
 
 	&check_password;
 
-	if (substr($form->{action}, 0, 1) =~ /( |\.)/) {
-		&{ $form->{nextsub} };
-	} else {
-		&{ $form->{action} };
-	}
+	&{ $form->{action} };
 
 } else {
 	$form->error(__FILE__.':'.__LINE__.': '.$locale->text('action= not defined!'));


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