use C4::Koha;
use C4::Languages qw(getTranslatedLanguages);
use C4::ClassSource;
+use C4::Log;
use C4::Output;
-use C4::Context;
# use Smart::Comments;
# FIXME, shouldnt we store this stuff in the systempreferences table?
+# FIXME: This uses hash in a backwards way. What we really want is:
+# $tabsysprefs{key} = $array_ref;
+# like
+# $tabsysprefs{Cataloguing} = [qw(autoBarcode ISBD marc ...)];
+#
+# Because some things *should* be on more than one tab.
+# And the tabname is the unique part (the key).
+
my %tabsysprefs;
# Acquisitions
$tabsysprefs{acquisitions}="Acquisitions";
$tabsysprefs{SessionStorage}="Admin";
$tabsysprefs{noItemTypeImages}="Admin";
$tabsysprefs{OPACBaseURL}="Admin";
+ $tabsysprefs{GranularPermissions}="Admin";
# Authorities
$tabsysprefs{authoritysep}="Authorities";
$tabsysprefs{LabelMARCView}="Cataloguing";
$tabsysprefs{marc}="Cataloguing";
$tabsysprefs{marcflavour}="Cataloguing";
- $tabsysprefs{serialsadditems}="Cataloguing";
$tabsysprefs{MARCOrgCode}="Cataloguing";
$tabsysprefs{z3950AuthorAuthFields}="Cataloguing";
$tabsysprefs{z3950NormalizeAuthor}="Cataloguing";
$tabsysprefs{IntranetmainUserblock}="StaffClient";
# Patrons
- $tabsysprefs{automembernum}="Patrons";
+ $tabsysprefs{autoMemberNum}="Patrons";
$tabsysprefs{checkdigit}="Patrons";
$tabsysprefs{intranetreadinghistory}="Patrons";
$tabsysprefs{NotifyBorrowerDeparture}="Patrons";
$tabsysprefs{NoReturnSetLost}="Patrons";
$tabsysprefs{MaxFine}="Patrons";
$tabsysprefs{NotifyBorrowerDeparture}="Patrons";
+ $tabsysprefs{AddPatronLists}="Patrons";
$tabsysprefs{PatronsPerPage}="Patrons";
-
-# FRBR
- $tabsysprefs{FRBRizeEditions}="FRBR";
- $tabsysprefs{XISBN}="FRBR";
- $tabsysprefs{OCLCAffiliateID}="FRBR";
- $tabsysprefs{XISBNDailyLimit}="FRBR";
- $tabsysprefs{PINESISBN}="FRBR";
- $tabsysprefs{ThingISBN}="FRBR";
- $tabsysprefs{OPACFRBRizeEditions}="FRBR";
+ $tabsysprefs{ExtendedPatronAttributes}="Patrons";
# I18N/L10N
$tabsysprefs{dateformat}="I18N/L10N";
$tabsysprefs{QueryAutoTruncate}="Searching";
$tabsysprefs{QueryRemoveStopwords}="Searching";
-# Amazon.com
- $tabsysprefs{AmazonContent}="Amazon";
- $tabsysprefs{AWSAccessKeyID}="Amazon";
- $tabsysprefs{AmazonLocale}="Amazon";
- $tabsysprefs{AmazonAssocTag}="Amazon";
- $tabsysprefs{AmazonSimilarItems}="Amazon";
- $tabsysprefs{OPACAmazonContent}="Amazon";
- $tabsysprefs{OPACAmazonSimilarItems}="Amazon";
+# EnhancedContent
+ $tabsysprefs{AmazonContent}="EnhancedContent";
+ $tabsysprefs{AWSAccessKeyID}="EnhancedContent";
+ $tabsysprefs{AmazonLocale}="EnhancedContent";
+ $tabsysprefs{AmazonAssocTag}="EnhancedContent";
+ $tabsysprefs{AmazonSimilarItems}="EnhancedContent";
+ $tabsysprefs{OPACAmazonContent}="EnhancedContent";
+ $tabsysprefs{OPACAmazonSimilarItems}="EnhancedContent";
+# Baker & Taylor
+ $tabsysprefs{BakerTaylorBookstoreURL} = 'EnhancedContent';
+ $tabsysprefs{BakerTaylorEnabled} = 'EnhancedContent';
+ $tabsysprefs{BakerTaylorPassword} = 'EnhancedContent';
+ $tabsysprefs{BakerTaylorUsername} = 'EnhancedContent';
+# FRBR
+ $tabsysprefs{FRBRizeEditions}="EnhancedContent";
+ $tabsysprefs{XISBN}="EnhancedContent";
+ $tabsysprefs{OCLCAffiliateID}="EnhancedContent";
+ $tabsysprefs{XISBNDailyLimit}="EnhancedContent";
+ $tabsysprefs{PINESISBN}="EnhancedContent";
+ $tabsysprefs{ThingISBN}="EnhancedContent";
+ $tabsysprefs{OPACFRBRizeEditions}="EnhancedContent";
+# Tags
+ $tabsysprefs{TagsEnabled} = 'EnhancedContent';
+ $tabsysprefs{TagsExternalDictionary} = 'EnhancedContent';
+ $tabsysprefs{TagsInputOnDetail} = 'EnhancedContent';
+ $tabsysprefs{TagsInputOnList} = 'EnhancedContent';
+ $tabsysprefs{TagsShowOnDetail} = 'EnhancedContent';
+ $tabsysprefs{TagsShowOnList} = 'EnhancedContent';
+ $tabsysprefs{TagsModeration} = 'EnhancedContent';
+ $tabsysprefs{GoogleJackets} = 'EnhancedContent';
# OPAC
$tabsysprefs{BiblioDefaultView}="OPAC";
$tabsysprefs{OpacRenewalAllowed} = "OPAC";
# LOGFeatures
- $tabsysprefs{CataloguingLog} = "LOGFeatures";
- $tabsysprefs{BorrowersLog} = "LOGFeatures";
- $tabsysprefs{SubscriptionLog} = "LOGFeatures";
- $tabsysprefs{IssueLog} = "LOGFeatures";
- $tabsysprefs{ReturnLog} = "LOGFeatures";
- $tabsysprefs{LetterLog} = "LOGFeatures";
- $tabsysprefs{FinesLog} = "LOGFeatures";
+ $tabsysprefs{CataloguingLog} = "Logs";
+ $tabsysprefs{BorrowersLog} = "Logs";
+ $tabsysprefs{SubscriptionLog} = "Logs";
+ $tabsysprefs{IssueLog} = "Logs";
+ $tabsysprefs{ReturnLog} = "Logs";
+ $tabsysprefs{LetterLog} = "Logs";
+ $tabsysprefs{FinesLog} = "Logs";
# OAI-PMH variables
$tabsysprefs{'OAI-PMH'} = "OAI-PMH";
$tabsysprefs{'OAI-PMH:Set'} = "OAI-PMH";
$tabsysprefs{'OAI-PMH:Subset'} = "OAI-PMH";
-
sub StringSearch {
my ($searchstring,$type)=@_;
my $dbh = C4::Context->dbh;
}
my $input = new CGI;
-my $searchfield=$input->param('searchfield');
-my $offset=$input->param('offset');
+my $searchfield = $input->param('searchfield');
+my $Tvalue = $input->param('Tvalue');
+my $offset = $input->param('offset');
my $script_name="/cgi-bin/koha/admin/systempreferences.pl";
my ($template, $borrowernumber, $cookie)
my $sth=$dbh->prepare("update systempreferences set value=?,explanation=?,type=?,options=? where variable=?");
$sth->execute($value, $input->param('explanation'), $input->param('variable'), $input->param('preftype'), $input->param('prefoptions'));
$sth->finish;
+ warn "logaction !! mod ";
+ logaction('SYSTEMPREFERENCE','MODIFY',undef, $input->param('variable') . " | " . $value );
}
} else {
unless (C4::Context->config('demo') eq 1) {
my $sth=$dbh->prepare("insert into systempreferences (variable,value,explanation) values (?,?,?,?,?)");
$sth->execute($input->param('variable'), $input->param('value'), $input->param('explanation'), $input->param('preftype'), $input->param('prefoptions'));
$sth->finish;
+ warn "logaction !! add ";
+ logaction('SYSTEMPREFERENCE','ADD',undef, $input->param('variable') . " | " . $input->param('value') );
}
}
$sth->finish;
my $sth=$dbh->prepare("update systempreferences set value=?,explanation=?,type=?,options=? where variable=?");
$sth->execute($value, $input->param('explanation'), $input->param('preftype'), $input->param('prefoptions'), $input->param('variable'));
$sth->finish;
+ logaction('SYSTEMPREFERENCE','MODIFY',undef, $input->param('variable') . " | " . $value );
}
} else {
unless (C4::Context->config('demo') eq 1) {
my $sth=$dbh->prepare("insert into systempreferences (variable,value,explanation,type,options) values (?,?,?,?,?)");
$sth->execute($input->param('variable'), $value, $input->param('explanation'), $input->param('preftype'), $input->param('prefoptions'));
$sth->finish;
+ logaction('SYSTEMPREFERENCE','ADD',undef, $input->param('variable') . " | " . $value );
}
}
$sth->finish;
my $dbh = C4::Context->dbh;
my $sth=$dbh->prepare("delete from systempreferences where variable=?");
$sth->execute($searchfield);
+ my $logstring = $searchfield . " | " . $Tvalue ;
+ logaction('SYSTEMPREFERENCE','DELETE',undef,$logstring);
$sth->finish;
# END $OP eq DELETE_CONFIRMED