summaryrefslogtreecommitdiffstats
path: root/wp-includes/link-template.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-12-14 12:07:08 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-12-14 12:07:08 +0000
commita14a6c1201b773cd2ef57a7526190ff43d20fe22 (patch)
tree630d05fff5e6f6aa36ee3d8eb5b206f102617a65 /wp-includes/link-template.php
parent040b8591582940de99442bb1de04afdf9d3daf59 (diff)
downloadwordpress-mu-a14a6c1201b773cd2ef57a7526190ff43d20fe22.tar.gz
wordpress-mu-a14a6c1201b773cd2ef57a7526190ff43d20fe22.tar.xz
wordpress-mu-a14a6c1201b773cd2ef57a7526190ff43d20fe22.zip
WP Merge to rev 4646
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@824 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/link-template.php')
-rw-r--r--wp-includes/link-template.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php
index 151a986..ef570f2 100644
--- a/wp-includes/link-template.php
+++ b/wp-includes/link-template.php
@@ -134,7 +134,7 @@ function get_attachment_link($id = false) {
}
$object = get_post($id);
- if ( $wp_rewrite->using_permalinks() && ($object->post_parent > 0) ) {
+ if ( $wp_rewrite->using_permalinks() && ($object->post_parent > 0) && ($object->post_parent != $id) ) {
$parent = get_post($object->post_parent);
if ( 'page' == $parent->post_type )
$parentlink = _get_page_link( $object->post_parent ); // Ignores page_on_front