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

(-)a/C4/AuthoritiesMarc.pm (+4 lines)
Lines 26-31 use C4::Search; Link Here
26
use C4::AuthoritiesMarc::MARC21;
26
use C4::AuthoritiesMarc::MARC21;
27
use C4::AuthoritiesMarc::UNIMARC;
27
use C4::AuthoritiesMarc::UNIMARC;
28
use C4::Charset;
28
use C4::Charset;
29
use C4::Log;
29
30
30
use vars qw($VERSION @ISA @EXPORT);
31
use vars qw($VERSION @ISA @EXPORT);
31
32
Lines 701-706 sub AddAuthority { Link Here
701
    $sth->execute($authid,$authtypecode,$record->as_usmarc,$record->as_xml_record($format));
702
    $sth->execute($authid,$authtypecode,$record->as_usmarc,$record->as_xml_record($format));
702
    $sth->finish;
703
    $sth->finish;
703
  }
704
  }
705
  logaction( "AUTHORITIES", "ADD", $authid, "authority" ) if C4::Context->preference("AuthoritiesLog");
704
  ModZebra($authid,'specialUpdate',"authorityserver",$oldRecord,$record);
706
  ModZebra($authid,'specialUpdate',"authorityserver",$oldRecord,$record);
705
  return ($authid);
707
  return ($authid);
706
}
708
}
Lines 718-723 sub DelAuthority { Link Here
718
    my ($authid) = @_;
720
    my ($authid) = @_;
719
    my $dbh=C4::Context->dbh;
721
    my $dbh=C4::Context->dbh;
720
722
723
    logaction( "AUTHORITIES", "DELETE", $authid, "authority" ) if C4::Context->preference("AuthoritiesLog");
721
    ModZebra($authid,"recordDelete","authorityserver",GetAuthority($authid),undef);
724
    ModZebra($authid,"recordDelete","authorityserver",GetAuthority($authid),undef);
722
    $dbh->do("delete from auth_header where authid=$authid") ;
725
    $dbh->do("delete from auth_header where authid=$authid") ;
723
726
Lines 748-753 sub ModAuthority { Link Here
748
      print AUTH $authid;
751
      print AUTH $authid;
749
      close AUTH;
752
      close AUTH;
750
  }
753
  }
754
  logaction( "AUTHORITIES", "MODIFY", $authid, "BEFORE=>" . $oldrecord->as_formatted ) if C4::Context->preference("AuthoritiesLog");
751
  return $authid;
755
  return $authid;
752
}
756
}
753
757
(-)a/installer/data/mysql/en/mandatory/sysprefs.sql (+1 lines)
Lines 285-287 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES Link Here
285
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
285
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
286
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo');
286
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo');
287
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
287
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
288
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AuthoritiesLog','0','If ON, log edit/create/delete actions on authorities.','0','YesNo');
(-)a/installer/data/mysql/updatedatabase.pl (+7 lines)
Lines 4014-4019 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
4014
    SetVersion ($DBversion);
4014
    SetVersion ($DBversion);
4015
}
4015
}
4016
4016
4017
$DBversion = 'XXX';
4018
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
4019
   $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AuthoritiesLog','0','If ON, log edit/create/delete actions on authorities.','0','YesNo');");
4020
   print "Upgrade to $DBversion done (Add AuthoritiesLog syspref)\n";
4021
   SetVersion ($DBversion);
4022
}
4023
4017
=head1 FUNCTIONS
4024
=head1 FUNCTIONS
4018
4025
4019
=head2 DropAllForeignKeys($table)
4026
=head2 DropAllForeignKeys($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref (+6 lines)
Lines 18-23 Logging: Link Here
18
              off: "Don't log"
18
              off: "Don't log"
19
        - any changes to bibliographic or item records. Since this occurs whenever a book is checked in or out as well, it is not advisable to turn this on.
19
        - any changes to bibliographic or item records. Since this occurs whenever a book is checked in or out as well, it is not advisable to turn this on.
20
    -
20
    -
21
        - pref: AuthoritiesLog
22
          choices:
23
              on: Log
24
              off: "Don't log"
25
        - changes to authorities records.
26
    -
21
        - pref: FinesLog
27
        - pref: FinesLog
22
          choices:
28
          choices:
23
              on: Log
29
              on: Log
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tmpl (-2 / +6 lines)
Lines 44-49 Link Here
44
								<select name="modules" id="modules" multiple="multiple">
44
								<select name="modules" id="modules" multiple="multiple">
45
									<option value="" selected="selected">All</option>
45
									<option value="" selected="selected">All</option>
46
									<option value ="CATALOGUING">Catalog</option>
46
									<option value ="CATALOGUING">Catalog</option>
47
									<option value ="AUTHORITIES">Authorities</option>
47
									<option value ="MEMBERS">Patrons</option>
48
									<option value ="MEMBERS">Patrons</option>
48
									<option value ="ACQUISITION">Acquisitions</option>
49
									<option value ="ACQUISITION">Acquisitions</option>
49
									<option value ="SERIAL">Serials</option>
50
									<option value ="SERIAL">Serials</option>
Lines 172-178 Link Here
172
														<!-- TMPL_IF EXPR="module eq 'SERIAL'" -->
173
														<!-- TMPL_IF EXPR="module eq 'SERIAL'" -->
173
															<a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=<!-- TMPL_VAR NAME="object" -->"> <!-- TMPL_VAR NAME="object" --> </a>
174
															<a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=<!-- TMPL_VAR NAME="object" -->"> <!-- TMPL_VAR NAME="object" --> </a>
174
														<!-- TMPL_ELSE -->
175
														<!-- TMPL_ELSE -->
175
															<!-- TMPL_VAR NAME="object" -->
176
															<!-- TMPL_IF EXPR="module eq 'AUTHORITIES'" -->
177
																<a href="/cgi-bin/koha/authorities/detail.pl?authid=<!-- TMPL_VAR NAME="object" -->" title="Display detail for this authority">auth <!-- TMPL_VAR NAME="object" --></a>
178
															<!-- TMPL_ELSE -->
179
																<!-- TMPL_VAR NAME="object" -->
180
															<!-- /TMPL_IF -->
176
														<!-- /TMPL_IF -->
181
														<!-- /TMPL_IF -->
177
													<!-- /TMPL_IF -->
182
													<!-- /TMPL_IF -->
178
												<!-- /TMPL_IF -->
183
												<!-- /TMPL_IF -->
179
- 

Return to bug 5783