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

Contents of /contributions/modules/search_block/search_block.install

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


Revision 1.1 - (show annotations) (download) (as text)
Wed Aug 22 14:23:35 2007 UTC (2 years, 3 months ago) by deviantintegral
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-5--2, DRUPAL-5
File MIME type: text/x-php
Initial commit of search_block. This module allows for the removal of specific nodes or content types from the search index.
1 <?php
2
3 function search_block_install() {
4 switch ($GLOBALS['db_type']) {
5 case 'mysqli':
6 case 'mysql':
7 $q1 = db_query("CREATE TABLE IF NOT EXISTS {search_block} (
8 nid int(10) unsigned NOT NULL default '0',
9 enabled BOOL NOT NULL default '0',
10 dirty BOOL NOT NULL default '0',
11 PRIMARY KEY (nid)
12 ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;");
13
14 if ($q1) {
15 $created = TRUE;
16 }
17 break;
18
19 case 'pgsql':
20 break;
21 }
22
23 if ($created) {
24 drupal_set_message(t('Search Block module installed successfully.'));
25 }
26 else {
27 drupal_set_message(t('Table installation for the Search Block module was unsuccessful. The tables may need to be installed by hand. See the search_block.install file for a list of the installation queries.'), 'error');
28 }
29 }

  ViewVC Help
Powered by ViewVC 1.1.2