fbconnect.install in Facebook Connect 5
Same filename and directory in other branches
Implementation of hook_install().
File
fbconnect.installView source
<?php
/**
* @file
* Implementation of hook_install().
*/
function fbconnect_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
db_query("CREATE TABLE {fbconnect_users} (\n `uid` int(10) unsigned NOT NULL default '0',\n `fbuid` int(10) unsigned NOT NULL default '0',\n `timestamp` int(10) unsigned NOT NULL default '0',\n `import_setting` text,\n `avatar` tinyint(3) unsigned NOT NULL default '1',\n `visibility` tinyint(3) unsigned NOT NULL default '1',\n PRIMARY KEY (`fbuid`)\n ) /*!40100 DEFAULT CHARACTER SET utf8 */");
}
}
/**
* Implementation of hook_uninstall().
*/
function fbconnect_uninstall() {
// Remove database tables.
db_query('DROP TABLE {fbconnect_users}');
// Delete our module's variable from the variables table.
variable_del('fbconnect_api_key');
variable_del('fbconnect_secret_api_key');
variable_del('fbconnect_invitef_content');
variable_del('fbconnect_invitef_type');
variable_del('fbconnect_button_type');
variable_del('fbconnect_reg_feed_id');
variable_del('fbconnect_com_feed_id');
variable_del('fbconnect_reg_feed');
variable_del('fbconnect_com_feed');
variable_del('fbconnect_invitef_redirect');
}
/**
*
*/
function fbconnect_update_5001() {
variable_set('fbconnect_reg_feed_id', 47875658217);
variable_set('fbconnect_com_feed_id', 47874003217);
if (variable_get('fbconnect_import', 0)) {
$ret[] = update_sql("UPDATE {system} SET status = 1, schema_version = 5001 WHERE name = 'fbconnect_profile'");
}
return $ret;
}
Functions
Name | Description |
---|---|
fbconnect_install | @file Implementation of hook_install(). |
fbconnect_uninstall | Implementation of hook_uninstall(). |
fbconnect_update_5001 |