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

(-)a/installer/data/mysql/atomicupdate/bug_14233.perl (+5 lines)
Lines 24-28 q{ALTER TABLE letter ADD UNIQUE KEY letter_uniq_1 (`module`,`code`,`branchcode`, Link Here
24
      OR action = 'ACQUISITION CLAIM'
24
      OR action = 'ACQUISITION CLAIM'
25
    )});
25
    )});
26
26
27
    $dbh->do(q{
28
        INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type)
29
        VALUES ('NoticesLog','',NULL,'If enabled, log changes to notice templates','YesNo')
30
    });
31
27
    NewVersion( $DBversion, 14233, "Add id field to letter table" );
32
    NewVersion( $DBversion, 14233, "Add id field to letter table" );
28
}
33
}
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+1 lines)
Lines 350-355 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
350
('NotHighlightedWords','and|or|not',NULL,'List of words to NOT highlight when OpacHitHighlight is enabled','free'),
350
('NotHighlightedWords','and|or|not',NULL,'List of words to NOT highlight when OpacHitHighlight is enabled','free'),
351
('NoticeBcc','','','Email address to bcc outgoing notices sent by email','free'),
351
('NoticeBcc','','','Email address to bcc outgoing notices sent by email','free'),
352
('NoticeCSS','',NULL,'Notices CSS url.','free'),
352
('NoticeCSS','',NULL,'Notices CSS url.','free'),
353
('NoticesLog','',NULL,'If enabled, log changes to notice templates','YesNo'),
353
('NotifyBorrowerDeparture','30',NULL,'Define number of days before expiry where circulation is warned about patron account expiry','Integer'),
354
('NotifyBorrowerDeparture','30',NULL,'Define number of days before expiry where circulation is warned about patron account expiry','Integer'),
354
('NovelistSelectEnabled','0',NULL,'Enable Novelist Select content.  Requires Novelist Profile and Password','YesNo'),
355
('NovelistSelectEnabled','0',NULL,'Enable Novelist Select content.  Requires Novelist Profile and Password','YesNo'),
355
('NovelistSelectPassword','',NULL,'Novelist select user Password','free'),
356
('NovelistSelectPassword','',NULL,'Novelist select user Password','free'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref (+6 lines)
Lines 90-95 Logging: Link Here
90
                  on: Log
90
                  on: Log
91
                  off: "Don't log"
91
                  off: "Don't log"
92
            - " successful authentications."
92
            - " successful authentications."
93
        -
94
            - pref: NoticesLog
95
              choices:
96
                  on: Log
97
                  off: "Don't log"
98
            - " changes to notice templates."
93
99
94
    Debugging:
100
    Debugging:
95
        -
101
        -
(-)a/tools/letter.pl (-4 / +7 lines)
Lines 318-324 sub add_validate { Link Here
318
        elsif ( $letter and $letter->{message_transport_type} eq $mtt and $letter->{lang} eq $lang ) {
318
        elsif ( $letter and $letter->{message_transport_type} eq $mtt and $letter->{lang} eq $lang ) {
319
            logaction( 'NOTICES', 'MODIFY', $letter->{id}, $content,
319
            logaction( 'NOTICES', 'MODIFY', $letter->{id}, $content,
320
                'Intranet' )
320
                'Intranet' )
321
              unless ( $content eq $letter->{content} );
321
              if ( C4::Context->preference("NoticesLog")
322
                && $content ne $letter->{content} );
322
            $dbh->do(
323
            $dbh->do(
323
                q{
324
                q{
324
                    UPDATE letter
325
                    UPDATE letter
Lines 343-349 sub add_validate { Link Here
343
                    lang                   => $lang
344
                    lang                   => $lang
344
                }
345
                }
345
            )->store;
346
            )->store;
346
            logaction('NOTICES', 'CREATE', $letter->id, $letter->content, 'Intranet');
347
            logaction( 'NOTICES', 'CREATE', $letter->id, $letter->content,
348
                'Intranet' )
349
              if C4::Context->preference("NoticesLog");
347
        }
350
        }
348
    }
351
    }
349
    # set up default display
352
    # set up default display
Lines 375-381 sub delete_confirmed { Link Here
375
    );
378
    );
376
    while ( my $letter = $letters->next ) {
379
    while ( my $letter = $letters->next ) {
377
        logaction( 'NOTICES', 'DELETE', $letter->id, $letter->content,
380
        logaction( 'NOTICES', 'DELETE', $letter->id, $letter->content,
378
            'Intranet' );
381
            'Intranet' )
382
          if C4::Context->preference("NoticesLog");
379
        $letter->delete;
383
        $letter->delete;
380
    }
384
    }
381
385
382
- 

Return to bug 14233