Koha-clms/opac
David Cook 16299d41ab
Bug 43019: Fix branch comparison
This change fixes the branch comparison between the Page
and the user. Previously, it was doing a numeric "!=" and now it
does the string comparison "ne". Also, if no environmental variable
is set for the default branch, it defaults to an empty string
for anonymous (ie non-authenticated) users.

Test plan:
0. Apply the patch
1. restart_all
2. Log into the staff interface
3. Go to Tools
4. Click on "Pages"
5. Create a Page for All Libraries for the OPAC
6. Copy the "OPAC" link in the "Page URL" table cell and open it
in a private window or a separate browser
7. Note that the page appears
8. Now change the "Page" to a specific library
9. Revisit the URL in the private window
10. Note that it now gives a 404 error
11. Log into the OPAC with a user whose library matches the libary
of the Page
12. Note that now you can view the URL again
13. Change the library of the user or the Page
14. Note that you cannot see the Page now

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 16df1a33b2)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
2026-07-30 09:30:27 +00:00
..
clubs
…
errors Bug 37741: Do not send cookie back from error pages 2024-08-30 12:45:45 +02:00
external/overdrive
…
sci Revert "Bug 36586: Define self-checkin timer using Javascript class" 2025-07-31 14:34:37 +02:00
sco Bug 39738: Obsolete call on system preference 'SelfCheckHelpMessage' 2025-09-29 10:55:16 +02:00
svc Bug 35942: OPAC user can enroll several times to the same club 2024-07-01 18:55:39 +02:00
ilsdi.pl Bug 36867: (follow-up) Don't check IP if ILS-DI disabled 2025-05-23 12:18:30 +02:00
maintenance.pl Bug 23798: Convert OpacMaintenanceNotice system preference to additional contents 2023-11-08 17:41:27 -03:00
oai.pl
…
opac-ISBDdetail.pl Bug 28478: Make opac-*detail.pl scripts use Koha::Biblio->opac_suppressed() 2025-02-18 19:17:20 +01:00
opac-MARCdetail.pl Bug 28478: Make opac-*detail.pl scripts use Koha::Biblio->opac_suppressed() 2025-02-18 19:17:20 +01:00
opac-account-pay-return.pl
…
opac-account-pay.pl Bug 36088: Remove useless code form opac-account-pay.pl 2024-03-07 15:02:43 +01:00
opac-account.pl
…
opac-addbybiblionumber.pl Bug 40585: Check on Biblios->find in addbybiblionumber scripts 2025-10-16 11:17:08 +02:00
opac-alert-subscribe.pl Bug 34478: op =~ ^cud- in pl/pm 2024-03-01 10:56:11 +01:00
opac-alert-subscriptions.pl Bug 34478: Remove generate_csrf from pl 2024-03-01 10:55:56 +01:00
opac-article-request-cancel.pl
…
opac-authorities-home.pl Bug 37057: Restore filtering of unused authorities 2024-07-01 18:55:53 +02:00
opac-authoritiesdetail.pl Bug 33907: Improve translation of title tags: OPAC part 1 2024-09-02 12:13:52 +02:00
opac-basket.pl
…
opac-blocked.pl Bug 35952: Remove unnecessary line for OpacSuppressionMessage 2024-03-07 15:02:50 +01:00
opac-browse.pl
…
opac-browser.pl Bug 34478: op =~ ^cud- in pl/pm 2024-03-01 10:56:11 +01:00
opac-changelanguage.pl
…
opac-course-details.pl
…
opac-course-reserves.pl
…
opac-curbside-pickups.pl Bug 38813: Make the 'curbside pickups' tab display selected if so 2025-02-04 21:46:04 +01:00
opac-detail.pl Bug 28478: Make opac-*detail.pl scripts use Koha::Biblio->opac_suppressed() 2025-02-18 19:17:20 +01:00
opac-discharge.pl Bug 34478: op =~ ^cud- in pl/pm 2024-03-01 10:56:11 +01:00
opac-dismiss-message.pl Bug 36532: Protect opac-dismiss-message.pl from malicious usages 2024-05-14 15:04:34 -03:00
opac-downloadcart.pl Bug 35975: Show biblionumber when download cart as BibTeX 2025-03-19 23:57:49 +01:00
opac-downloadshelf.pl Bug 31224: Update instances of metadata->record 2024-11-07 16:29:23 +01:00
opac-export.pl Bug 39485: Fix wide character in print-warn in opac-export 2025-09-29 09:55:22 +02:00
opac-holdshistory.pl
…
opac-ics.pl
…
opac-idref.pl
…
opac-illrequests.pl Bug 41237: (QA follow-up): Utilize available logged in user object 2026-03-06 15:00:24 +00:00
opac-image.pl
…
opac-imageviewer.pl
…
opac-issue-note.pl Bug 34478: op =~ ^cud- in pl/pm - Manual cud-email => email 2024-03-01 10:57:14 +01:00
opac-library.pl Bug 30873: Add system preference to hide libraries link in the OPAC 2024-07-02 17:20:39 +02:00
opac-main.pl Bug 31383: Create a parent-child DB relation for additional content 2023-10-20 14:43:56 -03:00
opac-memberentry.pl Bug 37143: Do not allow required fields with only whitespace to be submitted 2026-07-08 07:39:35 +02:00
opac-messaging.pl Bug 38903: Fix theme in some getTranslatedLanguages calls 2025-09-29 09:37:15 +02:00
opac-modrequest-suspend.pl Bug 37868: Remove C4::Reserves::ToggleSuspend 2024-10-21 15:10:35 +02:00
opac-modrequest.pl Bug 40929: Add $hold test in opac-modrequest 2025-10-31 15:12:36 +00:00
opac-mymessages.pl
…
opac-news-rss.pl
…
opac-overdrive-search.pl Bug 37221: Add preference to turn off OPAC Overdrive features 2024-11-11 14:12:14 +01:00
opac-page.pl Bug 43019: Fix branch comparison 2026-07-30 09:30:27 +00:00
opac-passwd.pl Bug 34478: op =~ ^cud- in pl/pm 2024-03-01 10:56:11 +01:00
opac-password-recovery.pl Bug 38772: Typo 'minPasswordPreference' system preference 2025-03-19 23:57:37 +01:00
opac-patron-consent.pl Bug 41662: Prevent CSRF on opac-patron-consent.pl 2026-01-22 14:42:47 +00:00
opac-patron-image.pl
…
opac-privacy.pl Bug 34478: op =~ ^cud- in pl/pm 2024-03-01 10:56:11 +01:00
opac-ratings.pl Bug 34478: Add 'op' to opac-ratings 2024-03-01 10:57:09 +01:00
opac-readingrecord.pl Bug 38102: Fix default sort order 2025-08-01 14:46:04 +02:00
opac-recall.pl Bug 36142: recallsview template param for opac-recall.tt 2024-04-05 11:51:23 +02:00
opac-recalls.pl
…
opac-registration-verify.pl Bug 39737: Obsolete call on system preference 'PatronSelfRegistrationAdditionalInstructions' 2025-10-03 14:58:52 +02:00
opac-renew.pl Bug 36453: Update old occurrences of effective_BlockExpiredPatronOpacActions 2024-06-11 09:17:18 +01:00
opac-reportproblem.pl Bug 34478: Manual fix - problem_reports 2024-03-01 10:56:59 +01:00
opac-request-article.pl Bug 34478: Add 'op' to opac-request-article 2024-03-01 10:57:08 +01:00
opac-reserve.pl Bug 33224: OPACHoldsIfAvailableAtPickup and no on-shelf holds don't mix well 2025-10-03 16:17:15 +02:00
opac-reset-password.pl Bug 34478: op =~ ^cud- in pl/pm 2024-03-01 10:56:11 +01:00
opac-restrictedpage.pl
…
opac-retrieve-file.pl
…
opac-review.pl Bug 13342: Not logged user can place a review/comment 2024-10-18 12:07:53 +02:00
opac-routing-lists.pl
…
opac-search-history.pl Bug 34478: Manual fix - action to op / add cud- - opac-search-history 2024-03-01 10:57:13 +01:00
opac-search.pl Bug 39736: Remove obsolete call on system preference 'OPACResultsSidebar' 2025-10-03 14:57:01 +02:00
opac-sendbasket.pl Bug 31224: Update instances of metadata->record 2024-11-07 16:29:23 +01:00
opac-sendshelf.pl Bug 39374: Add feature to block sending of lists from OPAC 2025-08-06 16:32:58 +02:00
opac-serial-issues.pl
…
opac-shareshelf.pl Bug 30955: (follow-up) Merged related notices into lists 2024-10-24 16:55:59 +02:00
opac-shelves.pl Revert "Bug 41655: Local OPAC covers are not displayed in OPAC lists" 2026-04-17 13:43:58 +00:00
opac-showmarc.pl
…
opac-showreviews.pl
…
opac-suggestions.pl Bug 37152: Aquisitions basket and OPAC suggestion deletion should use the op cud-delete 2024-06-27 11:49:57 +02:00
opac-tags.pl Bug 38969: Prevent JS error when adding tags with quote at the OPAC 2025-04-24 18:42:31 +02:00
opac-tags_subject.pl
…
opac-topissues.pl Bug 34478: op =~ ^cud- - Manual - cud-do_it => do_it 2024-03-01 10:58:32 +01:00
opac-user.pl Bug 39735: Fix typo in system preference call 'OPACFineNoRenewalsIncludeCredit' 2025-09-29 11:19:13 +02:00
opac-virtual-card.pl Bug 26777: Allow ability to select diffferent barcode types 2024-08-26 17:39:36 +02:00
tracklinks.pl
…
unapi Bug 41261: Valid inputs to unapi 2026-03-27 13:50:53 +00:00