Index: fb.info =================================================================== --- fb.info (revision 1.1) +++ fb.info (6.x working copy) @@ -1,3 +1,6 @@ name = Facebook API description = Imports and uses the Facebook API. -package = Facebook \ No newline at end of file +package = Facebook +core = 6.x + +version = "6.x-1.x-dev" Index: fb.install =================================================================== --- fb.install (revision 1.2) +++ fb.install (6.x working copy) @@ -5,20 +5,19 @@ } function fb_install() { + //drupal_install_schema('fb'); _fb_install_set_weight(); } -function fb_update_1() { - _fb_install_set_weight(); + +function fb_uninstall() { + //drupal_uninstall_schema('fb'); + _fb_install_set_weight(); } -/** - * The callback URL has changed and this requires manual updates to App settings. - */ -function fb_update_2() { - $message = t('Warning! The Drupal for Facebook modules have changed. Manual intervention is required! See !url1 or !url2.', - array('!url1' => l('http://apps.facebook.com/drupalforfacebook/node/1055', 'http://apps.facebook.com/drupalforfacebook/node/1055'), - '!url2' => l('http://drupalforfacebook.org/node/1055','http://drupalforfacebook.org/node/1055'))); - drupal_set_message($message); - watchdog('fb', $message); +/* +function fb_schema() { + //this cannot return nothing, or common.inc reports error + $schema = array(); + return $schema; } -?> \ No newline at end of file +*/ \ No newline at end of file Index: fb.module =================================================================== --- fb.module (revision 1.17) +++ fb.module (6.x working copy) @@ -48,7 +48,7 @@ array('!drupal_for_facebook' => l(t('Drupal for Facebook'), 'http://drupal.org/project/fb'), // This link should work with clean URLs // disabled. - '!readme' => 'README.txt')), 'error'); + '!readme' => 'README.txt')), 'error'); } @@ -167,9 +167,9 @@ // get_loggedin_user does not really test it. if ($fbu != FB_FBU_CURRENT && !$fb->get_loggedin_user()) { // An FBU other than CURRENT was specified, but we failed to log in. - watchdog('fb', t('Failed to log into facebook app %app as user %user', + watchdog('fb', 'Failed to log into facebook app %app as user %user', array('%app' => $fb_app->title, - '%user' => $fbu)), WATCHDOG_ERROR); + '%user' => $fbu), WATCHDOG_ERROR); } } @@ -195,7 +195,7 @@ $original = array('base_url' => $base_url, 'base_path' => $base_path); - /** + /* $base_path = "/$fb_app->canvas/"; // TODO: make the "apps.facebook.com" part configurable. $base_url = "http://apps.facebook.com/$fb_app->canvas"; @@ -203,7 +203,7 @@ // New way: $base_path = $fb_old_base_url . '/'; $base_url = ''; - **/ + */ if (!variable_get('clean_url', FALSE)) { $original['clean_url'] = FALSE; @@ -310,7 +310,7 @@ $items = $fb->api_client->friends_get(); // friends_get does not work in cron call, so we double check. if (!$items || !count($items)) { - $result = $fb->api_client->fql_query("SELECT uid2 FROM friend WHERE uid1=$fbu"); + $result = $fb->api_client->fql_query("SELECT uid2 FROM {friend} WHERE uid1=$fbu"); $items = array(); if (is_array($result)) foreach ($result as $data) { @@ -370,15 +370,15 @@ if (!$account) $account = user_load(array('uid' => variable_get('fb_facebook_user', 2))); if (!$account) - watchdog('fb', t('Failed to load user from facebook fbu=%fbu', - array('%fbu' => $fbu)), 'error'); + watchdog('fb', 'Failed to load user from facebook fbu=%fbu', + array('%fbu' => $fbu), 'error'); $account->fbu = $fbu; return $account; } } -function fb_form_alter($form_id, &$form) { +function fb_form_alter(&$form, &$form_state, $form_id) { // Because facebook users don't have email, it can't be required on user form if ($form_id == 'user_register') { if (user_access('administer users')) { @@ -393,26 +393,21 @@ } -function fb_menu($may_cache) { +function fb_menu() { $items = array(); - if (!$may_cache) { - // Initialization moved to fb_init(), nothing to do here. - } - else { // When forms are submitted directly to us, we cache the results, // and show them later via this callback - $items[] = array('path' => 'fb/form_cache', - 'callback' => '_fb_form_cache_cb', + $items['fb/form_cache'] = array( + 'page callback' => '_fb_form_cache_cb', 'type' => MENU_CALLBACK, - 'access' => TRUE); + 'access callback' => TRUE); // A page to help determine infinite session keys - $items[] = array('path' => 'fb/session', - 'callback' => '_fb_session_cb', + $items['fb/session'] = array( + 'page callback' => '_fb_session_cb', 'type' => MENU_CALLBACK, - 'access' => TRUE); // TODO: restrict access? - } + 'access callback' => TRUE); // TODO: restrict access? return $items; } @@ -559,4 +554,3 @@ } -?> \ No newline at end of file