Instead of relying on a system preference to determine whether there is only a single branch in the system or not, why not just count how many distinct branches are in the branches table? This will reduce the number of moving parts, so to speak. Proposed subroutine in C4::Branch: GetBranchCount(). No inputs, returns integer value 0 or greater, corresponding to the output of SELECT count(*) FROM branches; Once this subroutine is in place, we can slowly remove references to singleBranchMode syspref, which will fix numerous bugs involved with that particular feature.
Ian, the description for singlebranchmode says "Allow/Don't allow patrons to select their branch on the OPAC." but it doesn't actually just do that. It also controls whether staff can choose their branch in the staff client. I think we need some such preference to let the libraries decide if their patrons and staff can choose a branch in the opac and staff client.
I think the description makes no sense as is. By design the SingleBranchMode is made to hide all things related to branches if you only have 1 branch. Because it makes no sense to have a branch facet, a pickup library or search for branches when there is only 1 branch. And the same applies to the staff interface. If there is only 1 branch, hiding the options is supposed to make it less confusing. So I think correcting the system preference description is the fix here, but there might be some additional functionality that is desirable. For example: - Make it possible to specify which branches are visible in the OPAC (so you could have an ILL library, internal departments as branches and such) - Make it possible to specify which libraries can be pickup locations - Make it a permission, if a staff user can change the library from his home library to another
Is this kind of duplicate of Bug 4941 ?
*** This bug has been marked as a duplicate of bug 4941 ***