Changeset 614
- Timestamp:
- 03/28/06 17:06:36 (2 years ago)
- Files:
-
- trunk/src/lib/wp-includes/pluggable-functions.php (modified) (1 diff)
- trunk/src/lib/wp-includes/template-functions-links.php (modified) (10 diffs)
- trunk/src/lyceum/wp-comments-post.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/lib/wp-includes/pluggable-functions.php
r547 r614 399 399 400 400 $notify_message = sprintf( __('A new comment on the post #%1$s "%2$s" is waiting for your approval'), $post->ID, $post->post_title ) . "\r\n"; 401 $notify_message .= get_permalink($comment->comment_post_ID , true) . "\r\n\r\n";401 $notify_message .= get_permalink($comment->comment_post_ID) . "\r\n\r\n"; 402 402 $notify_message .= sprintf( __('Author : %1$s (IP: %2$s , %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n"; 403 403 $notify_message .= sprintf( __('E-mail : %s'), $comment->comment_author_email ) . "\r\n"; trunk/src/lib/wp-includes/template-functions-links.php
r613 r614 23 23 } 24 24 25 function get_permalink($id = 0, $email=false) { 26 global $blog, $blogdata; 25 function get_permalink($id = 0) { 27 26 $rewritecode = array( 28 27 '%year%', … … 75 74 return apply_filters('post_link', get_settings('home') .str_replace($rewritecode, $rewritereplace, $permalink), $post); 76 75 } else { // if they're not using the fancy permalink option 77 $ampersand = $email?'&':'&'; 78 $permalink = get_settings('home') . "?b=$blog".$ampersand."p=" . $post->ID; 76 $permalink = get_settings('home') . "?p=" . $post->ID; 79 77 return apply_filters('post_link', $permalink, $post); 80 78 } … … 82 80 83 81 function get_page_link($id = false) { 84 global $post, $wp_rewrite , $blog;82 global $post, $wp_rewrite; 85 83 86 84 if (! $id) { … … 95 93 $link = get_settings('home') . "/$link/"; 96 94 } else { 97 $link = get_settings('home') . "/? b=$blogdata->slug&page_id=$id";95 $link = get_settings('home') . "/?page_id=$id"; 98 96 } 99 97 … … 102 100 103 101 function get_attachment_link($id = false) { 104 global $post, $wp_rewrite , $blog;102 global $post, $wp_rewrite; 105 103 106 104 $link = false; … … 119 117 120 118 if (! $link ) { 121 $link = get_bloginfo('home') . "/? b=$blogdata->slug&attachment_id=$id";119 $link = get_bloginfo('home') . "/?attachment_id=$id"; 122 120 } 123 121 … … 169 167 170 168 function get_feed_link($feed='rss2') { 171 global $wp_rewrite , $blog;169 global $wp_rewrite; 172 170 $do_perma = 0; 173 171 $feed_url = get_settings('siteurl'); … … 191 189 $feed = str_replace('comments_', 'comments-', $feed); 192 190 193 $output = get_settings('home') . "/? b=$blogdata->slug&feed={$feed}";191 $output = get_settings('home') . "/?feed={$feed}"; 194 192 } 195 193 … … 198 196 199 197 function edit_post_link($link = 'Edit This', $before = '', $after = '') { 200 global $user_ID, $post , $blog, $bloginfo;198 global $user_ID, $post; 201 199 202 200 get_currentuserinfo(); … … 211 209 $file = 'post'; 212 210 213 $location = get_settings(' siteurl') . "/$blog/admin/{$file}.php?token=".formtoken($file.'.php','edit',$post->ID)."&action=edit&post=$post->ID";211 $location = get_settings('home') . "/admin/{$file}.php?token=".formtoken($file.'.php','edit',$post->ID)."&action=edit&post=$post->ID"; 214 212 echo $before . "<a href=\"$location\">$link</a>" . $after; 215 213 } 216 214 217 215 function edit_comment_link($link = 'Edit This', $before = '', $after = '') { 218 global $user_ID, $post, $comment , $blog;216 global $user_ID, $post, $comment; 219 217 220 218 get_currentuserinfo(); trunk/src/lyceum/wp-comments-post.php
r543 r614 63 63 setcookie('comment_author_url_' . COOKIEHASH, stripslashes($comment_author_url), time() + 30000000, COOKIEPATH, COOKIE_DOMAIN); 64 64 endif; 65 65 trace('get_permalink( $comment_post_ID )', get_permalink( $comment_post_ID )); 66 trace('empty( $_POST[\'redirect_to\'] )', empty( $_POST['redirect_to'] )); 66 67 $location = ( empty( $_POST['redirect_to'] ) ) ? get_permalink( $comment_post_ID ) : $_POST['redirect_to']; 67 68
