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

Contents of /contributions/modules/tax_receipt/tax_receipt.install

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


Revision 1.2 - (show annotations) (download) (as text)
Tue Sep 11 17:41:34 2007 UTC (2 years, 2 months ago) by suydam
Branch: MAIN
CVS Tags: DRUPAL-5--1-5, HEAD
Changes since 1.1: +1 -1 lines
File MIME type: text/x-php
Fixed install script to support db_prefix.  Fixed situation where null values were being passed during nodeapi for insert/update on nodes.
1 <?php
2 function tax_receipt_install() {
3 drupal_set_message( t('Installing tax_receipt.module...') );
4 watchdog("Skipcart","Intalling tax_receipt.module...");
5 switch ( $GLOBALS['db_type'] ) {
6 case 'mysql':
7 case 'mysqli':
8 watchdog("tax_receipt","DB Type = Mysql(i?)");
9 db_query("
10 CREATE TABLE {tax_receipt_nodes} (
11 nid int(10) unsigned NOT NULL default '0',
12 tax_receipt_enabled tinyint(3) unsigned NOT NULL default '0',
13 tax_receipt_fairmarketvalue float(10,2) default NULL
14 )"
15 ) or watchdog("tax_receipt","FAILURE");
16 watchdog("tax_receipt","SUCCESS!");
17 $success = TRUE;
18 break;
19 default:
20 drupal_set_message( t('Unsupported database for tax_receipt.module during install routine'),'error');
21 }
22 if ( $success ) {
23 drupal_set_message( t('tax_receipt.module installed successfully...<OL><LI>Grant yourself access control for the modules functions at ' . l('admin/user/access','admin/user/access') . '<LI>Then visit ' . l('admin/ecsettings/tax_receipt','admin/ecsettings/tax_receipt') . ' to continue configuration.</ol>' ) );
24 }
25 else {
26 drupal_set_message( t('tax_receipt.module failed install'),'error' );
27 }
28 }
29 ?>

  ViewVC Help
Powered by ViewVC 1.1.2