You are here

anonymous_publishing.install in Anonymous Publishing 5

Same filename and directory in other branches
  1. 8 anonymous_publishing.install
  2. 7 anonymous_publishing.install

Installation file for the anonymous_publishing module.

@author Ronny López <developer@dropcube.com>

File

anonymous_publishing.install
View source
<?php

/**
 * @file
 * Installation file for the anonymous_publishing module.
 * 
 * @author 
 * Ronny López <developer@dropcube.com>
 */
function anonymous_publishing_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_query("\n        CREATE TABLE {anonymous_publishing}  (\n          nid int(11) unsigned NOT NULL,\n          uid int(11) unsigned NOT NULL,\n          akey char(60) NOT NULL default '',\n          email varchar(64) default NULL,\n          anonymous tinyint(1) default '0',\n          activated tinyint(1) default '0',\n          PRIMARY KEY (nid),\n          UNIQUE KEY akey (akey)\n        ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
      break;
  }
}

/*
 * Implementation of hook_uninstall.
 */
function anonymous_publishing_uninstall() {
  db_query('DROP TABLE {anonymous_publishing}');
}

Functions

Namesort descending Description
anonymous_publishing_install @file Installation file for the anonymous_publishing module.
anonymous_publishing_uninstall