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 15250-15263 if ( CheckVersion($DBversion) ) { Link Here
15250
15250
15251
    if ( TableExists( 'branchcategories' ) and TableExists('branchrelations' )) {
15251
    if ( TableExists( 'branchcategories' ) and TableExists('branchrelations' )) {
15252
        $dbh->do(q{
15252
        $dbh->do(q{
15253
            INSERT INTO library_groups ( title, description, created_on ) VALUES ( '__SEARCH_GROUPS__', 'Library search groups - Staff only', NOW() )
15253
            INSERT INTO library_groups ( title, description, created_on ) VALUES ( '__SEARCH_GROUPS__', 'Library search groups', NOW() )
15254
        });
15254
        });
15255
        my $search_groups_staff_root_id = $dbh->last_insert_id(undef, undef, 'library_groups', undef);
15255
        my $search_groups_root_id = $dbh->last_insert_id(undef, undef, 'library_groups', undef);
15256
15257
        $dbh->do(q{
15258
            INSERT INTO library_groups ( title, description, created_on ) VALUE ( '__SEARCH_GROUPS_OPAC__', 'Library search groups - Staff only', NOW() )
15259
        });
15260
        my $search_groups_opac_root_id = $dbh->last_insert_id(undef, undef, 'library_groups', undef);
15261
15256
15262
        my $sth = $dbh->prepare("SELECT * FROM branchcategories");
15257
        my $sth = $dbh->prepare("SELECT * FROM branchcategories");
15263
15258
Lines 15272-15282 if ( CheckVersion($DBversion) ) { Link Here
15272
            my $description = $lc->{categorycode};
15267
            my $description = $lc->{categorycode};
15273
            $description .= " - " . $lc->{codedescription} if $lc->{codedescription};
15268
            $description .= " - " . $lc->{codedescription} if $lc->{codedescription};
15274
15269
15275
            $sth2->execute(
15270
            $sth2->execute($search_groups_root_id, $lc->{categoryname}, $description);
15276
                $lc->{show_in_pulldown} ? $search_groups_opac_root_id : $search_groups_staff_root_id,
15277
                $lc->{categoryname},
15278
                $description,
15279
            );
15280
15271
15281
            my $subgroup_id = $dbh->last_insert_id(undef, undef, 'library_groups', undef);
15272
            my $subgroup_id = $dbh->last_insert_id(undef, undef, 'library_groups', undef);
15282
15273
15283
- 

Return to bug 20157