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

Diff of /contributions/modules/news_page/news_page.install

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

revision 1.1, Fri Jun 23 14:28:39 2006 UTC revision 1.2, Sun Jan 14 03:37:34 2007 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id:$  // $Id: news_page.install,v 1.1 2006/06/23 14:28:39 MegaGrunt Exp $
3    
4  /**  /**
5   * Implementation of hook_install()   * Implementation of hook_install()
# Line 8  function news_page_install() { Line 8  function news_page_install() {
8    switch ($GLOBALS['db_type']) {    switch ($GLOBALS['db_type']) {
9      case 'mysql':      case 'mysql':
10      case 'mysqli':      case 'mysqli':
11        db_query("CREATE TABLE {news_page} (            $query1 = db_query("CREATE TABLE {news_page} (
12          nid int(10) unsigned NOT NULL default '0',                  nid int(10) unsigned NOT NULL default '0',
13          include varchar(255) NOT NULL default '',                  include varchar(255) NOT NULL default '',
14          cid int(10) unsigned NOT NULL default '0',                  cid int(10) unsigned NOT NULL default '0',
15          max_items int(11) NOT NULL default '0',                  max_items int(11) NOT NULL default '0',
16          search text,                  search text,
17          PRIMARY KEY (nid)                  PRIMARY KEY (nid)
18        ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;");                  ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;");
19        break;  
20              if (!empty($query1)) {
21                $created = TRUE;
22              }
23    
24              break;
25    }    }
26    
27    drupal_set_message(t('News Page has been enabled.'));    if ($created) {
28        drupal_set_message(t('News Page module installed successfully.'));
29      }
30      else {
31        drupal_set_message(t('Table installation for the News Page module was unsuccessful. The tables may need to be installed by hand. See news_page.install file for a list of the installation queries.'), 'error');
32      }
33    
34    return;    return;
35  }  }
36    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.2