Bug 20100: (QA follow-up) Change syspref name to full version
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Wed, 25 Apr 2018 11:09:05 +0000 (13:09 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 25 Apr 2018 13:23:53 +0000 (10:23 -0300)
As per RM request, changing the shorter name to its full form.
Result of a git grep | sed.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
No occurrences to be found anymore with git grep -i.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

installer/data/mysql/atomicupdate/bug_20100.perl
installer/data/mysql/sysprefs.sql
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref
members/member-flags.pl

index 937656a..b6c5f61 100644 (file)
@@ -1,7 +1,7 @@
 $DBversion = 'XXX';  # will be replaced by the RM
 if( CheckVersion( $DBversion ) ) {
     $dbh->do( q|
-INSERT IGNORE INTO systempreferences ( value, variable, options, explanation, type ) VALUES ( '0', 'ProtectSuperlibPrivs', NULL, 'If enabled, non-superlibrarians cannot set superlibrarian privileges', 'YesNo' );
+INSERT IGNORE INTO systempreferences ( value, variable, options, explanation, type ) VALUES ( '0', 'ProtectSuperlibrarianPrivileges', NULL, 'If enabled, non-superlibrarians cannot set superlibrarian privileges', 'YesNo' );
     |);
 
     SetVersion( $DBversion );
index f951ea4..74c5ced 100644 (file)
@@ -443,7 +443,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
 ('printcirculationslips','1','','If ON, enable printing circulation receipts','YesNo'),
 ('PrintNoticesMaxLines','0','','If greater than 0, sets the maximum number of lines an overdue notice will print. If the number of items is greater than this number, the notice will end with a warning asking the borrower to check their online account for a full list of overdue items.','Integer'),
 ('ProcessingFeeNote', '', NULL, 'Set the text to be recorded in the column note, table accountlines when the processing fee (defined in item type) is applied', 'textarea'),
-('ProtectSuperlibPrivs','0',NULL,'If enabled, non-superlibrarians cannot set superlibrarian privileges','YesNo'),
+('ProtectSuperlibrarianPrivileges','0',NULL,'If enabled, non-superlibrarians cannot set superlibrarian privileges','YesNo'),
 ('PurgeSuggestionsOlderThan', '', NULL, 'If this script is called without the days parameter', 'Integer'),
 ('QueryAutoTruncate','1',NULL,'If ON, query truncation is enabled by default','YesNo'),
 ('QueryFuzzy','1',NULL,'If ON, enables fuzzy option for searches','YesNo'),
index f484df4..ad50390 100644 (file)
@@ -200,7 +200,7 @@ Patrons:
            class: integer
          - failed login attempts.
      -
-         - pref: ProtectSuperlibPrivs
+         - pref: ProtectSuperlibrarianPrivileges
            choices:
                yes: Allow only superlibrarians
                no: Do not block permitted non-superlibrarians
index 3a0155e..04582ea 100755 (executable)
@@ -84,7 +84,7 @@ if ($input->param('newflags')) {
     }
     
     $sth = $dbh->prepare("UPDATE borrowers SET flags=? WHERE borrowernumber=?");
-    if( !C4::Context->preference('ProtectSuperlibPrivs') || C4::Context->IsSuperLibrarian ) {
+    if( !C4::Context->preference('ProtectSuperlibrarianPrivileges') || C4::Context->IsSuperLibrarian ) {
         $sth->execute($module_flags, $member);
     } else {
         my $old_flags = $patron->flags // 0;
@@ -206,7 +206,7 @@ $template->param(
     loop           => \@loop,
     csrf_token =>
         Koha::Token->new->generate_csrf( { session_id => scalar $input->cookie('CGISESSID'), } ),
-    disable_superlibrarian_privs => C4::Context->preference('ProtectSuperlibPrivs') ? !C4::Context->IsSuperLibrarian : 0,
+    disable_superlibrarian_privs => C4::Context->preference('ProtectSuperlibrarianPrivileges') ? !C4::Context->IsSuperLibrarian : 0,
 );
 
     output_html_with_http_headers $input, $cookie, $template->output;