Summary: | Search for system preferences call errors | ||
---|---|---|---|
Product: | Koha | Reporter: | Fridolin Somers <fridolin.somers> |
Component: | Architecture, internals, and plumbing | Assignee: | Fridolin Somers <fridolin.somers> |
Status: | ASSIGNED --- | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | david |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38772 | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Bug Depends on: | 39733, 39734, 39735, 39736, 39737, 39738, 39745, 39746, 39747 | ||
Bug Blocks: |
Description
Fridolin Somers
2025-04-24 08:46:39 UTC
git grep can not exclude so I use grep directly : We need not exclude test suite and installer (updatedatabase.pl and dbrevs) grep -r --exclude-dir=.git --exclude-dir=t --exclude-dir=installer -o 'C4::Context->preference(.*)' | awk -F 'preference\(|\)' '{print $2}' | tr -d '"' | tr -d "'" | tr -d ' ' | sort -u | grep -v '^\$' | tee patches/sysprefs_calls.txt Then : for i in $(cat patches/sysprefs_calls.txt); do echo "### $i" ; grep -i -c "'$i'" installer/data/mysql/mandatory/sysprefs.sql ; done | grep -B1 ^0 | grep ^# ### ($interfaceeqopac ### automatic_item_modification_by_age_configuration ### delimiter ### IntranetmainUserblock ### marcflavour ### MarcFlavour ### MARCFLAVOUR ### OPACFineNoRenewalsIncludeCredit ### OPACResultsSidebar ### PatronSelfRegistrationAdditionalInstructions ### PREF_008 ### preference ### SelfCheckHelpMessage ### some_variable ### version ### Version Those are normal cases : automatic_item_modification_by_age_configuration MarcFlavour version some_variable/preference => commes from POD ;) PREF_008 => Is a constant for "MARCAuthorityControlField008" So : for i in $(cat patches/sysprefs_missing.txt); do echo "## $i"; git grep "C4::Context->preference(.$i" ; echo ; done ## delimiter misc/cronjobs/staticfines.pl: $delim = "\t"; # ? C4::Context->preference('delimiter') || "\t"; ## IntranetmainUserblock C4/Auth.pm: IntranetmainUserblock => C4::Context->preference("IntranetmainUserblock"), ## OPACFineNoRenewalsIncludeCredit C4/Circulation.pm: C4::Context->preference("OPACFineNoRenewalsIncludeCredit") opac/opac-user.pl: C4::Context->preference("OPACFineNoRenewalsIncludeCredit") ## OPACResultsSidebar opac/opac-search.pl:$template->param( OPACResultsSidebar => C4::Context->preference('OPACResultsSidebar') ); ## PatronSelfRegistrationAdditionalInstructions opac/opac-memberentry.pl: C4::Context->preference('PatronSelfRegistrationAdditionalInstructions') ); opac/opac-registration-verify.pl: C4::Context->preference('PatronSelfRegistrationAdditionalInstructions') ); ## SelfCheckHelpMessage opac/sco/help.pl:if ( C4::Context->preference('SelfCheckHelpMessage') ) { opac/sco/help.pl: $template->param( SelfCheckHelpMessage => C4::Context->preference('SelfCheckHelpMessage') ); I will create new bug reports for each : ### delimiter : In misc/cronjobs/staticfines.pl : Bug 27486 renamed "delimiter" into "CSVDelimiter" => Patch to fix ### IntranetmainUserblock : Bug 35153 moved to additional contents. => Patch to remove call ### OPACFineNoRenewalsIncludeCredit A typo : installer/data/mysql/mandatory/sysprefs.sql:('OPACFineNoRenewalsIncludeCredits','1',NULL,'If enabled the value specified in OPACFineNoRenewals should include any unapplied account credits in the calculation','YesNo'), => Patch to fix calls (ending 's') ### OPACResultsSidebar Bug 34869 moved additional contents. => Patch to remove call ### PatronSelfRegistrationAdditionalInstructions Bug 34889 moved to additional contents. => Patch to remove call ### SelfCheckHelpMessage Bug 35065 moved to additional contents. => Patch to remove call So some catches, maybe missed some of them ;) We may grep in test suite and in templates Searching in t/ gives : ### IDoNotExist ### marcflavour ### MARCFlavour ### SillyPreference ### testpreference ### TestPreference ### Version marcflavour => OK Version => OK Other are normal cases of test suite playing with false preferences ;) Searching t/ for C4::Context->set_preference( ### IDoNotExist ### language ### OPACFineNoRenewalsIncludeCredit ### SillyPreference ### testpreference ### TestPreference language => Bug 27490 changed to "StaffInterfaceLanguages" OPACFineNoRenewalsIncludeCredit => already fixed by Bug 39735 Other are normal cases of test suite Searching t/ for mock_preference( ### AutoLocation ### DefaultHoldExpirationUnitOfTime ### language ### marcflavour ### MultiValuedSyspref ### Version AutoLocation => renamed by Bug 26176 Opened Bug 39746 DefaultHoldExpirationUnitOfTime => Correct pref is DefaultHoldExpiration[date]UnitOfTime Opened Bug 39747 language => Added to Bug 39745 MultiValuedSyspref => No problem, its test suite playing ;) Other are OK |