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

Contents of /contributions/modules/quote/quote.install

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


Revision 1.2 - (show annotations) (download) (as text)
Sat Aug 11 09:36:13 2007 UTC (2 years, 3 months ago) by karthik
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +39 -0 lines
File MIME type: text/x-php
use system_settings_form for the settings form with a validate hook to take care of checkboxes.
Introduce quote_variable_get.
Add install file - include update to move from the old variable system to the new one.
Add hook_uninstall.

Blind port from D5.
1 <?php
2 // $Id: quote.install,v 1.1.2.1 2007/08/11 09:34:53 karthik Exp $
3
4 /**
5 * Implementation of hook_install().
6 */
7 function quote_install() {
8 $ret = array();
9
10 drupal_set_message(t('The quote module has been installed successfully.'));
11
12 return $ret;
13 }
14
15 /**
16 * Unify quote module settings into one variable.
17 */
18 function quote_update_1() {
19 $quote = array(
20 'node_types' => variable_get('quote_node_types', array('blog', 'story')),
21 'node_link_display' => variable_get('quote_node_link_display', 1),
22 'subject_required' => variable_get('quote_subject_required', 1)
23 );
24
25 variable_set('quote', $quote);
26
27 variable_del('quote_node_types');
28 variable_del('quote_node_link_display');
29 variable_del('quote_subject_required');
30
31 return array();
32 }
33
34 /**
35 * Implementation of hook_uninstall().
36 */
37 function quote_uninstall() {
38 variable_del('quote');
39 }

  ViewVC Help
Powered by ViewVC 1.1.2