You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
zotspip/zotspip_administrations.php

1134 lines
22 KiB
PHP

<?php
if (!defined('_ECRIRE_INC_VERSION')) {
return;
}
include_spip('inc/meta');
include_spip('inc/zotspip');
// Installation et mise à jour
function zotspip_upgrade($nom_meta_base_version, $version_cible) {
$maj = [];
$maj['create'] = [
['maj_tables',['spip_zitems','spip_zcollections','spip_zcreators','spip_ztags','spip_zitems_zcollections']],
['zotspip_installer_schema_zotero']
];
$maj['0.2'] = [
['maj_tables',['spip_zitems']],
['zotspip_maj_items',true,5]
];
$maj['0.3'] = [
['sql_alter',"TABLE spip_zitems CHANGE type type_ref varchar(255) DEFAULT '' NOT NULL"]
];
$maj['0.4'] = [
['maj_tables',['spip_zcreators']],
['zotspip_maj_items',true,5]
];
include_spip('base/upgrade');
maj_plugin($nom_meta_base_version, $version_cible, $maj);
}
// Désinstallation
function zotspip_vider_tables($nom_meta_version_base) {
include_spip('base/abstract_sql');
// On efface les tables du plugin
sql_drop_table('spip_zitems');
sql_drop_table('spip_zcollections');
sql_drop_table('spip_zcreators');
sql_drop_table('spip_ztags');
sql_drop_table('spip_zitems_zcollections');
// On efface la version enregistrée
effacer_meta($nom_meta_version_base);
// On efface la configuration et l'état de la synchronisation
effacer_meta('zotspip');
effacer_meta('zotspip_maj_items');
// On efface les fichiers distants
include_spip('inc/invalideur');
purger_repertoire(_DIR_VAR . 'cache-zotspip/');
include_spip('inc/flock');
spip_unlink(_DIR_VAR . 'cache-zotspip/');
// On efface le schema Zotero
supprimer_fichier(_DIR_TMP . 'schema_zotero.php');
}
// Installer le schéma de données Zotero (schéma mis à jour le 13 mars 2016)
// On le fait manuellement car la fonction de mise à jour doit être appelée au moins 4-5 fois pour couvrir tous les types
// La mise à jour se fera en tâche CRON
function zotspip_installer_schema_zotero() {
$schema = [
'itemTypes' =>
[
0 => 'artwork',
1 => 'audioRecording',
2 => 'bill',
3 => 'blogPost',
4 => 'book',
5 => 'bookSection',
6 => 'case',
7 => 'computerProgram',
8 => 'conferencePaper',
9 => 'dictionaryEntry',
10 => 'document',
11 => 'email',
12 => 'encyclopediaArticle',
13 => 'film',
14 => 'forumPost',
15 => 'hearing',
16 => 'instantMessage',
17 => 'interview',
18 => 'journalArticle',
19 => 'letter',
20 => 'magazineArticle',
21 => 'manuscript',
22 => 'map',
23 => 'newspaperArticle',
24 => 'note',
25 => 'patent',
26 => 'podcast',
27 => 'presentation',
28 => 'radioBroadcast',
29 => 'report',
30 => 'statute',
31 => 'tvBroadcast',
32 => 'thesis',
33 => 'videoRecording',
34 => 'webpage',
],
'itemFields' =>
[
0 => 'numPages',
1 => 'numberOfVolumes',
2 => 'abstractNote',
3 => 'accessDate',
4 => 'applicationNumber',
5 => 'archive',
6 => 'artworkSize',
7 => 'assignee',
8 => 'billNumber',
9 => 'blogTitle',
10 => 'bookTitle',
11 => 'callNumber',
12 => 'caseName',
13 => 'code',
14 => 'codeNumber',
15 => 'codePages',
16 => 'codeVolume',
17 => 'committee',
18 => 'company',
19 => 'conferenceName',
20 => 'country',
21 => 'court',
22 => 'DOI',
23 => 'date',
24 => 'dateDecided',
25 => 'dateEnacted',
26 => 'dictionaryTitle',
27 => 'distributor',
28 => 'docketNumber',
29 => 'documentNumber',
30 => 'edition',
31 => 'encyclopediaTitle',
32 => 'episodeNumber',
33 => 'extra',
34 => 'audioFileType',
35 => 'filingDate',
36 => 'firstPage',
37 => 'audioRecordingFormat',
38 => 'videoRecordingFormat',
39 => 'forumTitle',
40 => 'genre',
41 => 'history',
42 => 'ISBN',
43 => 'ISSN',
44 => 'institution',
45 => 'issue',
46 => 'issueDate',
47 => 'issuingAuthority',
48 => 'journalAbbreviation',
49 => 'label',
50 => 'language',
51 => 'programmingLanguage',
52 => 'legalStatus',
53 => 'legislativeBody',
54 => 'libraryCatalog',
55 => 'archiveLocation',
56 => 'interviewMedium',
57 => 'artworkMedium',
58 => 'meetingName',
59 => 'nameOfAct',
60 => 'network',
61 => 'pages',
62 => 'patentNumber',
63 => 'place',
64 => 'postType',
65 => 'priorityNumbers',
66 => 'proceedingsTitle',
67 => 'programTitle',
68 => 'publicLawNumber',
69 => 'publicationTitle',
70 => 'publisher',
71 => 'references',
72 => 'reportNumber',
73 => 'reportType',
74 => 'reporter',
75 => 'reporterVolume',
76 => 'rights',
77 => 'runningTime',
78 => 'scale',
79 => 'section',
80 => 'series',
81 => 'seriesNumber',
82 => 'seriesText',
83 => 'seriesTitle',
84 => 'session',
85 => 'shortTitle',
86 => 'studio',
87 => 'subject',
88 => 'system',
89 => 'title',
90 => 'thesisType',
91 => 'mapType',
92 => 'manuscriptType',
93 => 'letterType',
94 => 'presentationType',
95 => 'url',
96 => 'university',
97 => 'versionNumber',
98 => 'volume',
99 => 'websiteTitle',
100 => 'websiteType',
],
'itemTypeFields' =>
[
'artwork' =>
[
0 => 'title',
1 => 'abstractNote',
2 => 'artworkMedium',
3 => 'artworkSize',
4 => 'date',
5 => 'language',
6 => 'shortTitle',
7 => 'archive',
8 => 'archiveLocation',
9 => 'libraryCatalog',
10 => 'callNumber',
11 => 'url',
12 => 'accessDate',
13 => 'rights',
14 => 'extra',
],
'audioRecording' =>
[
0 => 'title',
1 => 'abstractNote',
2 => 'audioRecordingFormat',
3 => 'seriesTitle',
4 => 'volume',
5 => 'numberOfVolumes',
6 => 'place',
7 => 'label',
8 => 'date',
9 => 'runningTime',
10 => 'language',
11 => 'ISBN',
12 => 'shortTitle',
13 => 'archive',
14 => 'archiveLocation',
15 => 'libraryCatalog',
16 => 'callNumber',
17 => 'url',
18 => 'accessDate',
19 => 'rights',
20 => 'extra',
],
'bill' =>
[
0 => 'title',
1 => 'abstractNote',
2 => 'billNumber',
3 => 'code',
4 => 'codeVolume',
5 => 'section',
6 => 'codePages',
7 => 'legislativeBody',
8 => 'session',
9 => 'history',
10 => 'date',
11 => 'language',
12 => 'url',
13 => 'accessDate',
14 => 'shortTitle',
15 => 'rights',
16 => 'extra',
],
'blogPost' =>
[
0 => 'title',
1 => 'abstractNote',
2 => 'blogTitle',
3 => 'websiteType',
4 => 'date',
5 => 'url',
6 => 'accessDate',
7 => 'language',
8 => 'shortTitle',
9 => 'rights',
10 => 'extra',
],
'book' =>
[
0 => 'title',
1 => 'abstractNote',
2 => 'series',
3 => 'seriesNumber',
4 => 'volume',
5 => 'numberOfVolumes',
6 => 'edition',
7 => 'place',
8 => 'publisher',
9 => 'date',
10 => 'numPages',
11 => 'language',
12 => 'ISBN',
13 => 'shortTitle',
14 => 'url',
15 => 'accessDate',
16 => 'archive',
17 => 'archiveLocation',
18 => 'libraryCatalog',
19 => 'callNumber',
20 => 'rights',
21 => 'extra',
],
'bookSection' =>
[
0 => 'title',
1 => 'abstractNote',
2 => 'bookTitle',
3 => 'series',
4 => 'seriesNumber',
5 => 'volume',
6 => 'numberOfVolumes',
7 => 'edition',
8 => 'place',
9 => 'publisher',
10 => 'date',
11 => 'pages',
12 => 'language',
13 => 'ISBN',
14 => 'shortTitle',
15 => 'url',
16 => 'accessDate',
17 => 'archive',
18 => 'archiveLocation',
19 => 'libraryCatalog',
20 => 'callNumber',
21 => 'rights',
22 => 'extra',
],
'case' =>
[
0 => 'caseName',
1 => 'abstractNote',
2 => 'reporter',
3 => 'reporterVolume',
4 => 'court',
5 => 'docketNumber',
6 => 'firstPage',
7 => 'history',
8 => 'dateDecided',
9 => 'language',
10 => 'shortTitle',
11 => 'url',
12 => 'accessDate',
13 => 'rights',
14 => 'extra',
],
'computerProgram' =>
[
0 => 'title',
1 => 'abstractNote',
2 => 'seriesTitle',
3 => 'versionNumber',
4 => 'date',
5 => 'system',
6 => 'place',
7 => 'company',
8 => 'programmingLanguage',
9 => 'ISBN',
10 => 'shortTitle',
11 => 'url',
12 => 'rights',
13 => 'archive',
14 => 'archiveLocation',
15 => 'libraryCatalog',
16 => 'callNumber',
17 => 'accessDate',
18 => 'extra',
],
'conferencePaper' =>
[
0 => 'title',
1 => 'abstractNote',
2 => 'date',
3 => 'proceedingsTitle',
4 => 'conferenceName',
5 => 'place',
6 => 'publisher',
7 => 'volume',
8 => 'pages',
9 => 'series',
10 => 'language',
11 => 'DOI',
12 => 'ISBN',
13 => 'shortTitle',
14 => 'url',
15 => 'accessDate',
16 => 'archive',
17 => 'archiveLocation',
18 => 'libraryCatalog',
19 => 'callNumber',
20 => 'rights',
21 => 'extra',
],
'dictionaryEntry' =>
[
0 => 'title',
1 => 'abstractNote',
2 => 'dictionaryTitle',
3 => 'series',
4 => 'seriesNumber',
5 => 'volume',
6 => 'numberOfVolumes',
7 => 'edition',
8 => 'place',
9 => 'publisher',
10 => 'date',
11 => 'pages',
12 => 'language',
13 => 'ISBN',
14 => 'shortTitle',
15 => 'url',
16 => 'accessDate',
17 => 'archive',
18 => 'archiveLocation',
19 => 'libraryCatalog',
20 => 'callNumber',
21 => 'rights',
22 => 'extra',
],
'document' =>
[
0 => 'title',
1 => 'abstractNote',
2 => 'publisher',
3 => 'date',
4 => 'language',
5 => 'shortTitle',
6 => 'url',
7 => 'accessDate',
8 => 'archive',
9 => 'archiveLocation',
10 => 'libraryCatalog',
11 => 'callNumber',
12 => 'rights',
13 => 'extra',
],
'email' =>
[
0 => 'subject',
1 => 'abstractNote',
2 => 'date',
3 => 'shortTitle',
4 => 'url',
5 => 'accessDate',
6 => 'language',
7 => 'rights',
8 => 'extra',
],
'encyclopediaArticle' =>
[
0 => 'title',
1 => 'abstractNote',
2 => 'encyclopediaTitle',
3 => 'series',
4 => 'seriesNumber',
5 => 'volume',
6 => 'numberOfVolumes',
7 => 'edition',
8 => 'place',
9 => 'publisher',
10 => 'date',
11 => 'pages',
12 => 'ISBN',
13 => 'shortTitle',
14 => 'url',
15 => 'accessDate',
16 => 'language',
17 => 'archive',
18 => 'archiveLocation',
19 => 'libraryCatalog',
20 => 'callNumber',
21 => 'rights',
22 => 'extra',
],
'film' =>
[
0 => 'title',
1 => 'abstractNote',
2 => 'distributor',
3 => 'date',
4 => 'genre',
5 => 'videoRecordingFormat',
6 => 'runningTime',
7 => 'language',
8 => 'shortTitle',
9 => 'url',
10 => 'accessDate',
11 => 'archive',
12 => 'archiveLocation',
13 => 'libraryCatalog',
14 => 'callNumber',
15 => 'rights',
16 => 'extra',
],
'forumPost' =>
[
0 => 'title',
1 => 'abstractNote',
2 => 'forumTitle',
3 => 'postType',
4 => 'date',
5 => 'language',
6 => 'shortTitle',
7 => 'url',
8 => 'accessDate',
9 => 'rights',
10 => 'extra',
],
'hearing' =>
[
0 => 'title',
1 => 'abstractNote',
2 => 'committee',
3 => 'place',
4 => 'publisher',
5 => 'numberOfVolumes',
6 => 'documentNumber',
7 => 'pages',
8 => 'legislativeBody',
9 => 'session',
10 => 'history',
11 => 'date',
12 => 'language',
13 => 'shortTitle',
14 => 'url',
15 => 'accessDate',
16 => 'rights',
17 => 'extra',
],
'instantMessage' =>
[
0 => 'title',
1 => 'abstractNote',
2 => 'date',
3 => 'language',
4 => 'shortTitle',
5 => 'url',
6 => 'accessDate',
7 => 'rights',
8 => 'extra',
],
'interview' =>
[
0 => 'title',
1 => 'abstractNote',
2 => 'date',
3 => 'interviewMedium',
4 => 'language',
5 => 'shortTitle',
6 => 'url',
7 => 'accessDate',
8 => 'archive',
9 => 'archiveLocation',
10 => 'libraryCatalog',
11 => 'callNumber',
12 => 'rights',
13 => 'extra',
],
'journalArticle' =>
[
0 => 'title',
1 => 'abstractNote',
2 => 'publicationTitle',
3 => 'volume',
4 => 'issue',
5 => 'pages',
6 => 'date',
7 => 'series',
8 => 'seriesTitle',
9 => 'seriesText',
10 => 'journalAbbreviation',
11 => 'language',
12 => 'DOI',
13 => 'ISSN',
14 => 'shortTitle',
15 => 'url',
16 => 'accessDate',
17 => 'archive',
18 => 'archiveLocation',
19 => 'libraryCatalog',
20 => 'callNumber',
21 => 'rights',
22 => 'extra',
],
'letter' =>
[
0 => 'title',
1 => 'abstractNote',
2 => 'letterType',
3 => 'date',
4 => 'language',
5 => 'shortTitle',
6 => 'url',
7 => 'accessDate',
8 => 'archive',
9 => 'archiveLocation',
10 => 'libraryCatalog',
11 => 'callNumber',
12 => 'rights',
13 => 'extra',
],
'magazineArticle' =>
[
0 => 'title',
1 => 'abstractNote',
2 => 'publicationTitle',
3 => 'volume',
4 => 'issue',
5 => 'date',
6 => 'pages',
7 => 'language',
8 => 'ISSN',
9 => 'shortTitle',
10 => 'url',
11 => 'accessDate',
12 => 'archive',
13 => 'archiveLocation',
14 => 'libraryCatalog',
15 => 'callNumber',
16 => 'rights',
17 => 'extra',
],
'manuscript' =>
[
0 => 'title',
1 => 'abstractNote',
2 => 'manuscriptType',
3 => 'place',
4 => 'date',
5 => 'numPages',
6 => 'language',
7 => 'shortTitle',
8 => 'url',
9 => 'accessDate',
10 => 'archive',
11 => 'archiveLocation',
12 => 'libraryCatalog',
13 => 'callNumber',
14 => 'rights',
15 => 'extra',
],
'map' =>
[
0 => 'title',
1 => 'abstractNote',
2 => 'mapType',
3 => 'scale',
4 => 'seriesTitle',
5 => 'edition',
6 => 'place',
7 => 'publisher',
8 => 'date',
9 => 'language',
10 => 'ISBN',
11 => 'shortTitle',
12 => 'url',
13 => 'accessDate',
14 => 'archive',
15 => 'archiveLocation',
16 => 'libraryCatalog',
17 => 'callNumber',
18 => 'rights',
19 => 'extra',
],
'newspaperArticle' =>
[
0 => 'title',
1 => 'abstractNote',
2 => 'publicationTitle',
3 => 'place',
4 => 'edition',
5 => 'date',
6 => 'section',
7 => 'pages',
8 => 'language',
9 => 'shortTitle',
10 => 'ISSN',
11 => 'url',
12 => 'accessDate',
13 => 'archive',
14 => 'archiveLocation',
15 => 'libraryCatalog',
16 => 'callNumber',
17 => 'rights',
18 => 'extra',
],
'note' =>
[],
'patent' =>
[
0 => 'title',
1 => 'abstractNote',
2 => 'place',
3 => 'country',
4 => 'assignee',
5 => 'issuingAuthority',
6 => 'patentNumber',
7 => 'filingDate',
8 => 'pages',
9 => 'applicationNumber',
10 => 'priorityNumbers',
11 => 'issueDate',
12 => 'references',
13 => 'legalStatus',
14 => 'language',
15 => 'shortTitle',
16 => 'url',
17 => 'accessDate',
18 => 'rights',
19 => 'extra',
],
'podcast' =>
[
0 => 'title',
1 => 'abstractNote',
2 => 'seriesTitle',
3 => 'episodeNumber',
4 => 'audioFileType',
5 => 'runningTime',
6 => 'url',
7 => 'accessDate',
8 => 'language',
9 => 'shortTitle',
10 => 'rights',
11 => 'extra',
],
'presentation' =>
[
0 => 'title',
1 => 'abstractNote',
2 => 'presentationType',
3 => 'date',
4 => 'place',
5 => 'meetingName',
6 => 'url',
7 => 'accessDate',
8 => 'language',
9 => 'shortTitle',
10 => 'rights',
11 => 'extra',
],
'radioBroadcast' =>
[
0 => 'title',
1 => 'abstractNote',
2 => 'programTitle',
3 => 'episodeNumber',
4 => 'audioRecordingFormat',
5 => 'place',
6 => 'network',
7 => 'date',
8 => 'runningTime',
9 => 'language',
10 => 'shortTitle',
11 => 'url',
12 => 'accessDate',
13 => 'archive',
14 => 'archiveLocation',
15 => 'libraryCatalog',
16 => 'callNumber',
17 => 'rights',
18 => 'extra',
],
'report' =>
[
0 => 'title',
1 => 'abstractNote',
2 => 'reportNumber',
3 => 'reportType',
4 => 'seriesTitle',
5 => 'place',
6 => 'institution',
7 => 'date',
8 => 'pages',
9 => 'language',
10 => 'shortTitle',
11 => 'url',
12 => 'accessDate',
13 => 'archive',
14 => 'archiveLocation',
15 => 'libraryCatalog',
16 => 'callNumber',
17 => 'rights',
18 => 'extra',
],
'statute' =>
[
0 => 'nameOfAct',
1 => 'abstractNote',
2 => 'code',
3 => 'codeNumber',
4 => 'publicLawNumber',
5 => 'dateEnacted',
6 => 'pages',
7 => 'section',
8 => 'session',
9 => 'history',
10 => 'language',
11 => 'shortTitle',
12 => 'url',
13 => 'accessDate',
14 => 'rights',
15 => 'extra',
],
'tvBroadcast' =>
[
0 => 'title',
1 => 'abstractNote',
2 => 'programTitle',
3 => 'episodeNumber',
4 => 'videoRecordingFormat',
5 => 'place',
6 => 'network',
7 => 'date',
8 => 'runningTime',
9 => 'language',
10 => 'shortTitle',
11 => 'url',
12 => 'accessDate',
13 => 'archive',
14 => 'archiveLocation',
15 => 'libraryCatalog',
16 => 'callNumber',
17 => 'rights',
18 => 'extra',
],
'thesis' =>
[
0 => 'title',
1 => 'abstractNote',
2 => 'thesisType',
3 => 'university',
4 => 'place',
5 => 'date',
6 => 'numPages',
7 => 'language',
8 => 'shortTitle',
9 => 'url',
10 => 'accessDate',
11 => 'archive',
12 => 'archiveLocation',
13 => 'libraryCatalog',
14 => 'callNumber',
15 => 'rights',
16 => 'extra',
],
'videoRecording' =>
[
0 => 'title',
1 => 'abstractNote',
2 => 'videoRecordingFormat',
3 => 'seriesTitle',
4 => 'volume',
5 => 'numberOfVolumes',
6 => 'place',
7 => 'studio',
8 => 'date',
9 => 'runningTime',
10 => 'language',
11 => 'ISBN',
12 => 'shortTitle',
13 => 'url',
14 => 'accessDate',
15 => 'archive',
16 => 'archiveLocation',
17 => 'libraryCatalog',
18 => 'callNumber',
19 => 'rights',
20 => 'extra',
],
'webpage' =>
[
0 => 'title',
1 => 'abstractNote',
2 => 'websiteTitle',
3 => 'websiteType',
4 => 'date',
5 => 'shortTitle',
6 => 'url',
7 => 'accessDate',
8 => 'language',
9 => 'rights',
10 => 'extra',
],
],
'creatorTypes' =>
[
'artwork' =>
[
0 => 'artist',
1 => 'contributor',
],
'audioRecording' =>
[
0 => 'performer',
1 => 'composer',
2 => 'contributor',
3 => 'wordsBy',
],
'bill' =>
[
0 => 'sponsor',
1 => 'contributor',
2 => 'cosponsor',
],
'blogPost' =>
[
0 => 'author',
1 => 'commenter',
2 => 'contributor',
],
'book' =>
[
0 => 'author',
1 => 'contributor',
2 => 'editor',
3 => 'seriesEditor',
4 => 'translator',
],
'bookSection' =>
[
0 => 'author',
1 => 'bookAuthor',
2 => 'contributor',
3 => 'editor',
4 => 'seriesEditor',
5 => 'translator',
],
'case' =>
[
0 => 'author',
1 => 'contributor',
2 => 'counsel',
],
'computerProgram' =>
[
0 => 'programmer',
1 => 'contributor',
],
'conferencePaper' =>
[
0 => 'author',
1 => 'contributor',
2 => 'editor',
3 => 'seriesEditor',
4 => 'translator',
],
'dictionaryEntry' =>
[
0 => 'author',
1 => 'contributor',
2 => 'editor',
3 => 'seriesEditor',
4 => 'translator',
],
'document' =>
[
0 => 'author',
1 => 'contributor',
2 => 'editor',
3 => 'reviewedAuthor',
4 => 'translator',
],
'email' =>
[
0 => 'author',
1 => 'contributor',
2 => 'recipient',
],
'encyclopediaArticle' =>
[
0 => 'author',
1 => 'contributor',
2 => 'editor',
3 => 'seriesEditor',
4 => 'translator',
],
'film' =>
[
0 => 'director',
1 => 'contributor',
2 => 'producer',
3 => 'scriptwriter',
],
'forumPost' =>
[
0 => 'author',
1 => 'contributor',
],
'hearing' =>
[
0 => 'contributor',
],
'instantMessage' =>
[
0 => 'author',
1 => 'contributor',
2 => 'recipient',
],
'interview' =>
[
0 => 'interviewee',
1 => 'contributor',
2 => 'interviewer',
3 => 'translator',
],
'journalArticle' =>
[
0 => 'author',
1 => 'contributor',
2 => 'editor',
3 => 'reviewedAuthor',
4 => 'translator',
],
'letter' =>
[
0 => 'author',
1 => 'contributor',
2 => 'recipient',
],
'magazineArticle' =>
[
0 => 'author',
1 => 'contributor',
2 => 'reviewedAuthor',
3 => 'translator',
],
'manuscript' =>
[
0 => 'author',
1 => 'contributor',
2 => 'translator',
],
'map' =>
[
0 => 'cartographer',
1 => 'contributor',
2 => 'seriesEditor',
],
'newspaperArticle' =>
[
0 => 'author',
1 => 'contributor',
2 => 'reviewedAuthor',
3 => 'translator',
],
'note' =>
[],
'patent' =>
[
0 => 'inventor',
1 => 'attorneyAgent',
2 => 'contributor',
],
'podcast' =>
[
0 => 'podcaster',
1 => 'contributor',
2 => 'guest',
],
'presentation' =>
[
0 => 'presenter',
1 => 'contributor',
],
'radioBroadcast' =>
[
0 => 'director',
1 => 'castMember',
2 => 'contributor',
3 => 'guest',
4 => 'producer',
5 => 'scriptwriter',
],
'report' =>
[
0 => 'author',
1 => 'contributor',
2 => 'seriesEditor',
3 => 'translator',
],
'statute' =>
[
0 => 'author',
1 => 'contributor',
],
'tvBroadcast' =>
[
0 => 'director',
1 => 'castMember',
2 => 'contributor',
3 => 'guest',
4 => 'producer',
5 => 'scriptwriter',
],
'thesis' =>
[
0 => 'author',
1 => 'contributor',
],
'videoRecording' =>
[
0 => 'director',
1 => 'castMember',
2 => 'contributor',
3 => 'producer',
4 => 'scriptwriter',
],
'webpage' =>
[
0 => 'author',
1 => 'contributor',
2 => 'translator',
],
],
];
// Sauver le schéma en cache
ecrire_fichier_securise(_DIR_TMP . 'schema_zotero.php', serialize($schema));
}