summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Carper2009-10-12 06:38:12 (GMT)
committer Mike Carper2009-10-12 06:38:12 (GMT)
commit1fe87eb201bf7a96db7a42a9dde6dd0b27d93fc8 (patch)
tree1bef62b5374f7c837296dbdb34bd18f1fcb2b75d
parent29301f3a9e83c0dd9407f99bda38c5a3410d25e3 (diff)
#601838: Prevent self references in relationship table.
-rw-r--r--boost.module5
1 files changed, 5 insertions, 0 deletions
diff --git a/boost.module b/boost.module
index e653dff..3dcba4a 100644
--- a/boost.module
+++ b/boost.module
@@ -1617,6 +1617,11 @@ function boost_cache_set_node_relationships($relationships) {
$data['page_type'] = isset($data['page_type']) ? $data['page_type'] : $router_item['page_type'];
$data['page_id'] = isset($data['page_id']) ? $data['page_id'] : $router_item['page_id'];
+ // Skip if this is referencing its self.
+ if ($data['page_callback'] == $data['child_page_callback'] && $data['page_type'] == $data['child_page_type'] && $data['page_id'] == $data['child_page_id']) {
+ continue;
+ }
+
// Create the primary key
$hash = md5($data['base_dir'] . $data['page_callback'] . $data['page_type'] . $data['page_id'] . $data['child_page_callback'] . $data['child_page_type'] . $data['child_page_id']);