[freeside-commits] branch FREESIDE_4_BRANCH updated. 76ca0089cd161a0127c82a9d644b18ddb3a26963

Ivan ivan at 420.am
Wed Feb 8 16:15:43 PST 2017


The branch, FREESIDE_4_BRANCH has been updated
       via  76ca0089cd161a0127c82a9d644b18ddb3a26963 (commit)
       via  663cff92282a92bcbb0928e7170f4ef359ac9476 (commit)
       via  7091336a8adde1b933ff2eaab4188d7a255aa6e3 (commit)
      from  327db72830c235a53d9a8ff2eec15c07eeeeb3ca (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 76ca0089cd161a0127c82a9d644b18ddb3a26963
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Feb 8 16:02:18 2017 -0800

    fix ticketing system error on bootstrap of new install

diff --git a/httemplate/elements/notify-tickets.html b/httemplate/elements/notify-tickets.html
index 16a04f4..35917c3 100644
--- a/httemplate/elements/notify-tickets.html
+++ b/httemplate/elements/notify-tickets.html
@@ -19,17 +19,21 @@ my $UnrepliedTickets;
 if ($enabled) {
   my $class = 'RT::Search::UnrepliedTickets';
   load_class($class);
-  my $session = FS::TicketSystem->session;
-  my $CurrentUser = $session->{CurrentUser};
-  # if there are no tickets the current user could see, always hide it
-  my $AnyTickets = RT::Tickets->new($CurrentUser);
-  foreach my $status (qw(resolved rejected deleted)) {
-    $AnyTickets->LimitStatus( OPERATOR => '!=', VALUE => $status );
-  }
-  $enabled = 0 if $AnyTickets->Count == 0;
+  my $session = eval { FS::TicketSystem->session; };
+  if ( $session ) {
+    my $CurrentUser = $session->{CurrentUser};
+    # if there are no tickets the current user could see, always hide it
+    my $AnyTickets = RT::Tickets->new($CurrentUser);
+    foreach my $status (qw(resolved rejected deleted)) {
+      $AnyTickets->LimitStatus( OPERATOR => '!=', VALUE => $status );
+    }
+    $enabled = 0 if $AnyTickets->Count == 0;
 
-  $UnrepliedTickets = RT::Tickets->new($CurrentUser);
-  my $search = $class->new(TicketsObj => $UnrepliedTickets);
-  $search->Prepare;
+    $UnrepliedTickets = RT::Tickets->new($CurrentUser);
+    my $search = $class->new(TicketsObj => $UnrepliedTickets);
+    $search->Prepare;
+  } else {
+    $enabled = 0;
+  }
 }
 </%init>

commit 663cff92282a92bcbb0928e7170f4ef359ac9476
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Feb 8 12:20:28 2017 -0800

    fix ticketing system error on bootstrap of new install

diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html
index cabc33f..98c8277 100644
--- a/httemplate/elements/menu.html
+++ b/httemplate/elements/menu.html
@@ -862,7 +862,7 @@ $config_menu{'Billing'} = [ \%config_billing, '' ]
   if keys %config_billing;
 $config_menu{'Ticketing'} = [ \%config_ticketing, '' ]
   if $conf->config('ticket_system')
-  && FS::TicketSystem->access_right(\%session, 'ShowConfigTab');
+  && eval { FS::TicketSystem->access_right(\%session, 'ShowConfigTab') };
 $config_menu{'Network Monitoring'} = [ \%config_nms, '' ]
   if $curuser->access_right('Configure network monitoring')
   && $conf->config('network_monitoring_system') eq 'Torrus_Internal';

commit 7091336a8adde1b933ff2eaab4188d7a255aa6e3
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Mon Sep 28 20:21:27 2015 -0700

    remove payment deletion, RT#37908

diff --git a/httemplate/misc/delete-cust_pay.cgi b/httemplate/misc/delete-cust_pay.cgi
deleted file mode 100755
index 38e7e4b..0000000
--- a/httemplate/misc/delete-cust_pay.cgi
+++ /dev/null
@@ -1,21 +0,0 @@
-% if ( $error ) {
-%   errorpage($error);
-% } else {
-<% $cgi->redirect($p. "view/cust_main.cgi?". $custnum) %>
-% }
-<%init>
-
-die "access denied"
-  unless $FS::CurrentUser::CurrentUser->access_right('Delete payment');
-
-#untaint paynum
-my($query) = $cgi->keywords;
-$query =~ /^(\d+)$/ || die "Illegal paynum";
-my $paynum = $1;
-
-my $cust_pay = qsearchs('cust_pay',{'paynum'=>$paynum});
-my $custnum = $cust_pay->custnum;
-
-my $error = $cust_pay->delete;
-
-</%init>

-----------------------------------------------------------------------

Summary of changes:
 httemplate/elements/menu.html           |    2 +-
 httemplate/elements/notify-tickets.html |   26 +++++++++++++++-----------
 httemplate/misc/delete-cust_pay.cgi     |   21 ---------------------
 3 files changed, 16 insertions(+), 33 deletions(-)
 delete mode 100755 httemplate/misc/delete-cust_pay.cgi




More information about the freeside-commits mailing list