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

(-)a/Koha/Exceptions.pm (+4 lines)
Lines 28-33 use Exception::Class ( Link Here
28
    'Koha::Exceptions::Virtualshelves::ShareHasExpired' => {
28
    'Koha::Exceptions::Virtualshelves::ShareHasExpired' => {
29
        isa => 'Koha::Exceptions::Exception',
29
        isa => 'Koha::Exceptions::Exception',
30
        description=> 'Cannot share this shelf, the share has expired',
30
        description=> 'Cannot share this shelf, the share has expired',
31
    },
32
    'Koha::Exceptions::Virtualshelves::UseDbAdminAccount' => {
33
        isa => 'Koha::Exceptions::Exception',
34
        description => "Invalid use of database administrator account",
31
    }
35
    }
32
);
36
);
33
37
(-)a/Koha/Virtualshelf.pm (+4 lines)
Lines 51-56 our $PUBLIC = 2; Link Here
51
sub store {
51
sub store {
52
    my ( $self ) = @_;
52
    my ( $self ) = @_;
53
53
54
    unless ( $self->owner ) {
55
        Koha::Exceptions::Virtualshelves::UseDbAdminAccount->throw;
56
    }
57
54
    unless ( $self->is_shelfname_valid ) {
58
    unless ( $self->is_shelfname_valid ) {
55
        Koha::Exceptions::Virtualshelves::DuplicateObject->throw;
59
        Koha::Exceptions::Virtualshelves::DuplicateObject->throw;
56
    }
60
    }
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt (-1 / +2 lines)
Lines 351-356 function placeHold () { Link Here
351
            No biblio has been removed.
351
            No biblio has been removed.
352
        [% CASE 'Koha::Exceptions::Virtualshelves::DuplicateObject' %]
352
        [% CASE 'Koha::Exceptions::Virtualshelves::DuplicateObject' %]
353
            An error occurred when inserting this list. The name already [% shelfname %] exists.
353
            An error occurred when inserting this list. The name already [% shelfname %] exists.
354
        [% CASE 'Koha::Exceptions::Virtualshelves::UseDbAdminAccount' %]
355
            List could not be created. (Do not use the database administrator account.).
354
        [% CASE 'DBIx::Class::Exception' %]
356
        [% CASE 'DBIx::Class::Exception' %]
355
            [% m.msg %]
357
            [% m.msg %]
356
        [% CASE %]
358
        [% CASE %]
357
- 

Return to bug 14544