Lines 79-85
if (C4::Context->preference("BakerTaylorEnabled")) {
Link Here
|
79 |
} |
79 |
} |
80 |
|
80 |
|
81 |
my $referer = $query->param('referer') || $op; |
81 |
my $referer = $query->param('referer') || $op; |
82 |
my $category = $query->param('category') || 1; |
82 |
my $category = 1; |
|
|
83 |
if ( $query->param('category') && ( |
84 |
($query->param('category') == 1) || |
85 |
($query->param('category') == 2) |
86 |
) |
87 |
){ |
88 |
$category = $query->param('category'); |
89 |
} |
90 |
|
83 |
my ( $shelf, $shelfnumber, @messages ); |
91 |
my ( $shelf, $shelfnumber, @messages ); |
84 |
|
92 |
|
85 |
if ( $op eq 'add_form' ) { |
93 |
if ( $op eq 'add_form' ) { |
Lines 107-113
if ( $op eq 'add_form' ) {
Link Here
|
107 |
$shelf = Koha::Virtualshelf->new( |
115 |
$shelf = Koha::Virtualshelf->new( |
108 |
{ shelfname => scalar $query->param('shelfname'), |
116 |
{ shelfname => scalar $query->param('shelfname'), |
109 |
sortfield => scalar $query->param('sortfield'), |
117 |
sortfield => scalar $query->param('sortfield'), |
110 |
category => scalar $query->param('category') || 1, |
118 |
category => $category || 1, |
111 |
allow_change_from_owner => $allow_changes_from > 0, |
119 |
allow_change_from_owner => $allow_changes_from > 0, |
112 |
allow_change_from_others => $allow_changes_from == ANYONE, |
120 |
allow_change_from_others => $allow_changes_from == ANYONE, |
113 |
owner => scalar $loggedinuser, |
121 |
owner => scalar $loggedinuser, |
Lines 141-147
if ( $op eq 'add_form' ) {
Link Here
|
141 |
my $allow_changes_from = $query->param('allow_changes_from'); |
149 |
my $allow_changes_from = $query->param('allow_changes_from'); |
142 |
$shelf->allow_change_from_owner( $allow_changes_from > 0 ); |
150 |
$shelf->allow_change_from_owner( $allow_changes_from > 0 ); |
143 |
$shelf->allow_change_from_others( $allow_changes_from == ANYONE ); |
151 |
$shelf->allow_change_from_others( $allow_changes_from == ANYONE ); |
144 |
$shelf->category( scalar $query->param('category') ); |
152 |
$shelf->category( $category ); |
145 |
eval { $shelf->store }; |
153 |
eval { $shelf->store }; |
146 |
|
154 |
|
147 |
if ($@) { |
155 |
if ($@) { |
148 |
- |
|
|