@@ -, +, @@ was used --- C4/Auth.pm | 8 ++++---- admin/background_jobs.pl | 4 ++-- catalogue/ISBDdetail.pl | 4 ++-- catalogue/MARCdetail.pl | 4 ++-- catalogue/detail.pl | 4 ++-- catalogue/labeledMARCdetail.pl | 4 ++-- catalogue/moredetail.pl | 4 ++-- catalogue/search.pl | 4 ++-- opac/opac-addbybiblionumber.pl | 14 +++++++------- opac/opac-detail.pl | 2 +- opac/opac-search.pl | 4 ++-- 11 files changed, 28 insertions(+), 28 deletions(-) --- a/C4/Auth.pm +++ a/C4/Auth.pm @@ -287,12 +287,12 @@ sub get_template_and_user { my $some_private_shelves = Koha::Virtualshelves->get_some_shelves( { borrowernumber => $borrowernumber, - category => 1, + public => 0, } ); my $some_public_shelves = Koha::Virtualshelves->get_some_shelves( { - category => 2, + public => 1, } ); $template->param( @@ -431,7 +431,7 @@ sub get_template_and_user { require Koha::Virtualshelves; my $some_public_shelves = Koha::Virtualshelves->get_some_shelves( { - category => 2, + public => 1, } ); $template->param( @@ -1356,7 +1356,7 @@ sub checkauth { require Koha::Virtualshelves; my $some_public_shelves = Koha::Virtualshelves->get_some_shelves( { - category => 2, + public => 1, } ); $template->param( --- a/admin/background_jobs.pl +++ a/admin/background_jobs.pl @@ -54,8 +54,8 @@ if ( $op eq 'view' ) { $template->param( lists => scalar Koha::Virtualshelves->search( [ - { category => 1, owner => $loggedinuser }, - { category => 2 } + { public => 0, owner => $loggedinuser }, + { public => 1 } ] ) ) if $job->type eq 'batch_biblio_record_modification'; --- a/catalogue/ISBDdetail.pl +++ a/catalogue/ISBDdetail.pl @@ -152,14 +152,14 @@ my $some_private_shelves = Koha::Virtualshelves->get_some_shelves( { borrowernumber => $loggedinuser, add_allowed => 1, - category => 1, + public => 0, } ); my $some_public_shelves = Koha::Virtualshelves->get_some_shelves( { borrowernumber => $loggedinuser, add_allowed => 1, - category => 2, + public => 1, } ); --- a/catalogue/MARCdetail.pl +++ a/catalogue/MARCdetail.pl @@ -344,14 +344,14 @@ my $some_private_shelves = Koha::Virtualshelves->get_some_shelves( { borrowernumber => $loggedinuser, add_allowed => 1, - category => 1, + public => 0, } ); my $some_public_shelves = Koha::Virtualshelves->get_some_shelves( { borrowernumber => $loggedinuser, add_allowed => 1, - category => 2, + public => 1, } ); --- a/catalogue/detail.pl +++ a/catalogue/detail.pl @@ -426,14 +426,14 @@ my $some_private_shelves = Koha::Virtualshelves->get_some_shelves( { borrowernumber => $borrowernumber, add_allowed => 1, - category => 1, + public => 0, } ); my $some_public_shelves = Koha::Virtualshelves->get_some_shelves( { borrowernumber => $borrowernumber, add_allowed => 1, - category => 2, + public => 1, } ); --- a/catalogue/labeledMARCdetail.pl +++ a/catalogue/labeledMARCdetail.pl @@ -138,14 +138,14 @@ my $some_private_shelves = Koha::Virtualshelves->get_some_shelves( { borrowernumber => $loggedinuser, add_allowed => 1, - category => 1, + public => 0, } ); my $some_public_shelves = Koha::Virtualshelves->get_some_shelves( { borrowernumber => $loggedinuser, add_allowed => 1, - category => 2, + public => 1, } ); --- a/catalogue/moredetail.pl +++ a/catalogue/moredetail.pl @@ -278,14 +278,14 @@ my $some_private_shelves = Koha::Virtualshelves->get_some_shelves( { borrowernumber => $loggedinuser, add_allowed => 1, - category => 1, + public => 0, } ); my $some_public_shelves = Koha::Virtualshelves->get_some_shelves( { borrowernumber => $loggedinuser, add_allowed => 1, - category => 2, + public => 1, } ); --- a/catalogue/search.pl +++ a/catalogue/search.pl @@ -719,14 +719,14 @@ my $some_private_shelves = Koha::Virtualshelves->get_some_shelves( { borrowernumber => $borrowernumber, add_allowed => 1, - category => 1, + public => 0, } ); my $some_public_shelves = Koha::Virtualshelves->get_some_shelves( { borrowernumber => $borrowernumber, add_allowed => 1, - category => 2, + public => 1, } ); --- a/opac/opac-addbybiblionumber.pl +++ a/opac/opac-addbybiblionumber.pl @@ -33,7 +33,7 @@ my $selectedshelf = $query->param('selectedshelf'); my $newshelf = $query->param('newshelf'); my $shelfnumber = $query->param('shelfnumber'); my $newvirtualshelf = $query->param('newvirtualshelf'); -my $category = $query->param('category'); +my $public = $query->param('public'); my ( $errcode, $authorized ) = ( 0, 1 ); my @biblios; @@ -56,10 +56,10 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( if ($newvirtualshelf) { if ($loggedinuser > 0 - and ( $category == 1 - or $category == 2 and $loggedinuser > 0 && C4::Context->preference('OpacAllowPublicListCreation') ) + and ( !$public + or $public and $loggedinuser > 0 && C4::Context->preference('OpacAllowPublicListCreation') ) ) { - my $shelf = eval { Koha::Virtualshelf->new( { shelfname => $newvirtualshelf, category => $category, owner => $loggedinuser, } )->store; }; + my $shelf = eval { Koha::Virtualshelf->new( { shelfname => $newvirtualshelf, public => $public, owner => $loggedinuser, } )->store; }; if ( $@ or not $shelf ) { $errcode = 1; $authorized = 0; @@ -104,21 +104,21 @@ if ($newvirtualshelf) { } else { if ( $loggedinuser > 0 ) { my $private_shelves = Koha::Virtualshelves->search( - { category => 1, + { public => 0, owner => $loggedinuser, allow_change_from_owner => 1, }, { order_by => 'shelfname' } ); my $shelves_shared_with_me = Koha::Virtualshelves->search( - { category => 1, + { public => 0, 'virtualshelfshares.borrowernumber' => $loggedinuser, allow_change_from_others => 1, }, { join => 'virtualshelfshares', } ); my $public_shelves = Koha::Virtualshelves->search( - { category => 2, + { public => 1, -or => [ -and => { allow_change_from_owner => 1, --- a/opac/opac-detail.pl +++ a/opac/opac-detail.pl @@ -925,7 +925,7 @@ if (C4::Context->preference("virtualshelves") ) { my $shelves = Koha::Virtualshelves->search( { biblionumber => $biblionumber, - category => 2, + public => 1, }, { join => 'virtualshelfcontents', --- a/opac/opac-search.pl +++ a/opac/opac-search.pl @@ -889,14 +889,14 @@ my $some_private_shelves = Koha::Virtualshelves->get_some_shelves( { borrowernumber => $borrowernumber, add_allowed => 1, - category => 1, + public => 0, } ); my $some_public_shelves = Koha::Virtualshelves->get_some_shelves( { borrowernumber => $borrowernumber, add_allowed => 1, - category => 2, + public => 1, } ); --