From c44d08bff2390edf4c4410ca58d3303de84acb91 Mon Sep 17 00:00:00 2001 From: Chris Nighswonger Date: Thu, 7 Jan 2010 11:18:47 -0500 Subject: [PATCH] [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. --- admin/systempreferences.pl | 15 ++++++++++----- installer/data/mysql/en/mandatory/sysprefs.sql | 1 + .../unimarc_standard_systemprefs.sql | 7 +++++-- .../prog/en/includes/sysprefs-menu.inc | 1 + 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl index b81c2ad820..44a0a851cd 100755 --- a/admin/systempreferences.pl +++ b/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 { diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql index e9df35e21f..78a46b136a 100644 --- a/installer/data/mysql/en/mandatory/sysprefs.sql +++ b/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'); diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql index 528cea1911..7b65e8a723 100644 --- a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql +++ b/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'); + + diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/sysprefs-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/sysprefs-menu.inc index 7709da52dc..6e535a5ac1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/sysprefs-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/sysprefs-menu.inc @@ -5,6 +5,7 @@
  • Authorities
  • Cataloging
  • Circulation
  • +
  • Creators
  • Enhanced Content
  • I18N/L10N
  • Logs
  • -- 2.39.5