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

(-)a/installer/data/mysql/atomicupdate/bug_20157.perl (-2 / +1 lines)
Lines 4-11 if( CheckVersion( $DBversion ) ) { Link Here
4
    if( !column_exists( 'library_groups', 'ft_search_groups_opac' ) ) {
4
    if( !column_exists( 'library_groups', 'ft_search_groups_opac' ) ) {
5
        $dbh->do( "ALTER TABLE library_groups ADD COLUMN ft_search_groups_opac tinyint(1) NOT NULL DEFAULT 0 AFTER ft_hide_patron_info" );
5
        $dbh->do( "ALTER TABLE library_groups ADD COLUMN ft_search_groups_opac tinyint(1) NOT NULL DEFAULT 0 AFTER ft_hide_patron_info" );
6
        $dbh->do( "ALTER TABLE library_groups ADD COLUMN ft_search_groups_staff tinyint(1) NOT NULL DEFAULT 0 AFTER ft_search_groups_opac" );
6
        $dbh->do( "ALTER TABLE library_groups ADD COLUMN ft_search_groups_staff tinyint(1) NOT NULL DEFAULT 0 AFTER ft_search_groups_opac" );
7
        $dbh->do( "UPDATE library_groups SET ft_search_groups_staff = 1 WHERE title = '__SEARCH_GROUPS__'" );
7
        $dbh->do( "UPDATE library_groups SET ft_search_groups_staff = 1 AND ft_search_groups_opac = 1 WHERE title = '__SEARCH_GROUPS__'" );
8
        $dbh->do( "UPDATE library_groups SET ft_search_groups_opac = 1 WHERE title = '__SEARCH_GROUPS_OPAC__'" );
9
    }
8
    }
10
9
11
    SetVersion( $DBversion );
10
    SetVersion( $DBversion );
(-)a/installer/data/mysql/updatedatabase.pl (-13 / +3 lines)
Lines 15224-15237 $DBversion = "XXX"; Link Here
15224
if ( CheckVersion($DBversion) ) {
15224
if ( CheckVersion($DBversion) ) {
15225
15225
15226
    $dbh->do(q{
15226
    $dbh->do(q{
15227
        INSERT INTO library_groups ( title, description, created_on ) VALUES ( '__SEARCH_GROUPS__', 'Library search groups - Staff only', NOW() )
15227
        INSERT INTO library_groups ( title, description, created_on ) VALUES ( '__SEARCH_GROUPS__', 'Library search groups', NOW() )
15228
    });
15228
    });
15229
    my $search_groups_staff_root_id = $dbh->last_insert_id(undef, undef, 'library_groups', undef);
15229
    my $search_groups_root_id = $dbh->last_insert_id(undef, undef, 'library_groups', undef);
15230
15231
    $dbh->do(q{
15232
        INSERT INTO library_groups ( title, description, created_on ) VALUE ( '__SEARCH_GROUPS_OPAC__', 'Library search groups - Staff only', NOW() )
15233
    });
15234
    my $search_groups_opac_root_id = $dbh->last_insert_id(undef, undef, 'library_groups', undef);
15235
15230
15236
    my $sth = $dbh->prepare("SELECT * FROM branchcategories");
15231
    my $sth = $dbh->prepare("SELECT * FROM branchcategories");
15237
15232
Lines 15246-15256 if ( CheckVersion($DBversion) ) { Link Here
15246
        my $description = $lc->{categorycode};
15241
        my $description = $lc->{categorycode};
15247
        $description .= " - " . $lc->{codedescription} if $lc->{codedescription};
15242
        $description .= " - " . $lc->{codedescription} if $lc->{codedescription};
15248
15243
15249
        $sth2->execute(
15244
        $sth2->execute($search_groups_root_id, $lc->{categoryname}, $description);
15250
            $lc->{show_in_pulldown} ? $search_groups_opac_root_id : $search_groups_staff_root_id,
15251
            $lc->{categoryname},
15252
            $description,
15253
        );
15254
15245
15255
        my $subgroup_id = $dbh->last_insert_id(undef, undef, 'library_groups', undef);
15246
        my $subgroup_id = $dbh->last_insert_id(undef, undef, 'library_groups', undef);
15256
15247
15257
- 

Return to bug 20157