View | Details | Raw Unified | Return to bug 35467
Collapse All | Expand All

(-)a/installer/data/mysql/mandatory/sysprefs.sql (-1 / +1 lines)
Lines 13-18 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
13
('AcqViewBaskets','user','user|branch|all','Define which baskets a user is allowed to view: their own only, any within their branch, or all','Choice'),
13
('AcqViewBaskets','user','user|branch|all','Define which baskets a user is allowed to view: their own only, any within their branch, or all','Choice'),
14
('AcqWarnOnDuplicateInvoice','0','','Warn librarians when they try to create a duplicate invoice','YesNo'),
14
('AcqWarnOnDuplicateInvoice','0','','Warn librarians when they try to create a duplicate invoice','YesNo'),
15
('ActionLogsTraceDepth', '0', '', 'Sets the maximum depth of the action logs stack trace', 'Integer'),
15
('ActionLogsTraceDepth', '0', '', 'Sets the maximum depth of the action logs stack trace', 'Integer'),
16
('AdditionalContentLog','0',NULL,'If ON, log OPAC news changes','YesNo'),
16
('AdditionalContentsEditor','tinymce','tinymce|codemirror','Choose tool for editing News.', 'Choice'),
17
('AdditionalContentsEditor','tinymce','tinymce|codemirror','Choose tool for editing News.', 'Choice'),
17
('AdditionalFieldsInZ3950ResultAuthSearch', '', NULL, 'Determines which MARC field/subfields are displayed in -Additional field- column in the result of an authority Z39.50 search', 'Free'),
18
('AdditionalFieldsInZ3950ResultAuthSearch', '', NULL, 'Determines which MARC field/subfields are displayed in -Additional field- column in the result of an authority Z39.50 search', 'Free'),
18
('AdditionalFieldsInZ3950ResultSearch', '', NULL, 'Determines which MARC field/subfields are displayed in -Additional field- column in the result of a search Z3950', 'Free'),
19
('AdditionalFieldsInZ3950ResultSearch', '', NULL, 'Determines which MARC field/subfields are displayed in -Additional field- column in the result of a search Z3950', 'Free'),
Lines 432-438 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
432
('minPasswordLength','8',NULL,'Specify the minimum length of a patron/staff password','free'),
433
('minPasswordLength','8',NULL,'Specify the minimum length of a patron/staff password','free'),
433
('NewItemsDefaultLocation','','','If set, all new items will have a location of the given Location Code ( Authorized Value type LOC )',''),
434
('NewItemsDefaultLocation','','','If set, all new items will have a location of the given Location Code ( Authorized Value type LOC )',''),
434
('NewsAuthorDisplay','none','none|opac|staff|both','Display the author name for news items.','Choice'),
435
('NewsAuthorDisplay','none','none|opac|staff|both','Display the author name for news items.','Choice'),
435
('NewsLog','0',NULL,'If ON, log OPAC news changes','YesNo'),
436
('noissuescharge','5','','Define maximum amount withstanding before checkouts are blocked','Integer'),
436
('noissuescharge','5','','Define maximum amount withstanding before checkouts are blocked','Integer'),
437
('NoIssuesChargeGuarantees','','','Define maximum amount withstanding before checkouts are blocked','Integer'),
437
('NoIssuesChargeGuarantees','','','Define maximum amount withstanding before checkouts are blocked','Integer'),
438
('NoIssuesChargeGuarantorsWithGuarantees','','','Define maximum amount withstanding before checkouts are blocked including guarantors and their other guarantees','Integer'),
438
('NoIssuesChargeGuarantorsWithGuarantees','','','Define maximum amount withstanding before checkouts are blocked including guarantors and their other guarantees','Integer'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/action-logs.inc (-1 / +1 lines)
Lines 35-41 Link Here
35
    [% CASE 'NOTICES' %]
35
    [% CASE 'NOTICES' %]
36
        <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 %]
36
        <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 %]
37
    [% CASE 'NEWS' %]
37
    [% CASE 'NEWS' %]
38
        <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 %]
38
        <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 %]
39
    [% CASE 'RECALLS' %]
39
    [% CASE 'RECALLS' %]
40
        <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 %]
40
        <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 %]
41
    [% CASE 'SUGGESTION' %]
41
    [% CASE 'SUGGESTION' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref (-2 / +2 lines)
Lines 109-119 Logging: Link Here
109
                  0: "Don't log"
109
                  0: "Don't log"
110
            - " changes to notice templates."
110
            - " changes to notice templates."
111
        -
111
        -
112
            - pref: NewsLog
112
            - pref: AdditionalContentLog
113
              choices:
113
              choices:
114
                  1: Log
114
                  1: Log
115
                  0: "Don't log"
115
                  0: "Don't log"
116
            - " changes to news entries and other contents managed in the news tool."
116
            - " changes to HTML customizations, news entires, pages, and other content managed in the additional content tools."
117
        -
117
        -
118
            - pref: RecallsLog
118
            - pref: RecallsLog
119
              choices:
119
              choices:
(-)a/tools/additional-contents.pl (-5 / +4 lines)
Lines 143-149 if ( $op eq 'add_form' ) { Link Here
143
                    my $existing_content = $existing_contents->find($id);
143
                    my $existing_content = $existing_contents->find($id);
144
                    if ($existing_content) {
144
                    if ($existing_content) {
145
                        if ( $existing_content->title ne $title || $existing_content->content ne $content ) {
145
                        if ( $existing_content->title ne $title || $existing_content->content ne $content ) {
146
                            if ( C4::Context->preference("NewsLog") ) {
146
                            if ( C4::Context->preference("AdditionalContentLog") ) {
147
                                logaction(
147
                                logaction(
148
                                    'NEWS', 'MODIFY', undef,
148
                                    'NEWS', 'MODIFY', undef,
149
                                    sprintf( "%s|%s|%s|%s", $code, $title, $lang, $content )
149
                                    sprintf( "%s|%s|%s|%s", $code, $title, $lang, $content )
Lines 152-165 if ( $op eq 'add_form' ) { Link Here
152
                        } else {
152
                        } else {
153
                            $translated_content->{updated_on} = $existing_content->updated_on;
153
                            $translated_content->{updated_on} = $existing_content->updated_on;
154
                        }
154
                        }
155
                    } elsif ( C4::Context->preference("NewsLog") ) {
155
                    } elsif ( C4::Context->preference("AdditionalContentLog") ) {
156
                        logaction( 'NEWS', 'ADD', undef, sprintf( "%s|%s|%s|%s", $code, $title, $lang, $content ) );
156
                        logaction( 'NEWS', 'ADD', undef, sprintf( "%s|%s|%s|%s", $code, $title, $lang, $content ) );
157
                    }
157
                    }
158
158
159
                    push @translated_contents, $translated_content;
159
                    push @translated_contents, $translated_content;
160
                }
160
                }
161
161
162
                if ( C4::Context->preference("NewsLog") ) {
162
                if ( C4::Context->preference("AdditionalContentLog") ) {
163
                    my @existing_ids = $existing_contents->get_column('id');
163
                    my @existing_ids = $existing_contents->get_column('id');
164
                    my @deleted_ids  = array_minus( @existing_ids, @seen_ids );
164
                    my @deleted_ids  = array_minus( @existing_ids, @seen_ids );
165
                    for my $id (@deleted_ids) {
165
                    for my $id (@deleted_ids) {
Lines 197-203 if ( $op eq 'add_form' ) { Link Here
197
            sub {
197
            sub {
198
                my $contents = Koha::AdditionalContents->search( { id => \@ids } );
198
                my $contents = Koha::AdditionalContents->search( { id => \@ids } );
199
199
200
                if ( C4::Context->preference("NewsLog") ) {
200
                if ( C4::Context->preference("AdditionalContentLog") ) {
201
                    while ( my $c = $contents->next ) {
201
                    while ( my $c = $contents->next ) {
202
                        my $translated_contents = $c->translated_contents;
202
                        my $translated_contents = $c->translated_contents;
203
                        while ( my $translated_content = $translated_contents->next ) {
203
                        while ( my $translated_content = $translated_contents->next ) {
204
- 

Return to bug 35467