--- path_redirect.module	2007-12-24 12:48:49.000000000 -0600
+++ path_redirect.module	2007-12-24 14:07:15.000000000 -0600
@@ -1,6 +1,10 @@
 <?php
 //$Id: path_redirect.module,v 1.3.2.17 2007/12/24 18:48:49 horsepunchkid Exp $
 
+if (module_exists('workflow_ng')) {
+  include_once(drupal_get_path('module', 'path_redirect'). '/path_redirect_workflow.inc');
+}
+
 /**
  * Implementation of hook_help
  *
--- path_redirect_workflow.inc	1969-12-31 18:00:00.000000000 -0600
+++ path_redirect_workflow.inc	2007-12-24 17:33:05.000000000 -0600
@@ -0,0 +1,68 @@
+<?php
+/**
+ * @file Workflow-ng integration for the path_redirect module
+ */
+
+/**
+ * Implementation of hook_condition_info()
+ */
+function path_redirect_condition_info() {
+  return array(
+    'path_redirect_condition_url_has_alias' => array(
+      '#label' => t('Path has redirect'),
+      '#module' => t('Path Redirect'),
+    ),
+    'path_redirect_condition_redirect_exists' => array(
+      '#label' => t('URL redirect exists'),
+      '#module' => t('Path Redirect'),
+    ),
+  );
+}
+
+/**
+ * Implementation of hook_action_info()
+ */
+function path_redirect_action_info() {
+  return array(
+    'path_redirect_action_create' => array(
+      '#label' => t('Create or delete a URL redirect'),
+      '#module' => t('Path Redirect'),
+    ),
+  );
+}
+
+/**
+ * Action implementation: Create a URL redirect
+ */
+function path_redirect_action_create($settings, &$arguments, &$log) {
+  extract( workflow_ng_token_replace_all(array('from', 'to'), $settings, $arguments, $log) );
+
+  path_redirect_save(array('path' => $from, 'redirect' => $to));
+}
+
+function path_redirect_action_create_form($settings = array(), $argument_info) {
+  $form['from'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Redirect from'),
+    '#default_value' => $settings['from'],
+    '#maxlength' => 255,
+    '#size' => 45,
+    '#description' => t('Specify the path from which you would like to redirect.'),
+    '#field_prefix' => url(NULL, NULL, NULL, TRUE) . (variable_get('clean_url', 0) ? '' : '?q='),
+  );
+  $form['to'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Redirect to'),
+    '#default_value' => $settings['to'],
+    '#maxlength' => 255,
+    '#size' => 45,
+    '#description' => t('Specify the path or URL to redirect to.'),
+  );
+  workflow_ng_token_replacement_help($form, $argument_info);
+  return $form;
+}
+
+function path_redirect_action_create_submit($form_id, $form_values) {
+  return workflow_ng_token_get_settings(array('from', 'to'), $form_values);
+}
+
