function pathfilter_update_6101 in Path Filter 6
Same name and namespace in other branches
- 6.2 pathfilter.install \pathfilter_update_6101()
Fix absolute/relative setting isn't input format-specific
File
- ./
pathfilter.install, line 28 - Provides install and uninstall functions for pathfilter.
Code
function pathfilter_update_6101() {
// If old variable is different to default
// for each input format set new variable only if pathfilter is enabled
if (variable_get('pathfilter_link_type', 'absolute') != 'absolute') {
foreach (filter_formats() as $format) {
$filters = filter_list_format($format->format);
if (isset($filters['pathfilter/0'])) {
variable_set('pathfilter_link_absolute_' . $format->format, 0);
}
}
}
variable_del('pathfilter_link_type');
return array();
}