batchRebuildBiblioTables.pl doesn't crash anymore when GetMarcBiblio fails.
[koha.git] / members / messaging.pl
index 81821e5..c3479f4 100755 (executable)
@@ -100,7 +100,7 @@ if ( defined $query->param('modify') && $query->param('modify') eq 'yes' ) {
             }
         }
 
-        warn( 'calling SetMessaginPreferencse with ' . Data::Dumper->Dump( [ $updater ], [ 'updater' ] ) );
+        #warn( 'calling SetMessaginPreferencse with ' . Data::Dumper->Dump( [ $updater ], [ 'updater' ] ) );
         C4::Members::Messaging::SetMessagingPreference( $updater );
     }
 
@@ -112,7 +112,7 @@ if ( defined $query->param('modify') && $query->param('modify') eq 'yes' ) {
 PREF: foreach my $option ( @$messaging_options ) {
     my $pref = C4::Members::Messaging::GetMessagingPreferences( { borrowernumber     => $borrower->{'borrowernumber'},
                                                                   message_name       => $option->{'message_name'} } );
-    warn( Data::Dumper->Dump( [ $pref ], [ 'pref' ] ) );
+    #warn( Data::Dumper->Dump( [ $pref ], [ 'pref' ] ) );
     # make a hashref of the days, selecting one.
     if ( $option->{'takes_days'} ) {
         @{$option->{'select_days'}} = map {; { day        => $_,
@@ -142,7 +142,8 @@ $template->param( messagingview               => 1,
                   message_queue               => $message_queue,
                   DHTMLcalendar_dateformat    => C4::Dates->DHTMLcalendar(), 
                   borrowernumber              => $borrowernumber,
-                  branch                      => $branch,        
+                  branchcode                  => $borrower->{'branchcode'},
+                 branchname                  => GetBranchName($borrower->{'branchcode'}),
                   dateformat                  => C4::Context->preference("dateformat"),
                   categoryname                => $borrower->{'description'},
                   $borrower->{'categorycode'} => 1,