From 6061366363e5c02061fd8cfa4d045d1724eae344 Mon Sep 17 00:00:00 2001 From: Matt_Fitzpatrick Date: Thu, 3 Mar 2011 11:07:25 -0800 Subject: [PATCH] Issue: Rules don't delete an URL alias when system path is empty --- rules/modules/path.rules.inc | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/rules/modules/path.rules.inc b/rules/modules/path.rules.inc index 53a3b53..e1328fc 100644 --- a/rules/modules/path.rules.inc +++ b/rules/modules/path.rules.inc @@ -71,6 +71,11 @@ function rules_action_path_alias($settings) { if (!drupal_lookup_path('source', $dst)) { path_set_alias($settings['src'], $dst, NULL, $settings['language']); } + // Otherwise, the path alias is taken. + // If the system path is empty, delete the alias. + elseif (!$settings['src']) { + path_set_alias(NULL, $dst, NULL, $settings['language']); + } } /** -- 1.7.1