Lines 17-23
Link Here
|
17 |
# You should have received a copy of the GNU General Public License |
17 |
# You should have received a copy of the GNU General Public License |
18 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
18 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
19 |
|
19 |
|
20 |
|
|
|
21 |
use Modern::Perl; |
20 |
use Modern::Perl; |
22 |
|
21 |
|
23 |
use CGI qw ( -utf8 ); |
22 |
use CGI qw ( -utf8 ); |
Lines 27-33
use Koha::Libraries;
Link Here
|
27 |
|
26 |
|
28 |
my $query = CGI->new(); |
27 |
my $query = CGI->new(); |
29 |
|
28 |
|
30 |
my $branchcode = $query->param('branchcode'); |
29 |
my $branchcode = $query->param('branchcode'); |
31 |
|
30 |
|
32 |
my ( $template, $borrowernumber, $cookie ) = get_template_and_user( |
31 |
my ( $template, $borrowernumber, $cookie ) = get_template_and_user( |
33 |
{ |
32 |
{ |
Lines 38-52
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
Link Here
|
38 |
} |
37 |
} |
39 |
); |
38 |
); |
40 |
|
39 |
|
41 |
if( $branchcode ){ |
40 |
my $found; |
42 |
my $library = Koha::Libraries->find( $branchcode ); |
41 |
if ($branchcode) { |
43 |
$template->param( library => $library ); |
42 |
my $library = Koha::Libraries->find($branchcode); |
|
|
43 |
if ( $library->public ) { |
44 |
$found++; |
45 |
$template->param( library => $library ); |
46 |
} |
44 |
} |
47 |
} |
45 |
|
48 |
|
46 |
my $libraries = Koha::Libraries->search( {}, { order_by => ['branchname'] }, ); |
49 |
unless ($found) { |
47 |
$template->param( |
50 |
my $libraries = Koha::Libraries->search( { public => 1 }, { order_by => ['branchname'] } ); |
48 |
libraries => $libraries, |
51 |
|
49 |
branchcode => $branchcode, |
52 |
$template->param( |
50 |
); |
53 |
libraries => $libraries, |
|
|
54 |
branchcode => $branchcode, |
55 |
); |
56 |
} |
51 |
|
57 |
|
52 |
output_html_with_http_headers $query, $cookie, $template->output; |
58 |
output_html_with_http_headers $query, $cookie, $template->output; |
53 |
- |
|
|