]> git.koha-community.org Git - koha.git/commit
Bug 11779: (follow-up) improve GetLoggedInBranchcode() and add test cases
authorGalen Charlton <gmc@esilibrary.com>
Wed, 19 Feb 2014 16:40:06 +0000 (16:40 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 19 May 2014 15:06:05 +0000 (17:06 +0200)
commit1b02c031a34e7e3e3caabbe0184fb5fe71447d95
treef0b3c6854f42cc85011e6c1f9e78b643a5fb34eb
parentf08154588cb07d8d85b25d13a566c2c689148577
Bug 11779: (follow-up) improve GetLoggedInBranchcode() and add test cases

This patch adjusts the new GetLoggedInBranchcode() template function so
that it returns the empty string rather than undef if there is no
active user environment.  That way, there won't be lots of undefined
value warnings if/when this function gets used in the OPAC.

This patch also adds test cases.

To test:

[1] Verify that there are no regressions in the main test
    plan for this bug.
[2] Verify that prove -v t/db_dependent/Koha_template_plugin_Branches.t
    passes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 065a3a5efa9b90723460a607ac85591c17945b00)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Koha/Template/Plugin/Branches.pm
t/db_dependent/Koha_template_plugin_Branches.t