diff --git a/flag.install b/flag.install index 5475be7..7a4cb9f 100644 --- a/flag.install +++ b/flag.install @@ -659,20 +659,20 @@ function flag_update_7305() { function flag_update_7306() { foreach (flag_get_flags() as $flag) { // Update show_on_teaser property to use new view mode settings. - if (isset($flag->show_on_teaser)) { + if (!empty($flag->show_on_teaser)) { $flag->show_in_links['teaser'] = TRUE; unset($flag->show_on_teaser); } // Update show_on_page property to use new view mode settings. - if (isset($flag->show_on_page)) { + if (!empty($flag->show_on_page)) { $flag->show_in_links['full'] = TRUE; unset($flag->show_on_page); } // Update show_on_comment and show_on_entity properties to use new view // mode settings. Since the old logic was to show on all view modes, do that. - if (isset($flag->show_on_entity) || isset($flag->show_on_comment)) { + if (!empty($flag->show_on_entity) || !empty($flag->show_on_comment)) { if ($entity_info = entity_get_info($flag->entity_type)) { foreach ($entity_info['view modes'] as $view_mode => $value) { $flag->show_in_links[$view_mode] = TRUE; diff --git a/includes/flag.export.inc b/includes/flag.export.inc index 9e3cbc7..5053c67 100644 --- a/includes/flag.export.inc +++ b/includes/flag.export.inc @@ -342,20 +342,20 @@ class FlagUpdate_3 { } // Update show_on_teaser property to use new view mode settings. - if (isset($flag->show_on_teaser)) { + if (!empty($flag->show_on_teaser)) { $flag->show_in_links['teaser'] = TRUE; unset($flag->show_on_teaser); } // Update show_on_page property to use new view mode settings. - if (isset($flag->show_on_page)) { + if (!empty($flag->show_on_page)) { $flag->show_in_links['full'] = TRUE; unset($flag->show_on_page); } // Update show_on_comment and show_on_entity properties to use new view // mode settings. Since the old logic was to show on all view modes, do that. - if (isset($flag->show_on_entity) || isset($flag->show_on_comment)) { + if (!empty($flag->show_on_entity) || !empty($flag->show_on_comment)) { if ($entity_info = entity_get_info($flag->entity_type)) { foreach ($entity_info['view modes'] as $view_mode => $value) { $flag->show_in_links[$view_mode] = TRUE;