function contemplate_refresh_files in Content Templates (Contemplate) 6
Same name and namespace in other branches
- 5 contemplate.module \contemplate_refresh_files()
- 7 contemplate.module \contemplate_refresh_files()
Refresh the listing of template files for the current site
This gets refreshes the file listing whenever a ConTemplate admin screens is called
2 calls to contemplate_refresh_files()
- contemplate_admin in ./
contemplate.module - Admin page... list out the node types
- contemplate_edit_type in ./
contemplate.module
File
- ./
contemplate.module, line 573 - Create templates to customize teaser and body content.
Code
function contemplate_refresh_files() {
$data = drupal_system_listing('\\.tpl\\.php$', 'contemplates', 'name', 0);
$conf = conf_path();
db_query("DELETE FROM {contemplate_files} WHERE site = '%s'", $conf);
db_query("INSERT INTO {contemplate_files} (site, data) VALUES ('%s', '%s')", $conf, serialize($data));
}