Bug 7105: Bad request in GetSubscriptions
If $string or $issn is passed to GetSubscriptions, the request is false. See Bug 5864, especially the last comment from Frédérick Capovilla. Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This commit is contained in:
parent
92913a2f3f
commit
32317878c0
|
|
@ -588,7 +588,7 @@ sub GetSubscriptions {
|
|||
$tmpstring =~ s/^AND //;
|
||||
push @sqlstrings, $tmpstring;
|
||||
}
|
||||
$sqlwhere .= ( $sqlwhere ? " AND " : " WHERE " ) . "(" . join( ") OR (", @sqlstrings ) . ")";
|
||||
$sqlwhere .= ( $sqlwhere ? " AND " : " WHERE " ) . "((" . join( ") OR (", @sqlstrings ) . "))";
|
||||
}
|
||||
if ($issn) {
|
||||
my @sqlstrings;
|
||||
|
|
@ -601,7 +601,7 @@ sub GetSubscriptions {
|
|||
$tmpstring =~ s/^OR //;
|
||||
push @sqlstrings, $tmpstring;
|
||||
}
|
||||
$sqlwhere .= ( $sqlwhere ? " AND " : " WHERE " ) . "(" . join( ") OR (", @sqlstrings ) . ")";
|
||||
$sqlwhere .= ( $sqlwhere ? " AND " : " WHERE " ) . "((" . join( ") OR (", @sqlstrings ) . "))";
|
||||
}
|
||||
$sql .= "$sqlwhere ORDER BY title";
|
||||
$debug and warn "GetSubscriptions query: $sql params : ", join( " ", @bind_params );
|
||||
|
|
|
|||
Loading…
Reference in New Issue