View | Details | Raw Unified | Return to bug 27378
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_27378-add_cookie_consents.pl (+22 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "27378",
5
    description => "Adds the sysprefs for cookie consents",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
10
        $dbh->do( q| INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES ('CookieConsentedJS', '', 'Add Javascript code that will run if cookie consent is provided (e.g. tracking code).', '', 'Free'); | );
11
        say $out "Added new system preference 'CookieConsentedJS'";
12
13
        $dbh->do( q| INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES ('CookieConsent', '0', 'Require cookie consent to be displayed', '', 'YesNo'); | );
14
        say $out "Added new system preference 'CookieConsent'";
15
16
        $dbh->do( q{ INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES ('CookieConsentBar', '', 'Show the following HTML in the cookie consent bar that is displayed at the bottom of the screen', '70|10', 'Textarea'); } );
17
        say $out "Added new system preference 'CookieConsentBar'";
18
19
        $dbh->do( q{INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES ('CookieConsentPopup', '', 'Show the following HTML in the cookie consent popup', '70|10', 'Textarea');} );
20
        say $out "Added new system preference 'CookieConsentPopup'";
21
    },
22
};
(-)a/installer/data/mysql/atomicupdate/bug_27378_add_ConsentJS_syspref.perl (-8 lines)
Lines 1-8 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do( q| INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES ('ConsentJS', '', 'Specify Javascript that requires user consent to run (e.g. tracking code)', '', 'Free'); | );
4
5
    # Always end with this (adjust the bug info)
6
    SetVersion( $DBversion );
7
    print "Upgrade to $DBversion done (Bug 27378 - Add ConsentJS syspref)\n";
8
}
(-)a/installer/data/mysql/atomicupdate/bug_27378_add_CookieConsentBar_syspref.perl (-8 lines)
Lines 1-8 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do( q{ INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES ('CookieConsentBar', '', 'Show the following HTML in the cookie consent bar that is displayed at the bottom of the screen', '70|10', 'Textarea'); } );
4
5
    # Always end with this (adjust the bug info)
6
    SetVersion( $DBversion );
7
    print "Upgrade to $DBversion done (Bug 27378 - Add CookieConsentBar syspref)\n";
8
}
(-)a/installer/data/mysql/atomicupdate/bug_27378_add_CookieConsentPopup_syspref.perl (-8 lines)
Lines 1-8 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do( q{INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES ('CookieConsentPopup', '', 'Show the following HTML in the cookie consent popup', '70|10', 'Textarea');} );
4
5
    # Always end with this (adjust the bug info)
6
    SetVersion( $DBversion );
7
    print "Upgrade to $DBversion done (Bug 27378 - Add CookieConsentPopup syspref)\n";
8
}
(-)a/installer/data/mysql/atomicupdate/bug_27378_add_CookieConsent_syspref.perl (-9 lines)
Lines 1-8 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do( q| INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES ('CookieConsent', '0', 'Require cookie consent to be displayed', '', 'YesNo'); | );
4
5
    # Always end with this (adjust the bug info)
6
    SetVersion( $DBversion );
7
    print "Upgrade to $DBversion done (Bug 27378 - Add CookieConsent syspref)\n";
8
}
9
- 

Return to bug 27378