Bugzilla – Attachment 17442 Details for
Bug 10052
Make intranetstylesheet and intranetcolorstylesheet behave exactly like their opac counterparts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10052: Db revision for intranetstylesheet
Bug-10052-Db-revision-for-intranetstylesheet.patch (text/plain), 2.43 KB, created by
Marcel de Rooy
on 2013-04-15 10:29:37 UTC
(
hide
)
Description:
Bug 10052: Db revision for intranetstylesheet
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2013-04-15 10:29:37 UTC
Size:
2.43 KB
patch
obsolete
>From bdcbc0facd65758fbf1c0d84e8c81e0ec352a112 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 15 Apr 2013 12:06:31 +0200 >Subject: [PATCH] Bug 10052: Db revision for intranetstylesheet >Content-Type: text/plain; charset=utf-8 > >Report 10052 makes the intranetstylesheet prefs behave like the opac ones. >This patch contains an optional db revision: If the pref intranetstylesheet is >not blank, and does not start with http, https or /, then prefix it with a >slash to make it an absolute path. > >Test plan: >Before applying this patch: >1) Put intranet-tmpl/prog/en/css/staff-global.css into intranetstylesheet. >This works in the current staff client, but will be interpreted as relative as >soon as both patches for this report have been applied. >Apply the patch. And run: /cgi-bin/koha/installer/install.pl?step=3&op=updatestructure >Check the webinstaller message and the pref value. There should be a slash >in front now. The css should still work. > >Continue after applying this patch with: >2) Clear the intranetstylesheet pref. Run updatestructure again. No message: OK >3) Put /intranet-tmpl/prog/en/css/staff-global.css in intranetstylesheet. >Run updatestructure again. No message: OK >4) Prefix intranetstylesheet with http://[your-server-here]. Test again. >--- > installer/data/mysql/updatedatabase.pl | 14 ++++++++++++++ > 1 files changed, 14 insertions(+), 0 deletions(-) > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 7c97a51..ab88bfc 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -6771,6 +6771,20 @@ if ( CheckVersion($DBversion) ) { > SetVersion ($DBversion); > } > >+$DBversion = "3.11.00.XXX"; >+if(CheckVersion($DBversion)) { >+ my $intra= C4::Context->preference("intranetstylesheet"); >+ #if this pref is not blank or starting with http, https or / [root], then >+ #add an additional / to the front >+ if($intra && $intra!~/^(\/|https?)/) { >+ $dbh->do("UPDATE systempreferences SET value=? WHERE variable=?", >+ undef,('/'.$intra,"intranetstylesheet")); >+ print "WARNING: Your system preference intranetstylesheet has been prefixed with a slash to make it an absolute path.\n"; >+ print "Upgrade to $DBversion done (Bug 10052: Make intranetstylesheet and intranetcolorstylesheet behave exactly like their opac counterparts)\n"; >+ } >+ SetVersion ($DBversion); >+} >+ > > =head1 FUNCTIONS > >-- >1.7.7.6
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10052
:
17441
|
17442
|
17443
|
17444
|
17445
|
17446
|
17465
|
17918
|
17919
|
17920
|
18109
|
18110
|
18111
|
18112
|
18124
|
18125
|
18126
|
18127