fix botched backport from 1.9
authorivan <ivan>
Mon, 20 Apr 2009 00:20:29 +0000 (00:20 +0000)
committerivan <ivan>
Mon, 20 Apr 2009 00:20:29 +0000 (00:20 +0000)
httemplate/elements/header.html

index ba45617..3843a0f 100644 (file)
@@ -165,7 +165,7 @@ input.fsblackbuttonselected {
         </TD>
 
         <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="right">
-% if ( $FS::CurrentUser::CurrentUser->access_right('List customers') ) {
+% if ( $curuser->access_right('List customers') ) {
           <FORM ACTION="<%$fsurl%>search/cust_main.cgi" METHOD="GET" STYLE="margin:0">
             <INPUT NAME="search_cust" TYPE="text" VALUE="(cust #, name, company or phone)" SIZE="28" onFocus="clearhint_search_cust(this);" onClick="clearhint_search_cust(this);" STYLE="vertical-align:bottom;text-align:right"><BR>
             <A HREF="<%$fsurl%>search/report_cust_main.html" STYLE="color: #ffffff; font-size: 70%">Advanced</A>
@@ -186,11 +186,11 @@ input.fsblackbuttonselected {
         </TD>
 
         <TD COLSPAN=1 BGCOLOR="#000000" ALIGN="right">
-% if ( $FS::CurrentUser::CurrentUser->access_right('View invoices') ) { 
+% if ( $curuser->access_right('View invoices') ) { 
 
             <FORM ACTION="<%$fsurl%>search/cust_bill.html" METHOD="GET" STYLE="margin:0;display:inline">
               <INPUT NAME="invnum" TYPE="text" VALUE="(inv #)" SIZE="4" onFocus="clearhint_search_invoice(this);" onClick="clearhint_search_invoice(this);" STYLE="vertical-align:bottom;text-align:right;margin-bottom:1px">
-%   if ( $FS::CurrentUser::CurrentUser->access_right('List invoices') ) { 
+%   if ( $curuser->access_right('List invoices') ) { 
 
                 <A HREF="<%$fsurl%>search/report_cust_bill.html" STYLE="color: #ffffff; font-size: 70%">Advanced</A>
 %   } 
@@ -268,8 +268,11 @@ input.fsblackbuttonselected {
 my($title, $menubar) = ( shift, shift );
 my $etc = @_ ? shift : ''; #$etc is for things like onLoad= etc.
 my $head = @_ ? shift : ''; #$head is for things that go in the <HEAD> section
+
 my $conf = new FS::Conf;
 
+my $curuser = $FS::CurrentUser::CurrentUser;
+
 my $menu_position = $FS::CurrentUser::CurrentUser->option('menu_position')
                     || 'left';