fix two more instances of old FSF address
[koha_fer] / circ / waitingreserves.pl
index 6a9d58e..e924bcf 100755 (executable)
@@ -13,9 +13,9 @@
 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 # A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License along with
-# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA  02111-1307 USA
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 use strict;
 use warnings;
@@ -44,6 +44,7 @@ my $item           = $input->param('itemnumber');
 my $borrowernumber = $input->param('borrowernumber');
 my $fbr            = $input->param('fbr') || '';
 my $tbr            = $input->param('tbr') || '';
+my $all_branches   = $input->param('allbranches') || '';
 
 my $cancel;
 
@@ -90,10 +91,16 @@ if ($item) {
         ModItemTransfer( $item, $fbr, $tbr );
     }
 }
+if ( C4::Context->preference('IndependantBranches') ) {
+    undef $all_branches;
+} else {
+    $template->param( all_branches_link => $input->url . '?allbranches=1&' . $input->query_string )
+      unless $all_branches;
+}
 
 my (@reservloop, @overloop);
 my ($reservcount, $overcount);
-my @getreserves = $default ? GetReservesForBranch($default) : GetReservesForBranch();
+my @getreserves = $all_branches ? GetReservesForBranch() : GetReservesForBranch($default);
 # get reserves for the branch we are logged into, or for all branches
 
 my $today = Date_to_Days(&Today);