function _fb_app_blocks_update in Drupal for Facebook 5
2 calls to _fb_app_blocks_update()
- fb_app_insert in ./
fb_app.module - fb_app_update in ./
fb_app.module
File
- ./
fb_app.module, line 285 - Defines a custom node type that stores a facebook application configuration.
Code
function _fb_app_blocks_update($node) {
db_query('DELETE FROM {fb_app_block} WHERE nid=%d', $node->nid);
if (count($node->fb_app_blocks)) {
foreach ($node->fb_app_blocks as $delta => $data_array) {
$data = (object) $data_array;
//if (!$delta)
// $delta = '0';
db_query("INSERT INTO {fb_app_block} (nid, delta, body, format) VALUES (%d, '%s', '%s', %d)", $node->nid, $delta, $data->body, $data->format);
}
}
}