function fb_install_property_message in Drupal for Facebook 6.3
Same name and namespace in other branches
- 7.3 fb.install \fb_install_property_message()
Convenience function to display messages like the one from fb_app_update_6003.
1 call to fb_install_property_message()
File
- ./
fb.install, line 197 - Install file to support fb.module.
Code
function fb_install_property_message(&$ret, $reason) {
$result = db_query("SELECT * FROM {fb_app}");
$items = array();
while ($data = db_fetch_object($result)) {
$items[] = l($data->title, 'admin/build/fb/app/' . $data->label . '/fb/set_props', array(
'attributes' => array(
'target' => '_blank',
),
));
}
if (count($items)) {
$message = 'Manual action required!. !reason Click below to update the settings, on facebook, for each of your applications. !list';
$args = array(
'!reason' => $reason,
'!list' => theme('item_list', $items),
);
drupal_set_message(t($message, $args), 'warning', FALSE);
watchdog('fb', $message, $args, WATCHDOG_WARNING);
}
$ret[] = array(
'success' => FALSE,
'query' => t('Manual action required. Go to !link and set properties for each facebook application.', array(
'!link' => l('Facebook Applications', 'admin/build/fb'),
)),
);
}