function contemplate_save in Content Templates (Contemplate) 5
Same name and namespace in other branches
- 6 contemplate.module \contemplate_save()
- 7 contemplate.module \contemplate_save()
1 call to contemplate_save()
File
- ./
contemplate.module, line 483 - Create templates to customize teaser and body content.
Code
function contemplate_save($edit) {
contemplate_delete($edit['type']);
$flags |= $edit['teaser-enable'] ? CONTEMPLATE_TEASER_ENABLED : 0;
$flags |= $edit['body-enable'] ? CONTEMPLATE_BODY_ENABLED : 0;
$flags |= $edit['rss-enable'] ? CONTEMPLATE_RSS_ENABLED : 0;
return db_query("INSERT INTO {contemplate} (type, teaser, body, rss, enclosure, flags) VALUES ('%s', '%s', '%s', '%s', '%s', %d)", $edit['type'], $edit['teaserfield'], $edit['bodyfield'], $edit['rss'], $edit['enclosure'], $flags);
}