Browse Source

[22/30] Adding a syspref to limit the number of images which can be stored in the db at any one time by the Patron Card image managera

This will keep the db a sane size. Setting this to NULL will result in no
    limit being enforced.
3.2.x
Chris Nighswonger 15 years ago
parent
commit
c44d08bff2
  1. 15
      admin/systempreferences.pl
  2. 1
      installer/data/mysql/en/mandatory/sysprefs.sql
  3. 7
      installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
  4. 1
      koha-tmpl/intranet-tmpl/prog/en/includes/sysprefs-menu.inc

15
admin/systempreferences.pl

@ -23,7 +23,7 @@
=head1 systempreferences.pl
ALGO :
ALSO :
this script use an $op to know what to do.
if $op is empty or none of the above values,
- the default screen is build (with all records, or filtered datas).
@ -264,8 +264,8 @@ $tabsysprefs{BakerTaylorPassword} = 'EnhancedContent';
$tabsysprefs{BakerTaylorUsername} = 'EnhancedContent';
# Library Thing for Libraries
$tabsysprefs{LibraryThingForLibrariesID} = "EnhancedContent";
$tabsysprefs{LibraryThingForLibrariesEnabled} = "EnhancedContent";
$tabsysprefs{LibraryThingForLibrariesID} = "EnhancedContent";
$tabsysprefs{LibraryThingForLibrariesEnabled} = "EnhancedContent";
$tabsysprefs{LibraryThingForLibrariesTabbedView} = "EnhancedContent";
# Syndetics
@ -382,6 +382,11 @@ $tabsysprefs{'OAI-PMH:Subset'} = "OAI-PMH";
# ILS-DI variables
$tabsysprefs{'ILS-DI'} = "ILS-DI";
# Creator variables
$tabsysprefs{'ImageLimit'} = "Creators";
sub StringSearch {
my ( $searchstring, $type ) = @_;
my $dbh = C4::Context->dbh;
@ -413,8 +418,8 @@ sub StringSearch {
if ( $type and $type eq 'all' ) {
$sth = $dbh->prepare( "
SELECT *
FROM systempreferences
WHERE variable LIKE ? OR explanation LIKE ?
FROM systempreferences
WHERE variable LIKE ? OR explanation LIKE ?
ORDER BY VARIABLE" );
$sth->execute( "%$searchstring%", "%$searchstring%" );
} else {

1
installer/data/mysql/en/mandatory/sysprefs.sql

@ -274,3 +274,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACPatronDetails','1','If OFF the patron details tab in the OPAC is disabled.','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACFinesTab','1','If OFF the patron fines tab in the OPAC is disabled.','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('RoutingListAddReserves','1','If ON the patrons on routing lists are automatically added to holds on the issue.','','YesNo');
INSERT INTO systempreferences VALUES ('ImageLimit',5,'','Limit images stored in the database by the Patron Card image manager to this number.','Integer');

7
installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql

@ -250,8 +250,8 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES (
INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` ) VALUES ( 'StaffSerialIssueDisplayCount', '3', '', 'Nombre de bulletins à afficher pour chaque abonnement dans l''interface pro', 'Integer');
INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` ) VALUES ( 'OPACSerialIssueDisplayCount', '3', '', 'Nombre de bulletins à afficher pour chaque abonnement à l''OPAC', 'Integer');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACShowCheckoutName','0','Affiche à l''OPAC le nom du lecteur qui a emprunté le document. Attention : la plupart des bibliothèques laisseront ce paramètre à Off. Il sera utile à des bibliothèques d''entreprise','','YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type)VALUES('LibraryThingForLibrariesID','','Voir : http://librarything.com/forlibraries/','','free');
INSERT INTO systempreferences (variable,value,explanation,options,type)VALUES('LibraryThingForLibrariesEnabled','0','Active les service Library Thing','','YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type)VALUES('LibraryThingForLibrariesID','','Voir : http://librarything.com/forlibraries/','','free');
INSERT INTO systempreferences (variable,value,explanation,options,type)VALUES('LibraryThingForLibrariesEnabled','0','Active les service Library Thing','','YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type)VALUES('LibraryThingForLibrariesTabbedView','0','Met le contenu de LibraryThingForLibraries dans les onglets.','','YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type)VALUES('viewISBD','1','Autoriser l''affichage de la vue ISBD des notices bibliographiques','','YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type)VALUES('viewLabeledMARC','0','Autoriser l''affichage MARC labellis des notices bibliographiques','','YesNo');
@ -273,3 +273,6 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('opacSerialDefaultTab', 'serialcollection', 'Ce paramètre définit l''onglet par défaut pour l''affichage des périodiques dans l''OPAC.', 'holdings|serialcollection|subscriptions', 'Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('RoutingListAddReserves','1','Si activé, des reservations sont automatiquement créées pour chaque lecteur de la liste de circulation d''un numéro de périodique','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SpecifyDueDate',1,'Autorise ou non le bibliothécaire à spécifier la date de retour dans le module circulation','','YesNo');
INSERT INTO systempreferences VALUES ('ImageLimit',5,'','Limiter le nombre d''images stockées en base pour la photo Lecteur à cette taille.','Integer');

1
koha-tmpl/intranet-tmpl/prog/en/includes/sysprefs-menu.inc

@ -5,6 +5,7 @@
<!-- TMPL_IF NAME="Authorities" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a title="Authority Control" href="/cgi-bin/koha/admin/systempreferences.pl?tab=Authorities">Authorities</a></li>
<!-- TMPL_IF NAME="Cataloging" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a title="Cataloging" href="/cgi-bin/koha/admin/systempreferences.pl?tab=Cataloging">Cataloging</a></li>
<!-- TMPL_IF NAME="Circulation" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a title="Circulation" href="/cgi-bin/koha/admin/systempreferences.pl?tab=Circulation">Circulation</a></li>
<!-- TMPL_IF NAME="Creators" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a title="Creators" href="/cgi-bin/koha/admin/systempreferences.pl?tab=Creators">Creators</a></li>
<!-- TMPL_IF NAME="EnhancedContent" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a title="Enhanced content settings" href="/cgi-bin/koha/admin/systempreferences.pl?tab=EnhancedContent">Enhanced Content</a></li>
<!-- TMPL_IF NAME="I18N/L10N" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a title="Internationalization and Localization" href="/cgi-bin/koha/admin/systempreferences.pl?tab=I18N/L10N">I18N/L10N</a></li>
<!-- TMPL_IF NAME="Logs" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a title="Transaction Logs" href="/cgi-bin/koha/admin/systempreferences.pl?tab=Logs">Logs</a></li>

Loading…
Cancel
Save