version); if (version_compare($version, '8.0', '<')) { // PRIOR TO POSTGRESQL 8.0: making a BIT_OR aggregate function db_query("CREATE AGGREGATE BIT_OR ( basetype = smallint, sfunc = int2or, stype = smallint );"); } db_query("CREATE TABLE {term_access} ( tid integer NOT NULL default '0', rid integer NOT NULL default '0', grant_view smallint NOT NULL default '0', grant_update smallint NOT NULL default '0', grant_delete smallint NOT NULL default '0', grant_create smallint NOT NULL default '0', grant_list smallint NOT NULL default '0', PRIMARY KEY (tid,rid) );"); db_query("CREATE TABLE {term_access_defaults} ( vid integer NOT NULL default '0', rid integer NOT NULL default '0', grant_view smallint NOT NULL default '0', grant_update smallint NOT NULL default '0', grant_delete smallint NOT NULL default '0', grant_create smallint NOT NULL default '0', grant_list smallint NOT NULL default '0', PRIMARY KEY (vid,rid) );"); // new module weights in core: put taxonomy_access to the bottom (but before the very last ones) in the chain. db_query("UPDATE {system} SET weight = 9 WHERE name = 'taxonomy_access'"); $success = TRUE; break; case 'mysql': case 'mysqli': db_query("CREATE TABLE {term_access} ( tid int(10) unsigned NOT NULL default '0', rid int(10) unsigned NOT NULL default '0', grant_view tinyint(1) unsigned NOT NULL default '0', grant_update tinyint(1) unsigned NOT NULL default '0', grant_delete tinyint(1) unsigned NOT NULL default '0', grant_create tinyint(1) unsigned NOT NULL default '0', grant_list tinyint(1) unsigned NOT NULL default '0', PRIMARY KEY (tid,rid) ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;"); db_query("CREATE TABLE {term_access_defaults} ( vid int(10) unsigned NOT NULL default '0', rid int(10) unsigned NOT NULL default '0', grant_view tinyint(1) unsigned NOT NULL default '0', grant_update tinyint(1) unsigned NOT NULL default '0', grant_delete tinyint(1) unsigned NOT NULL default '0', grant_create tinyint(1) unsigned NOT NULL default '0', grant_list tinyint(1) unsigned NOT NULL default '0', PRIMARY KEY (vid,rid) ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;"); // new module weights in core: put taxonomy_access to the bottom (but before the very last ones) in the chain. db_query("UPDATE {system} SET weight = 9 WHERE name = 'taxonomy_access'"); $success = TRUE; break; } // End case // Notify of changes if ($success) { drupal_set_message(t('Taxonomy Access module installed tables successfully.').'
'.t('For activation, please view the Taxonomy Access settings page.', array('%settings' => url('admin/settings/taxonomy_access')))); } else { drupal_set_message(t('The installation of Taxonomy Access module was unsuccessful.'), 'error'); } } ?>