Bug 12160 - Rename [intranet|opac]userjs to [Intranet|OPAC]UserJS
Summary: Rename [intranet|opac]userjs to [Intranet|OPAC]UserJS
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 10327
  Show dependency treegraph
 
Reported: 2014-04-29 11:04 UTC by paxed
Modified: 2016-12-05 21:22 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 12160: Rename intranetuserjs with IntranetUserJS (14.32 KB, patch)
2015-04-27 14:10 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12160: Rename opacuserjs with OpacUserJS (4.66 KB, patch)
2015-04-27 14:10 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12160: Rename opacuserjs with OPACUserJS (4.66 KB, patch)
2015-04-27 14:13 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12160: Rename opacuserjs with OPACUserJS (5.26 KB, patch)
2015-04-27 14:55 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12160: Rename intranetuserjs with IntranetUserJS (14.50 KB, patch)
2015-05-01 13:58 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 12160: Rename opacuserjs with OPACUserJS (5.44 KB, patch)
2015-05-01 13:58 UTC, Mark Tompsett
Details | Diff | Splinter Review
[PASSED QA] Bug 12160: Rename intranetuserjs with IntranetUserJS (14.57 KB, patch)
2015-05-03 15:45 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 12160: Rename opacuserjs with OPACUserJS (5.51 KB, patch)
2015-05-03 15:45 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description paxed 2014-04-29 11:04:44 UTC
... to match IntranetUserCSS

The same should be done with opacuserjs.
Comment 1 Jonathan Druart 2015-04-27 14:10:42 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2015-04-27 14:10:47 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2015-04-27 14:13:52 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2015-04-27 14:55:18 UTC Comment hidden (obsolete)
Comment 5 Mark Tompsett 2015-05-01 13:52:06 UTC
Here's my checking. Looks good.

mtompset@debian:~/kohaclone$ grep -i intranetuserjs `git grep -l -i intranetuserjs | grep -v "\.po"`
C4/Auth.pm:            intranetuserjs                                                             => C4::Context->preference("intranetuserjs"),
C4/Auth.pm:        intranetuserjs                        => C4::Context->preference("intranetuserjs"),
installer/data/mysql/sysprefs.sql:('intranetuserjs','','70|10','Custom javascript for inclusion in Intranet','Textarea'),
installer/data/mysql/updatedatabase.pl:    $dbh->do("UPDATE `systempreferences` SET options='70|10' WHERE variable='intranetuserjs'");
installer/data/mysql/updatedatabase.pl:    my $intranetuserjs = C4::Context->preference('intranetuserjs');
installer/data/mysql/updatedatabase.pl:    if ($intranetuserjs  and  $intranetuserjs eq $bad_value) {
installer/data/mysql/updatedatabase.pl:WHERE variable = 'intranetuserjs'
installer/data/mysql/updatedatabase.pl:    print "Upgrade to $DBversion done (removed bogus intranetuserjs syspref)\n";
koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc:[% IF ( intranetuserjs ) %]
koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc:    [% intranetuserjs %]
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref:            - pref: intranetuserjs
koha-tmpl/intranet-tmpl/prog/en/modules/labels/spinelabel-print.tt:[% IF ( intranetuserjs ) %]
koha-tmpl/intranet-tmpl/prog/en/modules/labels/spinelabel-print.tt:    [% intranetuserjs %]
[SNIP]
mtompset@debian:~/kohaclone$ grep -i opacuserjs `git grep -l -i opacuserjs | grep -v "\.po"`
C4/Auth.pm:            opacuserjs                            => C4::Context->preference("opacuserjs"),
C4/Auth.pm:        opacuserjs                            => C4::Context->preference("opacuserjs"),
installer/data/mysql/sysprefs.sql:('opacuserjs','','70|10','Define custom javascript for inclusion in OPAC','Textarea'),
installer/data/mysql/updatedatabase.pl:    $dbh->do("UPDATE `systempreferences` SET options='70|10' WHERE variable='opacuserjs'");
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref:            - pref: opacuserjs
koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc:[% IF ( opacuserjs ) %]
koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc:        [% opacuserjs %]
[SNIP]
mtompset@debian:~/kohaclone$ git bz apply 12160
Bug 12160 - Rename [intranet|opac]userjs to [Intranet|OPAC]UserJS

38563 - Bug 12160: Rename intranetuserjs with IntranetUserJS
38566 - Bug 12160: Rename opacuserjs with OPACUserJS

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 12160: Rename intranetuserjs with IntranetUserJS
Applying: Bug 12160: Rename opacuserjs with OPACUserJS
mtompset@debian:~/kohaclone$ grep -i intranetuserjs `git grep -l -i intranetuserjs | grep -v "\.po"`
C4/Auth.pm:            IntranetUserJS                                                             => C4::Context->preference("IntranetUserJS"),
C4/Auth.pm:        IntranetUserJS                        => C4::Context->preference("IntranetUserJS"),
installer/data/mysql/atomicupdate/Bug_12160-Rename_pref_intranetuserjs_to_IntranetUserJS.sql:UPDATE systempreferences SET variable="IntranetUserJS" where variable="intranetuserjs"
installer/data/mysql/sysprefs.sql:('IntranetUserJS','','70|10','Custom javascript for inclusion in Intranet','Textarea'),
installer/data/mysql/updatedatabase.pl:    $dbh->do("UPDATE `systempreferences` SET options='70|10' WHERE variable='intranetuserjs'");
installer/data/mysql/updatedatabase.pl:    my $intranetuserjs = C4::Context->preference('intranetuserjs');
installer/data/mysql/updatedatabase.pl:    if ($intranetuserjs  and  $intranetuserjs eq $bad_value) {
installer/data/mysql/updatedatabase.pl:WHERE variable = 'intranetuserjs'
installer/data/mysql/updatedatabase.pl:    print "Upgrade to $DBversion done (removed bogus intranetuserjs syspref)\n";
koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc:[% IF ( IntranetUserJS ) %]
koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc:    [% IntranetUserJS %]
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref:            - pref: IntranetUserJS
koha-tmpl/intranet-tmpl/prog/en/modules/labels/spinelabel-print.tt:[% IF ( IntranetUserJS ) %]
koha-tmpl/intranet-tmpl/prog/en/modules/labels/spinelabel-print.tt:    [% IntranetUserJS %]
[SNIP]
mtompset@debian:~/kohaclone$ grep -i opacuserjs `git grep -l -i opacuserjs | grep -v "\.po"`
C4/Auth.pm:            OPACUserJS                            => C4::Context->preference("OPACUserJS"),
C4/Auth.pm:        OPACUserJS                            => C4::Context->preference("OPACUserJS"),
installer/data/mysql/atomicupdate/Bug_12160-Rename_pref_opacuserjs_to_OPACUserJS.sql:UPDATE systempreferences SET variable="OPACUserJS" where variable="opacuserjs"
installer/data/mysql/sysprefs.sql:('OPACUserJS','','70|10','Define custom javascript for inclusion in OPAC','Textarea'),
installer/data/mysql/updatedatabase.pl:    $dbh->do("UPDATE `systempreferences` SET options='70|10' WHERE variable='opacuserjs'");
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref:            - pref: OPACUserJS
koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc:[% IF ( OPACUserJS ) %]
koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc:        [% OPACUserJS %]
[SNIP]
Comment 6 Mark Tompsett 2015-05-01 13:58:46 UTC Comment hidden (obsolete)
Comment 7 Mark Tompsett 2015-05-01 13:58:54 UTC Comment hidden (obsolete)
Comment 8 Katrin Fischer 2015-05-03 15:45:02 UTC
Created attachment 38774 [details] [review]
[PASSED QA] Bug 12160: Rename intranetuserjs with IntranetUserJS

To match IntranetUserCSS, intranetuserjs should be renamed
IntranetUserJS.

Test plan:
1/ Be sure there is no occurrence of intranetuserjs
2/ Confirm the pref still works as before

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

NOTE: Worked before and after updatedatabase.pl, though after
      is less confusing to the person unaware of case insensitivity.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 9 Katrin Fischer 2015-05-03 15:45:43 UTC
Created attachment 38775 [details] [review]
[PASSED QA] Bug 12160: Rename opacuserjs with OPACUserJS

Test plan:
Same as previous patch for opacuserjs

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

NOTE: Worked before and after updatedatabase.pl, though after
      is less confusing to the programmer unaware of case-insensitivity.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Tomás Cohen Arazi (tcohen) 2015-05-26 14:08:57 UTC
Patches pushed to master.

Consistency, YAY!
Thanks Jonathan!