From 13c0dc3c69b2eba21422871eb91d00bfb3f6d3a8 Mon Sep 17 00:00:00 2001 From: mikelittle Date: Tue, 4 Nov 2003 00:22:15 +0000 Subject: [PATCH] Because get_permalink now prepends $siteurl, several places were doubling it. Also fixed popup comments: they cannot currently use the new urls. git-svn-id: http://svn.automattic.com/wordpress/trunk@520 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- b2-include/b2template.functions.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/b2-include/b2template.functions.php b/b2-include/b2template.functions.php index 846c42fed..ae7e3e594 100644 --- a/b2-include/b2template.functions.php +++ b/b2-include/b2template.functions.php @@ -366,7 +366,7 @@ echo "\n \n\n"; /***** Links *****/ function get_permalink($id=false) { global $post, $wpdb, $tableposts; - global $file, $siteurl, $querystring_start, $querystring_equal; + global $siteurl, $blogfilename, $querystring_start, $querystring_equal; $rewritecode = array( '%year%', '%monthnum%', @@ -384,7 +384,7 @@ function get_permalink($id=false) { ); return $siteurl . str_replace($rewritecode, $rewritereplace, get_settings('permalink_structure')); } else { // if they're not using the fancy permalink option - return $siteurl . $file.$querystring_start.'p'.$querystring_equal.$post->ID; + return $siteurl . $blogfilename.$querystring_start.'p'.$querystring_equal.$post->ID; } } else { // if an ID is given $idpost = $wpdb->get_row("SELECT post_date, post_name FROM $tableposts WHERE ID = $id"); @@ -398,7 +398,7 @@ function get_permalink($id=false) { ); return $siteurl . str_replace($rewritecode, $rewritereplace, get_settings('permalink_structure')); } else { - return $siteurl . $file.$querystring_start.'p'.$querystring_equal.$idpost->ID; + return $siteurl . $blogfilename.$querystring_start.'p'.$querystring_equal.$idpost->ID; } } } @@ -1408,9 +1408,10 @@ function comments_popup_link($zero='No Comments', $one='1 Comment', $more='% Com return; } } - echo 'comment_post_ID).'#comments'; + echo get_permalink($comment->comment_post_ID).'#comments'; } function permalink_comments_rss() { global $comment,$postdata,$pagenow,$siteurl,$blogfilename; global $querystring_start, $querystring_equal, $querystring_separator; - echo $siteurl.get_permalink($comment->comment_post_ID); + echo get_permalink($comment->comment_post_ID); } /***** // Comment tags *****/ @@ -1662,7 +1663,7 @@ function permalink_single($file = '') { function permalink_single_rss($file = '') { global $siteurl; - echo $siteurl . get_permalink(); + echo get_permalink(); } /***** // Permalink tags *****/