Bugzilla – Attachment 185129 Details for
Bug 35467
NewsLog should be renamed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35467: Rename NewsLog system preference to AdditionalContent
Bug-35467-Rename-NewsLog-system-preference-to-Addi.patch (text/plain), 7.77 KB, created by
Pedro Amorim
on 2025-08-05 15:23:56 UTC
(
hide
)
Description:
Bug 35467: Rename NewsLog system preference to AdditionalContent
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2025-08-05 15:23:56 UTC
Size:
7.77 KB
patch
obsolete
>From 355c76f816a3f6da6eae641152c81e4c9a02cfbc Mon Sep 17 00:00:00 2001 >From: Andrew Fuerste Henry <andrew@bywatersolutions.com> >Date: Tue, 5 Aug 2025 13:38:18 +0000 >Subject: [PATCH] Bug 35467: Rename NewsLog system preference to > AdditionalContent > >To test: >1 - confirm whether or not NewsLog is enabled on your system >2 - apply patch, updatedatabase, restart_all >3 - search system preferences, confirm you now have > AdditionalContentLog rather than NewsLog and that the new > description is accurate >4 - confitm AdditionalContentLog shows the value you previously had for > NewsLog >5 - go to Tools > Log Viewer >6 - confirm the checkbox here is labeled "Additional Content", that it > correctly reflects the syspref value, and that it links to the > syspref >7 - with AdditionalContentLog enabled, created/edit/delete news, HTML > customizations, and pages. confirm they log >8 - with AdditionalContentLog disabled, created/edit/delete news, HTML > customizations, and pages. confirm they don't log > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk> >--- > installer/data/mysql/mandatory/sysprefs.sql | 2 +- > koha-tmpl/intranet-tmpl/prog/en/includes/action-logs.inc | 2 +- > .../prog/en/modules/admin/preferences/logs.pref | 4 ++-- > tools/additional-contents.pl | 8 ++++---- > 4 files changed, 8 insertions(+), 8 deletions(-) > >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index 76954d20229..67cd533dafb 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -13,6 +13,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('AcqViewBaskets','user','user|branch|all','Define which baskets a user is allowed to view: their own only, any within their branch, or all','Choice'), > ('AcqWarnOnDuplicateInvoice','0','','Warn librarians when they try to create a duplicate invoice','YesNo'), > ('ActionLogsTraceDepth', '0', '', 'Sets the maximum depth of the action logs stack trace', 'Integer'), >+('AdditionalContentLog','0',NULL,'If ON, log OPAC news changes','YesNo'), > ('AdditionalContentsEditor','tinymce','tinymce|codemirror','Choose tool for editing News.', 'Choice'), > ('AdditionalFieldsInZ3950ResultAuthSearch', '', NULL, 'Determines which MARC field/subfields are displayed in -Additional field- column in the result of an authority Z39.50 search', 'Free'), > ('AdditionalFieldsInZ3950ResultSearch', '', NULL, 'Determines which MARC field/subfields are displayed in -Additional field- column in the result of a search Z3950', 'Free'), >@@ -432,7 +433,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('minPasswordLength','8',NULL,'Specify the minimum length of a patron/staff password','free'), > ('NewItemsDefaultLocation','','','If set, all new items will have a location of the given Location Code ( Authorized Value type LOC )',''), > ('NewsAuthorDisplay','none','none|opac|staff|both','Display the author name for news items.','Choice'), >-('NewsLog','0',NULL,'If ON, log OPAC news changes','YesNo'), > ('noissuescharge','5','','Define maximum amount withstanding before checkouts are blocked','Integer'), > ('NoIssuesChargeGuarantees','','','Define maximum amount withstanding before checkouts are blocked','Integer'), > ('NoIssuesChargeGuarantorsWithGuarantees','','','Define maximum amount withstanding before checkouts are blocked including guarantors and their other guarantees','Integer'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/action-logs.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/action-logs.inc >index 1ab3e72af80..09455971a24 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/action-logs.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/action-logs.inc >@@ -35,7 +35,7 @@ > [% CASE 'NOTICES' %] > <span>Notices</span>[% UNLESS Koha.Preference('NoticesLog') %]<i class="log-disabled fa-solid fa-triangle-exclamation" title="Log not enabled" data-log="NoticesLog"></i>[% END %] > [% CASE 'NEWS' %] >- <span>News</span>[% UNLESS Koha.Preference('NewsLog') %]<i class="log-disabled fa-solid fa-triangle-exclamation" title="Log not enabled" data-log="NewsLog"></i>[% END %] >+ <span>Additional content</span>[% UNLESS Koha.Preference('AdditionalContentLog') %]<i class="log-disabled fa-solid fa-triangle-exclamation" title="Log not enabled" data-log="AdditionalContentLog"></i>[% END %] > [% CASE 'RECALLS' %] > <span>Recalls</span>[% UNLESS Koha.Preference('RecallsLog') %]<i class="log-disabled fa-solid fa-triangle-exclamation" title="Log not enabled" data-log="RecallsLog"></i>[% END %] > [% CASE 'SUGGESTION' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref >index c2598d19a45..5de47dbdf38 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref >@@ -109,11 +109,11 @@ Logging: > 0: "Don't log" > - " changes to notice templates." > - >- - pref: NewsLog >+ - pref: AdditionalContentLog > choices: > 1: Log > 0: "Don't log" >- - " changes to news entries and other contents managed in the news tool." >+ - " changes to HTML customizations, news entires, pages, and other content managed in the additional content tools." > - > - pref: RecallsLog > choices: >diff --git a/tools/additional-contents.pl b/tools/additional-contents.pl >index 89dacf9589c..db10d2de2e6 100755 >--- a/tools/additional-contents.pl >+++ b/tools/additional-contents.pl >@@ -143,7 +143,7 @@ if ( $op eq 'add_form' ) { > my $existing_content = $existing_contents->find($id); > if ($existing_content) { > if ( $existing_content->title ne $title || $existing_content->content ne $content ) { >- if ( C4::Context->preference("NewsLog") ) { >+ if ( C4::Context->preference("AdditionalContentLog") ) { > logaction( > 'NEWS', 'MODIFY', undef, > sprintf( "%s|%s|%s|%s", $code, $title, $lang, $content ) >@@ -152,14 +152,14 @@ if ( $op eq 'add_form' ) { > } else { > $translated_content->{updated_on} = $existing_content->updated_on; > } >- } elsif ( C4::Context->preference("NewsLog") ) { >+ } elsif ( C4::Context->preference("AdditionalContentLog") ) { > logaction( 'NEWS', 'ADD', undef, sprintf( "%s|%s|%s|%s", $code, $title, $lang, $content ) ); > } > > push @translated_contents, $translated_content; > } > >- if ( C4::Context->preference("NewsLog") ) { >+ if ( C4::Context->preference("AdditionalContentLog") ) { > my @existing_ids = $existing_contents->get_column('id'); > my @deleted_ids = array_minus( @existing_ids, @seen_ids ); > for my $id (@deleted_ids) { >@@ -197,7 +197,7 @@ if ( $op eq 'add_form' ) { > sub { > my $contents = Koha::AdditionalContents->search( { id => \@ids } ); > >- if ( C4::Context->preference("NewsLog") ) { >+ if ( C4::Context->preference("AdditionalContentLog") ) { > while ( my $c = $contents->next ) { > my $translated_contents = $c->translated_contents; > while ( my $translated_content = $translated_contents->next ) { >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 35467
:
185119
|
185120
|
185122
|
185123
|
185127
|
185128
| 185129 |
185130
|
185131
|
185132