function og_migrate_write_record in Organic groups 7
Write a plugin to the database along with its status.
Parameters
$name: The plugin name.
$status: The plugin status. Defaults to OG_MIGRATE_EXECUTED
2 calls to og_migrate_write_record()
- og_migrate_finished in og_migrate/
og_migrate.module - Batch finish callback.
- og_migrate_register_plugins in og_migrate/
og_migrate.module - Register plugins that are not in the database yet.
File
- og_migrate/
og_migrate.module, line 195 - Migrate and upgrade Organic groups data.
Code
function og_migrate_write_record($name, $status = OG_MIGRATE_EXECUTED) {
// Delete the previous record.
db_delete('og_migrate')
->condition('plugin', $name)
->execute();
// Insert the record.
$object = new stdClass();
$object->plugin = $name;
$object->status = $status;
drupal_write_record('og_migrate', $object);
}