my $userid = shift or return;
my $uid_field = $mapping{userid}->{is} or die ldapserver_error("mapping for 'userid'");
my $filter = Net::LDAP::Filter->new("$uid_field=$userid") or die "Failed to create new Net::LDAP::Filter";
- my $res = ($config{anonymous}) ? $db->bind : $db->bind($ldapname, password=>$ldappassword);
- if ($res->code) { # connection refused
- warn "LDAP bind failed as ldapuser " . ($ldapname || '[ANONYMOUS]') . ": " . description($res);
- return 0;
- }
my $search = $db->search(
base => $base,
filter => $filter,
}
# FIXME dpavlin -- we really need $userldapentry leater on even if using auth_by_bind!
- my $search = search_method($db, $userid) or return 0; # warnings are in the sub
- $userldapentry = $search->shift_entry;
+
+ # BUG #5094
+ # 2010-08-04 JeremyC
+ # a $userldapentry is only needed if either updating or replicating are enabled
+ if($config{update} or $config{replicate}) {
+ my $search = search_method($db, $userid) or return 0; # warnings are in the sub
+ $userldapentry = $search->shift_entry;
+ }
} else {
+ my $res = ($config{anonymous}) ? $db->bind : $db->bind($ldapname, password=>$ldappassword);
+ if ($res->code) { # connection refused
+ warn "LDAP bind failed as ldapuser " . ($ldapname || '[ANONYMOUS]') . ": " . description($res);
+ return 0;
+ }
my $search = search_method($db, $userid) or return 0; # warnings are in the sub
$userldapentry = $search->shift_entry;
my $cmpmesg = $db->compare( $userldapentry, attr=>'userpassword', value => $password );
=head2 GetItemsInfo
- @results = GetItemsInfo($biblionumber, $type);
+ @results = GetItemsInfo($biblionumber);
-Returns information about books with the given biblionumber.
-
-C<$type> may be either C<intra> or anything else. If it is not set to
-C<intra>, then the search will exclude lost, very overdue, and
-withdrawn items.
+Returns information about items with the given biblionumber.
C<GetItemsInfo> returns a list of references-to-hash. Each element
-contains a number of keys. Most of them are table items from the
+contains a number of keys. Most of them are attributes from the
C<biblio>, C<biblioitems>, C<items>, and C<itemtypes> tables in the
Koha database. Other keys include:
=cut
sub GetItemsInfo {
- my ( $biblionumber, $type ) = @_;
+ my ( $biblionumber ) = @_;
my $dbh = C4::Context->dbh;
# note biblioitems.* must be avoided to prevent large marc and marcxml fields from killing performance.
my $query = "
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
my $marcseriesarray = GetMarcSeries ($record,$marcflavour);
my $marcurlsarray = GetMarcUrls ($record,$marcflavour);
- my @items = &GetItemsInfo( $biblionumber, 'opac' );
+ my @items = GetItemsInfo( $biblionumber );
my $hasauthors = 0;
if($dat->{'author'} || @$marcauthorsarray) {
my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour );
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
- my @items = &GetItemsInfo( $biblionumber, 'opac' );
+ my @items = GetItemsInfo( $biblionumber );
my $hasauthors = 0;
if($dat->{'author'} || @$marcauthorsarray) {
my $itemtypes = GetItemTypes();
my $dbh = C4::Context->dbh;
-# 'intra' param included, even though it's not respected in GetItemsInfo currently
-my @all_items= GetItemsInfo($biblionumber, 'intra');
+my @all_items = GetItemsInfo( $biblionumber );
my @items;
for my $itm (@all_items) {
push @items, $itm unless ( $itm->{itemlost} && GetHideLostItemsPreference($borrowernumber) && !$showallitems);
my $biblionumber = $query->param('biblionumber');
# change back when ive fixed request.pl
-my @items = GetItemsInfo( $biblionumber, $type );
+my @items = GetItemsInfo( $biblionumber );
my $norequests = 1;
foreach my $itm (@items) {
$norequests = 0 unless $itm->{'notforloan'};
May 22 2011 Koha 3.4.1 released releases
June 1 2011 Fridolyn Somers becomes the 143rd developer to have a patch pushed
June 3 2011 Elliott Davis becomes the 144th developer to have a patch pushed
-
+June 15 2011 First ever global sign off day
+June 17 2011 Jeremy Crabtree becomes the 145th developer to have a patch pushed
<li>Andrew Chilton</li>
<li>Garry Collum</li>
<li>John Copeland</li>
+ <li>Jeremy Crabtree</li>
<li>Christophe Croullebois</li>
<li>Nate Curulla</li>
<li>Vincent Danjean</li>
<td>[% IF ( branchloo.seen ) %]
<span style="display:none;">[% branchloo.seen %][% branchloo.seentime %]</span>
<!-- invisible span for eventual use by tablesorter -->
- [% DEFAULT branchloo.seentime="??:??" %] [% branchloo.seen %]
+ [% branchloo.seen %] [% branchloo.seentime %]
[% ELSE %]Never
[% END %]
</td>
[% IF ( facets_loop ) %]
<div id="search-facets">
<h4>Refine your search</h4>
-[% query_cgi %]
<ul>
<li>Availability<ul><li>[% IF ( available ) %]Showing only <strong>available</strong> items. <a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi_not_availablity %][% IF ( sort_by ) %]&sort_by=[% sort_by %][% END %]">Show all items</a>[% ELSE %]Limit to <a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %][% IF ( sort_by ) %]&sort_by=[% sort_by %][% END %]&limit=available">currently available items.</a>[% END %]</li></ul>
[% IF ( related ) %] <li>(related searches: [% FOREACH relate IN related %][% relate.related_search %][% END %])</li>[% END %]
<option value="1">Private</option>
<option value="2">Public</option>
</select></li></ol></fieldset>
- [% FOREACH biblio IN biblios %] <input type="hidden" name="biblionumber" value="[% biblio.biblionumber %]" />[% END %]
+ [% FOREACH biblio IN biblios %] <input type="hidden" name="biblionumber" value="[% biblio.biblionumber | html%]" />[% END %]
<fieldset class="action"><input type="submit" value="Save" class="submit" /> <a class="close cancel" href="#">Cancel</a></fieldset>
</form>
[% END %]
</select></li></ol>
</fieldset>
<fieldset class="action">
- <input type="hidden" name="bib_list" value="[% bib_list %]" />
+ <input type="hidden" name="bib_list" value="[% bib_list | html %]" />
<input type="submit" name="save" value="Go" />
</fieldset>
</form>
</select></li></ol>
</fieldset>
- <fieldset class="action"> <input type="hidden" name="shelfid" value="[% shelfid %]" />
+ <fieldset class="action"> <input type="hidden" name="shelfid" value="[% shelfid | html %]" />
<input type="submit" name="save" value="Go" /></fieldset>
</form>
[% IF ( cgi_debug ) %]alert(_('injecting OLD comment: ')+comment);[% END %]
parent.opener.$('#c[% reviewid %] p').prev("small").prev("h5").html("Your Edited Comment (preview, pending approval)");
parent.opener.$('#c[% reviewid %] p').html(comment);
- parent.opener.$('#c[% reviewid %] p').append(" <a href=\"#comment\" onclick=\"Dopop(\'/cgi-bin/koha/opac-review.pl?biblionumber=[% biblionumber %]&reviewid=[% reviewid %]\');\">Edit<\/a>");
+ parent.opener.$('#c[% reviewid %] p').append("<a href=\"#comment\" onclick=\"Dopop(\'/cgi-bin/koha/opac-review.pl?biblionumber=[% biblionumber | uri %]&reviewid=[% reviewid | uri%]\');\">Edit<\/a>");
[% END %]
return 1;
};
parent.opener.$('#newcomment').html(
"<h5>Your Comment (preview, pending approval)<\/h5>" +
"<p>"+comment+"<\/p>" +
- "<a href=\"#comment\" onclick=\"Dopop(\'/cgi-bin/koha/opac-review.pl?biblionumber=[% biblionumber %]\');\">Edit<\/a><\/p>"
+ "<a href=\"#comment\" onclick=\"Dopop(\'/cgi-bin/koha/opac-review.pl?biblionumber=[% biblionumber |uri%]\');\">Edit<\/a><\/p>"
);
parent.opener.$("#addcomment").prev("p").remove();
parent.opener.$("#addcomment").remove();
</div>
[% END %]
<form id="reviewf" action="/cgi-bin/koha/opac-review.pl[% IF ( cgi_debug ) %]?debug=1[% END %]" method="post">
- <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
+ <input type="hidden" name="biblionumber" value="[% biblionumber | html%]" />
<fieldset class="brief">
<legend>Comments on <i>[% title |html %] [% subtitle %]</i>[% IF ( author ) %]by [% author %][% END %]</legend>
<ol><li><textarea id="review" name="review" cols="60" rows="8">[% review %]</textarea></li></ol>
<div id="userserialissues" class="container">
<h2>Issues for a subscription</h2>
<div id="views">
- <span class="view"><a id="Normalview" href="opac-detail.pl?biblionumber=[% biblionumber %]" class="button">Normal View</a></span>
+ <span class="view"><a id="Normalview" href="opac-detail.pl?biblionumber=[% biblionumber | html %]" class="button">Normal View</a></span>
<span class="view"><span id="Briefhistory">Brief history</span></span>
- <span class="view"><a id="Fullhistory" href="opac-serial-issues.pl?selectview=full&biblionumber=[% biblionumber %]" class="button">Full History</a></span>
+ <span class="view"><a id="Fullhistory" href="opac-serial-issues.pl?selectview=full&biblionumber=[% biblionumber | html%]" class="button">Full History</a></span>
</div>
<form method="post" name="f">
[% FOREACH subscription_LOO IN subscription_LOOP %]
_set_preference( $row->{'variable'}, $preferences{$row->{'variable'}} );
}
+
+ C4::Context->clear_syspref_cache();
}
sub _fetch_preference {
? GetXmlBiblio( $record_number )
: GetAuthorityXML( $record_number );
if ($record_type eq 'biblio'){
- my @items = GetItemsInfo($record_number, 'intra');
+ my @items = GetItemsInfo($record_number);
if (@items){
my $record = MARC::Record->new;
my @itemsrecord;
my $norequests = 1;
my $res = GetISBDView($biblionumber, "opac");
-my @items = &GetItemsInfo($biblionumber, 'opac');
+my @items = GetItemsInfo( $biblionumber );
my $itemtypes = GetItemTypes();
for my $itm (@items) {
$template->param('OPACShowCheckoutName' => C4::Context->preference("OPACShowCheckoutName") );
# change back when ive fixed request.pl
-my @all_items = &GetItemsInfo( $biblionumber, 'opac' );
+my @all_items = GetItemsInfo( $biblionumber );
my @items;
# Getting items to be hidden
my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour );
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
- my @items = &GetItemsInfo( $biblionumber, 'opac' );
+ my @items = GetItemsInfo( $biblionumber );
my $hasauthors = 0;
if($dat->{'author'} || @$marcauthorsarray) {
my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour );
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
- my @items = &GetItemsInfo( $biblionumber, 'opac' );
+ my @items = GetItemsInfo( $biblionumber );
$dat->{MARCNOTES} = $marcnotesarray;
$dat->{MARCSUBJCTS} = $marcsubjctsarray;
# FIXME still need to shift the text to the template so its translateable
if ( $data->[$i]) {
# find if its on issue
- my @items = GetItemsInfo($line{'biblionumber'}, 'intra' );
+ my @items = GetItemsInfo( $line{biblionumber} );
my $onissue = 0;
foreach my $item (@items) {
if ( $item->{'datedue'} eq 'Reserved' ) {
# get biblio information....
my $biblio = $subs->{'biblionumber'};
my ($count2,@bibitems) = GetBiblioItemByBiblioNumber($biblio);
- my @itemresults = GetItemsInfo($subs->{'biblionumber'}, 'intra');
+ my @itemresults = GetItemsInfo( $subs->{biblionumber} );
my $branch = $itemresults[0]->{'holdingbranch'};
my $branchname = GetBranchName($branch);
my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour );
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
- my @items = &GetItemsInfo( $biblionumber, 'opac' );
+ my @items = GetItemsInfo( $biblionumber );
$dat->{MARCNOTES} = $marcnotesarray;
$dat->{MARCSUBJCTS} = $marcsubjctsarray;