/[drupal]/contributions/modules/taxonomy_csv/taxonomy_csv.install
ViewVC logotype

Contents of /contributions/modules/taxonomy_csv/taxonomy_csv.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 2.8 - (show annotations) (download) (as text)
Tue Oct 20 20:21:44 2009 UTC (5 weeks, 3 days ago) by danielkm
Branch: MAIN
CVS Tags: HEAD
Changes since 2.7: +39 -11 lines
File MIME type: text/x-php
By Daniel Berthereau: Added export of terms and vocabularies.
1 <?php
2 // $Id: taxonomy_csv.install,v 2.7 2009/09/23 14:21:04 danielkm Exp $
3
4 /**
5 * @file
6 * Taxonomy_csv install and uninstall hook.
7 */
8
9 /**
10 * Implements hook_install().
11 */
12 function taxonomy_csv_install() {
13 drupal_set_message(st('Taxonomy CSV import/export has been installed. You can now import and export taxonomies, structures or lists of terms under <a href="!link_import">Administer > Content management > Taxonomy > CSV import</a> and <a href="!link_export">CSV export</a>. More information is available under <a href="!link_help">Administer > Help > Taxonomy CSV import/export</a>.', array(
14 '!link_import' => url('admin/content/taxonomy/csv_import'),
15 '!link_export' => url('admin/content/taxonomy/csv_export'),
16 '!link_help' => url('admin/help/taxonomy_csv'),
17 )));
18 }
19
20 /**
21 * Implements hook_uninstall().
22 */
23 function taxonomy_csv_uninstall() {
24 // Remove user preferences.
25 foreach (array(
26 // Import variables.
27 'import_format',
28 'source_choice',
29 'import_delimiter',
30 'import_delimiter_custom',
31 'import_enclosure',
32 'import_enclosure_custom',
33 'vocabulary_target',
34 'vocabulary_id',
35 'existing_items',
36 'relations_create_subrelations',
37 'relations_all_vocabularies',
38 'disable_internal_cache',
39 'disable_hierarchy_check',
40 'hierarchy_level',
41 'disable_line_checks',
42 'disable_utf8_check',
43 'result_stats',
44 'result_terms',
45 'result_level',
46 'result_type',
47 // Export variables.
48 'export_format',
49 'export_delimiter',
50 'export_delimiter_custom',
51 'export_enclosure',
52 'export_enclosure_custom',
53 'export_line_ending',
54 'export_order',
55 'fields_links_terms_ids',
56 'fields_links_vocabularies_ids',
57
58 // Remove variables from previous releases.
59 // < 6.x.4.0.
60 'import_create_subrelations',
61 'import_all_vocabularies',
62 'source_delimiter_custom_field',
63 // < 6.x.4.1.
64 // < 7.x.4.1.
65 'source_disable_convert_to_utf8',
66 // < 6.x.4.2.
67 // < 7.x.4.2.
68 'source_convert_to_utf8',
69 'autodivide_import',
70 'autodivide_lines',
71 'result_display_level',
72 'result_display_type',
73 // < 6.x.4.7.
74 // < 7.x.4.7.
75 'source_content',
76 'source_delimiter',
77 'source_delimiter_custom',
78 'source_enclosure',
79 'source_enclosure_custom',
80 'destination_target',
81 'destination_vocabulary_id',
82 'import_existing_items',
83 ) as $option) {
84 variable_del("taxonomy_csv_$option");
85 }
86
87 drupal_set_message(st('Taxonomy csv import/export: All user preferences have been removed. Thanks for using this module!<br />Your comments are welcomed on <a href="!link">Taxonomy csv import/export</a>.', array(
88 '!link' => url('http://drupal.org/project/taxonomy_csv'),
89 )));
90 }

  ViewVC Help
Powered by ViewVC 1.1.2