From df7fdc51b61790396600bbda84b73530ae3bd598 Mon Sep 17 00:00:00 2001 From: saxmatt Date: Sun, 28 Dec 2003 21:45:18 +0000 Subject: [PATCH] Permalink structure fix and link comments when pings are on. git-svn-id: http://svn.automattic.com/wordpress/trunk@659 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/template-functions.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-includes/template-functions.php b/wp-includes/template-functions.php index 02b1cc9f8..14c6b1c5e 100644 --- a/wp-includes/template-functions.php +++ b/wp-includes/template-functions.php @@ -516,7 +516,7 @@ function get_month_link($year, $month) { if ('/' != substr($monthlink, -1)) $monthlink = substr($monthlink, 0, -1); $monthlink = str_replace('%year%', $year, $monthlink); $monthlink = str_replace('%monthnum%', intval($month), $monthlink); - return $monthlink; + return $siteurl . $monthlink; } else { return $siteurl.'/'.$blogfilename.$querystring_start.'m'.$querystring_equal.$year.zeroise($month, 2); } @@ -535,7 +535,7 @@ function get_day_link($year, $month, $day) { $daylink = str_replace('%year%', $year, $daylink); $daylink = str_replace('%monthnum%', intval($month), $daylink); $daylink = str_replace('%day%', intval($day), $daylink); - return $daylink; + return $siteurl . $daylink; } else { return $siteurl.'/'.$blogfilename.$querystring_start.'m'.$querystring_equal.$year.zeroise($month, 2).zeroise($day, 2); } @@ -1307,7 +1307,7 @@ function get_category_link($echo = false, $category_id) { $category_nicename = $wpdb->get_var("SELECT category_nicename FROM $tablecategories WHERE cat_ID = $category_id"); // Get any static stuff from the front $front = substr($permalink_structure, 0, strpos($permalink_structure, '%')); - $link = $front . 'category/' . $category_nicename; + $link = $siteurl . $front . 'category/' . $category_nicename; } if ($echo) echo $link; @@ -1549,7 +1549,7 @@ function comments_popup_link($zero='No Comments', $one='1 Comment', $more='% Com global $id, $wpcommentspopupfile, $wpcommentsjavascript, $post, $wpdb, $tablecomments, $HTTP_COOKIE_VARS, $cookiehash; global $querystring_start, $querystring_equal, $querystring_separator, $siteurl; $number = $wpdb->get_var("SELECT COUNT(*) FROM $tablecomments WHERE comment_post_ID = $id AND comment_approved = '1'"); - if (0 == $number && 'closed' == $post->comment_status) { + if (0 == $number && 'closed' == $post->comment_status && 'closed' == $post->ping_status) { echo $none; return; } else {