From 03437ba399cc09919e0486b90874147d8d3005e4 Mon Sep 17 00:00:00 2001 From: emc3 Date: Thu, 30 Oct 2003 14:55:35 +0000 Subject: [PATCH] Fixed some issues with permalinks when WP is installed in a subdirectory. git-svn-id: http://svn.automattic.com/wordpress/trunk@499 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- b2-include/b2template.functions.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/b2-include/b2template.functions.php b/b2-include/b2template.functions.php index 02aedd136..c1c538f47 100644 --- a/b2-include/b2template.functions.php +++ b/b2-include/b2template.functions.php @@ -1188,9 +1188,9 @@ function comments_popup_link($zero='No Comments', $one='1 Comment', $more='% Com return; } } - echo 'post_name ); - return str_replace($rewritecode, $rewritereplace, get_settings('permalink_structure')); + return $siteurl . str_replace($rewritecode, $rewritereplace, get_settings('permalink_structure')); } else { // if they're not using the fancy permalink option - return $file.$querystring_start.'p'.$querystring_equal.$post->ID; + return $siteurl . $file.$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"); @@ -1437,9 +1438,9 @@ function get_permalink($id=false) { date('j', $unixtime), $idpost->post_name ); - return str_replace($rewritecode, $rewritereplace, get_settings('permalink_structure')); + return $siteurl . str_replace($rewritecode, $rewritereplace, get_settings('permalink_structure')); } else { - return $file.$querystring_start.'p'.$querystring_equal.$idpost->ID; + return $siteurl . $file.$querystring_start.'p'.$querystring_equal.$idpost->ID; } } }