Bugzilla – Attachment 25064 Details for
Bug 11676
Loading shelving locations based on the item's homebranch instead of the user's logged-in branch.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11676 - Loading shelving locations based on the item's homebranch instead of the user's logged-in branch. Svc AJAX-wrapper.
Bug-11676---Loading-shelving-locations-based-on-th.patch (text/plain), 2.48 KB, created by
Olli-Antti Kivilahti
on 2014-02-05 18:02:57 UTC
(
hide
)
Description:
Bug 11676 - Loading shelving locations based on the item's homebranch instead of the user's logged-in branch. Svc AJAX-wrapper.
Filename:
MIME Type:
Creator:
Olli-Antti Kivilahti
Created:
2014-02-05 18:02:57 UTC
Size:
2.48 KB
patch
obsolete
>From 67c1097fc7102bd3d815b25b5f07af22930b8066 Mon Sep 17 00:00:00 2001 >From: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> >Date: Tue, 4 Feb 2014 19:32:52 +0200 >Subject: [PATCH] Bug 11676 - Loading shelving locations based on the item's > homebranch instead of the user's logged-in branch. Svc AJAX-wrapper. > >This patch provides a HTTP-interface for the C4::Koha::GetAuthorisedValues() using the >existing svc web interface. >--- > svc/getAuthorisedValues.pl | 69 ++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 69 insertions(+) > create mode 100755 svc/getAuthorisedValues.pl > >diff --git a/svc/getAuthorisedValues.pl b/svc/getAuthorisedValues.pl >new file mode 100755 >index 0000000..3db1399 >--- /dev/null >+++ b/svc/getAuthorisedValues.pl >@@ -0,0 +1,69 @@ >+#!/usr/bin/perl >+ >+# This file is part of Koha. >+# >+# Copyright Anonymous >+# >+# Koha is free software; you can redistribute it and/or modify it >+# under the terms of the GNU General Public License as published by >+# the Free Software Foundation; either version 3 of the License, or >+# (at your option) any later version. >+# >+# Koha is distributed in the hope that it will be useful, but >+# WITHOUT ANY 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, see <http://www.gnu.org/licenses>. >+ >+=head SYNOPSIS >+ >+This file is a AJAX-callable wrapper for C4::Koha::GetAuthorisedValues() >+ >+Valid parameters: >+ >+category >+selected >+opac >+branch_limit >+ >+See C4::Koha::GetAuthorisedValues() for detailed documentation. >+ >+=cut >+use Modern::Perl; >+ >+use CGI; >+use C4::Auth qw/check_cookie_auth/; >+use JSON qw/to_json/; >+use C4::Koha qw/GetAuthorisedValues/; >+ >+my $input = new CGI; >+ >+my ( $auth_status, $sessionID ) = >+ check_cookie_auth( >+ $input->cookie('CGISESSID'), >+ { 'catalogue' => '*' } ); >+ >+if ( $auth_status ne "ok" ) { >+ exit 0; >+} >+ >+## Getting the input parameters ## >+ >+my $category = $input->param('category'); >+my $selected = $input->param('selected'); >+my $opac = $input->param('opac'); >+my $branch_limit = $input->param('branch_limit'); >+ >+ >+my $avs = C4::Koha::GetAuthorisedValues($category, $selected, $opac, $branch_limit); >+ >+ >+binmode STDOUT, ":encoding(UTF-8)"; >+print $input->header( >+ -type => 'application/json', >+ -charset => 'UTF-8' >+); >+ >+print to_json( $avs); >\ No newline at end of file >-- >1.8.1.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11676
:
25034
|
25035
|
25036
|
25060
|
25061
|
25062
| 25064 |
25065
|
26796
|
26965