|
Lines 19-24
use Modern::Perl;
Link Here
|
| 19 |
|
19 |
|
| 20 |
use Koha::Script; |
20 |
use Koha::Script; |
| 21 |
use Koha::Items; |
21 |
use Koha::Items; |
|
|
22 |
use Koha::Biblios; |
| 22 |
use Koha::Biblioitems; |
23 |
use Koha::Biblioitems; |
| 23 |
use Koha::ItemTypes; |
24 |
use Koha::ItemTypes; |
| 24 |
use Koha::Authorities; |
25 |
use Koha::Authorities; |
|
Lines 106-111
use Koha::Authorities;
Link Here
|
| 106 |
new_hint("The biblioitems must have a itemtype value that is defined in the item types of Koha (Home › Administration › Item types administration)"); |
107 |
new_hint("The biblioitems must have a itemtype value that is defined in the item types of Koha (Home › Administration › Item types administration)"); |
| 107 |
} |
108 |
} |
| 108 |
} |
109 |
} |
|
|
110 |
|
| 111 |
my @decoding_errors; |
| 112 |
my $biblios = Koha::Biblios->search; |
| 113 |
while ( my $biblio = $biblios->next ) { |
| 114 |
eval{$biblio->metadata->record;}; |
| 115 |
push @decoding_errors, $@ if $@; |
| 116 |
} |
| 117 |
if ( @decoding_errors ) { |
| 118 |
new_section("Bibliographic records have invalid MARCXML"); |
| 119 |
new_item($_) for @decoding_errors; |
| 120 |
new_hint("The bibliographic records must have a valid MARCXML or you will face encoding issues or wrong displays"); |
| 121 |
} |
| 109 |
} |
122 |
} |
| 110 |
|
123 |
|
| 111 |
sub new_section { |
124 |
sub new_section { |
|
Lines 140-144
Catch data inconsistencies in Koha database
Link Here
|
| 140 |
* if item types are defined at item level (item-level_itypes=specific item), |
153 |
* if item types are defined at item level (item-level_itypes=specific item), |
| 141 |
then items.itype must be set else biblioitems.itemtype must be set |
154 |
then items.itype must be set else biblioitems.itemtype must be set |
| 142 |
* Item types defined in items or biblioitems must be defined in the itemtypes table |
155 |
* Item types defined in items or biblioitems must be defined in the itemtypes table |
| 143 |
|
156 |
* Invalid MARCXML in bibliographic records |
| 144 |
=cut |
157 |
=cut |
| 145 |
- |
|
|