[Koha-patches] [PATCH] [SIGNED-OFF] Bug 6043: SQL error when IndependantBranches=ON on suggestion

Katrin Fischer Katrin.Fischer.83 at web.de
Mon Apr 4 15:19:32 CEST 2011


From: Paul Poulain <paul.poulain at biblibre.com>

On suggestion page, when IndependantBranch=ON, the SQL built is wrong:
branchcode is ambiguous

Signed-off-by: Katrin Fischer <Katrin.Fischer.83 at web.de>
---
 C4/Suggestions.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/C4/Suggestions.pm b/C4/Suggestions.pm
index 9cb2c18..779cc7c 100644
--- a/C4/Suggestions.pm
+++ b/C4/Suggestions.pm
@@ -127,7 +127,7 @@ sub SearchSuggestion  {
             if ($userenv) {
                 if (($userenv->{flags} % 2) != 1 && !$suggestion->{branchcode}){
                 push @sql_params,$$userenv{branch};
-                push @query,q{ and (branchcode = ? or branchcode ='')};
+                push @query,q{ and (suggestions.branchcode = ? or suggestions.branchcode ='')};
                 }
             }
     }
-- 
1.7.1



More information about the Koha-patches mailing list