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

Contents of /contributions/modules/audit/audit.install

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


Revision 1.3 - (show annotations) (download) (as text)
Tue Feb 27 02:53:41 2007 UTC (2 years, 8 months ago) by njivy
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -8 lines
File MIME type: text/x-php
Simplified by using nodequeue instead of taxonomy for tracking progress
1 <?php
2 // $Id$
3 // audit.install
4
5 function audit_install() {
6 db_query("UPDATE {system} SET weight = 1 WHERE name = 'audit'");
7
8 // Create content type
9 $values['name'] = t('Audit process');
10 $values['type'] = 'audit_process';
11 $values['body_label'] = t('Description');
12 $values['node_options'] = array('status' => 'status', 'revision' => 'revision', 'promote' => 0, 'sticky' => 0);
13 $values['upload'] = 0;
14
15 // We need access to 'node_types_form'.
16 include_once './modules/node/content_types.inc';
17 drupal_execute('node_type_form', $values);
18 }
19
20 function audit_uninstall() {
21 // Clean up content types
22 if (db_num_rows(db_query("SELECT * FROM {node_type} WHERE type = 'audit_process'"))) {
23 // TODO: Does this actually work?
24 node_type_delete('audit_process');
25 }
26 else {
27 drupal_set_message(t('Content type %type already deleted', array('%type' => 'audit_process')));
28 }
29
30 watchdog('audit', t('audit.module uninstalled'));
31 }

  ViewVC Help
Powered by ViewVC 1.1.2