From 5c92c8cee8fcea3478a86c388df02fdff343fa9f Mon Sep 17 00:00:00 2001
From: Mark Carver <mark.carver@me.com>
Date: Tue, 24 Apr 2012 19:50:49 -0500
Subject: [PATCH] Fixed [#1405668] - Disrupts overlay

---
 subpathauto.module |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/subpathauto.module b/subpathauto.module
index def9f1b..c1ba214 100644
--- a/subpathauto.module
+++ b/subpathauto.module
@@ -42,6 +42,23 @@ function subpathauto_url_outbound_alter(&$path, $options, $original_path) {
 }
 
 /**
+* Implements hook_admin_paths_alter().
+*/
+function subpathauto_admin_paths_alter(&$paths) {
+  // Only alter paths if admin paths are not ignored.
+  if (!variable_get('subpathauto_ignore_admin', 1)) {
+    foreach ($paths as $path => $enabled) {
+      // Only alter enabled admin paths.
+      if ($enabled) {
+        if ($alias = subpathauto_lookup_subpath('alias', $path, $path)) {
+          $paths[$alias] = TRUE;
+        }
+      }
+    }
+  }
+}
+
+/**
  * Given an alias, return its Drupal system URL if one exists. Given a Drupal
  * system URL return one of its aliases if such a one exists. Otherwise,
  * return FALSE.
-- 
1.7.10

