function deploy_uuid_generate_vocabularies in Deploy - Content Staging 6
Generate uuids for any existing taxonomy vocabularies at install-time
1 call to deploy_uuid_generate_vocabularies()
- deploy_uuid_install in modules/
deploy_uuid/ deploy_uuid.install - Implementation of hook_install().
File
- modules/
deploy_uuid/ deploy_uuid.install, line 184
Code
function deploy_uuid_generate_vocabularies() {
$result = db_query("SELECT vid FROM {vocabulary}");
while ($row = db_fetch_array($result)) {
$uuid = uniqid(rand(), TRUE);
db_query("INSERT INTO {vocabulary_uuid} (vid, uuid) values (%d, '%s')", $row['vid'], $uuid);
}
}