diff --git a/scheduler.rules.inc.39 b/scheduler.rules.inc index 3d745df..a5b1817 100644 --- a/scheduler.rules.inc.39 +++ b/scheduler.rules.inc @@ -134,7 +134,8 @@ function scheduler_set_publish_date_action($node, $date) { scheduler_node_update($node); } else { - drupal_set_message(t('Scheduled publishing is not enabeld for %type content. To prevent this message add the condition "Scheduled publishing is enabled" to your rule.', array('%type' => node_type_get_name($node->type))), 'warning'); + $type_name = node_type_get_name($node->type); + watchdog('scheduler', 'Scheduled publishing is not enabled for %type content. To prevent this message add the condition "Scheduled publishing is enabled" to your Rule, or enable the Scheduler options via the %type content type settings.', array('%type' => $type_name), WATCHDOG_WARNING, l(t('@type settings', array('@type' => $type_name)), 'admin/structure/types/manage/' . $node->type)); } } @@ -153,7 +154,8 @@ function scheduler_set_unpublish_date_action($node, $date) { scheduler_node_update($node); } else { - drupal_set_message(t('Scheduled unpublishing is not enabeld for %type content. To prevent this message add the condition "Scheduled unpublishing is enabled" to your rule.', array('%type' => node_type_get_name($node->type))), 'warning'); + $type_name = node_type_get_name($node->type); + watchdog('scheduler', 'Scheduled unpublishing is not enabled for %type content. To prevent this message add the condition "Scheduled unpublishing is enabled" to your Rule, or enable the Scheduler options via the %type content type settings.', array('%type' => $type_name), WATCHDOG_WARNING, l(t('@type settings', array('@type' => $type_name)), 'admin/structure/types/manage/' . $node->type)); } } @@ -169,6 +171,10 @@ function scheduler_remove_publish_date_action($node) { scheduler_node_presave($node); scheduler_node_update($node); } + else { + $type_name = node_type_get_name($node->type); + watchdog('scheduler', 'Scheduled publishing is not enabled for %type content. To prevent this message add the condition "Scheduled publishing is enabled" to your Rule, or enable the Scheduler options via the %type content type settings.', array('%type' => $type_name), WATCHDOG_WARNING, l(t('@type settings', array('@type' => $type_name)), 'admin/structure/types/manage/' . $node->type)); + } } /** @@ -183,6 +189,10 @@ function scheduler_remove_unpublish_date_action($node) { scheduler_node_presave($node); scheduler_node_update($node); } + else { + $type_name = node_type_get_name($node->type); + watchdog('scheduler', 'Scheduled unpublishing is not enabled for %type content. To prevent this message add the condition "Scheduled unpublishing is enabled" to your Rule, or enable the Scheduler options via the %type content type settings.', array('%type' => $type_name), WATCHDOG_WARNING, l(t('@type settings', array('@type' => $type_name)), 'admin/structure/types/manage/' . $node->type)); + } } /**