Adds prefs for facets in sql install files and updatedatabase script.
---
 installer/data/mysql/de-DE/mandatory/sysprefs.sql  |    2 ++
 installer/data/mysql/en/mandatory/sysprefs.sql     |    2 ++
 .../1-Obligatoire/unimarc_standard_systemprefs.sql |    4 +++-
 installer/data/mysql/it-IT/necessari/sysprefs.sql  |    4 +++-
 installer/data/mysql/pl-PL/mandatory/sysprefs.sql  |    4 +++-
 ...m_preferences_full_optimal_for_install_only.sql |    4 +++-
 ...m_preferences_full_optimal_for_install_only.sql |    4 +++-
 installer/data/mysql/updatedatabase.pl             |    8 ++++++++
 8 files changed, 27 insertions(+), 5 deletions(-)

diff --git a/installer/data/mysql/de-DE/mandatory/sysprefs.sql 
b/installer/data/mysql/de-DE/mandatory/sysprefs.sql
index 02511d8..7c9a35d 100644
--- a/installer/data/mysql/de-DE/mandatory/sysprefs.sql
+++ b/installer/data/mysql/de-DE/mandatory/sysprefs.sql
@@ -285,3 +285,5 @@ INSERT INTO systempreferences 
(variable,value,explanation,options,type) VALUES('
 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES 
('ShelfBrowserUsesLocation','1','Use the item location when finding items for 
the shelf browser.','1','YesNo');
 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');
 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');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) 
VALUES('displayFacetCount', '0', NULL, NULL, 'YesNo');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) 
VALUES('maxRecordsForFacets', '20', NULL, NULL, 'Integer');
diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql 
b/installer/data/mysql/en/mandatory/sysprefs.sql
index 0b75e98..7f018e2 100644
--- a/installer/data/mysql/en/mandatory/sysprefs.sql
+++ b/installer/data/mysql/en/mandatory/sysprefs.sql
@@ -285,3 +285,5 @@ INSERT INTO `systempreferences` 
(variable,value,explanation,options,type) VALUES
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) 
VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding 
items for the shelf browser.','1','YesNo');
 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');
 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');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) 
VALUES('displayFacetCount', '0', NULL, NULL, 'YesNo');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) 
VALUES('maxRecordsForFacets', '20', NULL, NULL, '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 757f255..a18a8ae 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
@@ -286,4 +286,6 @@ INSERT INTO systempreferences 
(variable,value,explanation,options,type) VALUES('
 INSERT INTO systempreferences (variable,value,explanation,options,type) 
VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
 INSERT INTO systempreferences (variable,value,explanation,options,type) 
VALUES('ShelfBrowserUsesLocation','1','Use the item location when finding items 
for the shelf browser.','1','YesNo');
 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');
-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');
\ No newline at end of file
+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');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) 
VALUES('displayFacetCount', '0', NULL, NULL, 'YesNo');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) 
VALUES('maxRecordsForFacets', '20', NULL, NULL, 'Integer');
diff --git a/installer/data/mysql/it-IT/necessari/sysprefs.sql 
b/installer/data/mysql/it-IT/necessari/sysprefs.sql
index 79c469c..9afa38a 100644
--- a/installer/data/mysql/it-IT/necessari/sysprefs.sql
+++ b/installer/data/mysql/it-IT/necessari/sysprefs.sql
@@ -271,4 +271,6 @@ INSERT INTO systempreferences 
(variable,value,explanation,options,type) VALUES('
 INSERT INTO systempreferences (variable,value,explanation,options,type) 
VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES 
('ShelfBrowserUsesLocation','1','Use the item location when finding items for 
the shelf browser.','1','YesNo');
 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');
-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');
\ No newline at end of file
+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');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) 
VALUES('displayFacetCount', '0', NULL, NULL, 'YesNo');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) 
VALUES('maxRecordsForFacets', '20', NULL, NULL, 'Integer');
diff --git a/installer/data/mysql/pl-PL/mandatory/sysprefs.sql 
b/installer/data/mysql/pl-PL/mandatory/sysprefs.sql
index 8689c4c..661b28f 100644
--- a/installer/data/mysql/pl-PL/mandatory/sysprefs.sql
+++ b/installer/data/mysql/pl-PL/mandatory/sysprefs.sql
@@ -283,4 +283,6 @@ INSERT INTO systempreferences 
(variable,value,explanation,options,type) VALUES('
 INSERT INTO systempreferences (variable,value,explanation,options,type) 
VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES 
('ShelfBrowserUsesLocation','1','Use the item location when finding items for 
the shelf browser.','1','YesNo');
 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');
-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');
\ No newline at end of file
+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');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) 
VALUES('displayFacetCount', '0', NULL, NULL, 'YesNo');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) 
VALUES('maxRecordsForFacets', '20', NULL, NULL, 'Integer');
diff --git 
a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql
 
b/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql
index c862e60..943cadf 100644
--- 
a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql
+++ 
b/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql
@@ -338,4 +338,6 @@ INSERT INTO systempreferences 
(variable,value,explanation,options,type) VALUES('
 INSERT INTO systempreferences (variable,value,explanation,options,type) 
VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES 
('ShelfBrowserUsesLocation','1','Use the item location when finding items for 
the shelf browser.','1','YesNo');
 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');
-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');
\ No newline at end of file
+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');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) 
VALUES('displayFacetCount', '0', NULL, NULL, 'YesNo');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) 
VALUES('maxRecordsForFacets', '20', NULL, NULL, 'Integer');
diff --git 
a/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql
 
b/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql
index 82e285b..0c16983 100644
--- 
a/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql
+++ 
b/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql
@@ -363,4 +363,6 @@ INSERT INTO systempreferences 
(variable,value,explanation,options,type) VALUES('
 INSERT INTO systempreferences (variable,value,explanation,options,type) 
VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES 
('ShelfBrowserUsesLocation','1','Use the item location when finding items for 
the shelf browser.','1','YesNo');
 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');
-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');
\ No newline at end of file
+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');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) 
VALUES('displayFacetCount', '0', NULL, NULL, 'YesNo');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) 
VALUES('maxRecordsForFacets', '20', NULL, NULL, 'Integer');
diff --git a/installer/data/mysql/updatedatabase.pl 
b/installer/data/mysql/updatedatabase.pl
index 31aa998..662969e 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -4014,6 +4014,14 @@ if (C4::Context->preference("Version") < 
TransformToNum($DBversion)) {
     SetVersion ($DBversion);
 }
 
+$DBversion = '3.03.00.XXX'; #FIXME
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+    $dbh->do("INSERT INTO systempreferences 
(variable,value,explanation,options,type) VALUES('displayFacetCount', '0', 
NULL, NULL, 'YesNo')");
+    $dbh->do("INSERT INTO systempreferences 
(variable,value,explanation,options,type) VALUES('maxRecordsForFacets', '20', 
NULL, NULL, 'Integer')");
+    print "Upgrade to $DBversion done (Preferences for facet count)\n";
+    SetVersion ($DBversion);
+}
+
 =head1 FUNCTIONS
 
 =head2 DropAllForeignKeys($table)
-- 
1.6.0.6

_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to