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

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



Revision: 2519
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2519&view=rev
Author:   einhverfr
Date:     2009-03-20 00:37:26 +0000 (Fri, 20 Mar 2009)

Log Message:
-----------
Fix for menus with Javascript turned off

Modified Paths:
--------------
    trunk/LedgerSMB.pm
    trunk/UI/menu/expanding.html
    trunk/scripts/menu.pl

Modified: trunk/LedgerSMB.pm
===================================================================
--- trunk/LedgerSMB.pm	2009-03-19 19:07:37 UTC (rev 2518)
+++ trunk/LedgerSMB.pm	2009-03-20 00:37:26 UTC (rev 2519)
@@ -192,6 +192,9 @@
 
     }
 
+    $ENV{SCRIPT_NAME} =~ m/([^\/\\]*.pl)\?*.*$/;
+    $self->{script} = $1;
+
     if ( ( $self->{script} =~ m#(\.\.|\\|/)# ) ) {
         $self->error("Access Denied");
     }

Modified: trunk/UI/menu/expanding.html
===================================================================
--- trunk/UI/menu/expanding.html	2009-03-19 19:07:37 UTC (rev 2518)
+++ trunk/UI/menu/expanding.html	2009-03-20 00:37:26 UTC (rev 2519)
@@ -65,7 +65,7 @@
 					?>id=<?lsmb item.id
 					?>&amp;open=<?lsmb open 
 				?><?lsmb END ?>"
-				<?lsmb IF (item.module != 'menu.pl') &&
+				<?lsmb IF item.module && (item.module != 'menu.pl') &&
 					('login.pl' != item.module) ?> 
 					target = "main_window" 
 				<?lsmb ELSIF ('New Window' == item.label) ?>

Modified: trunk/scripts/menu.pl
===================================================================
--- trunk/scripts/menu.pl	2009-03-19 19:07:37 UTC (rev 2518)
+++ trunk/scripts/menu.pl	2009-03-20 00:37:26 UTC (rev 2519)
@@ -113,7 +113,6 @@
     $request->{'open'} =~ s/:+/:/g;
 
     
-
     my $menu = LedgerSMB::DBObject::Menu->new({base => $request});
     $menu->generate();
     for my $item (@{$menu->{menu_items}}){


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