From c04c783ca00b33f3ef9de43cbee5dba5bab14540 Mon Sep 17 00:00:00 2001 From: Robert Brownstein Date: Wed, 10 Jul 2013 11:58:21 -0400 Subject: [PATCH] Issue #2038911 by Uncommented: Added node alias delete action --- pathauto.module | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pathauto.module b/pathauto.module index fbbdae3..461b87a 100644 --- a/pathauto.module +++ b/pathauto.module @@ -383,6 +383,12 @@ function pathauto_action_info() { 'configurable' => FALSE, 'triggers' => array(), ); + $info['pathauto_node_delete_action'] = array( + 'type' => 'node', + 'label' => t('Delete node alias'), + 'configurable' => FALSE, + 'triggers' => array(), + ); $info['pathauto_taxonomy_term_update_action'] = array( 'type' => 'taxonomy_term', 'label' => t('Update taxonomy term alias'), @@ -608,6 +614,14 @@ function pathauto_node_update_action($node, $context = array()) { } /** + * Delete node alias action + */ +function pathauto_node_delete_action($node, $context = array()) { + $uri = entity_uri('node', $node); + pathauto_path_delete_all($uri['path']); +} + +/** * @} End of "name pathauto_node". */ -- 1.8.1.msysgit.1