function _wysiwyg_install_get_formats in Wysiwyg 5.2
Same name and namespace in other branches
- 5 wysiwyg.install \_wysiwyg_install_get_formats()
- 6.2 wysiwyg.install \_wysiwyg_install_get_formats()
- 6 wysiwyg.install \_wysiwyg_install_get_formats()
Retrieve a list of input formats to associate profiles to.
1 call to _wysiwyg_install_get_formats()
- wysiwyg_update_5001 in ./
wysiwyg.install - Associate Wysiwyg profiles with input formats.
File
- ./
wysiwyg.install, line 71
Code
function _wysiwyg_install_get_formats() {
$formats = array();
$result = db_query("SELECT format, name FROM {filter_formats}");
while ($format = db_fetch_object($result)) {
// Build a list of all formats.
$formats[$format->format] = $format->name;
// Fetch filters.
$result2 = db_query("SELECT module, delta FROM {filters} WHERE format = %d", $format->format);
while ($filter = db_fetch_object($result2)) {
// If PHP filter is enabled, remove this format.
if ($filter->module == 'filter' && $filter->delta == 1) {
unset($formats[$format->format]);
break;
}
}
}
return $formats;
}