Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#7483 closed defect (bug) (fixed)

redirect_canonical not send type_of_url to user_trailingslashit

Reported by: xorax's profile xorax Owned by: markjaquith's profile markjaquith
Milestone: 2.6.1 Priority: high
Severity: minor Version: 2.7
Component: General Keywords: has-patch canonical url redirect
Focuses: Cc:

Description

the function redirect_canonical not send correct type_of_url to user_trailingslashit when path is not home.

an accolade missing and it's in accordance with the indentation.

canonical.php :
***************
*** 165,175 ****
  		} else {
  			foreach ( array('single', 'category', 'page', 'day', 'month', 'year') as $type ) {
  				$func = 'is_' . $type;
! 				if ( call_user_func($func) )
  					$user_ts_type = $type;
  					break;
  				}
  			}
  		$redirect['path'] = user_trailingslashit($redirect['path'], $user_ts_type);
  	} elseif ( is_home() ) {
  		$redirect['path'] = trailingslashit($redirect['path']);
--- 165,176 ----
  		} else {
  			foreach ( array('single', 'category', 'page', 'day', 'month', 'year') as $type ) {
  				$func = 'is_' . $type;
! 				if ( call_user_func($func) ) {
  					$user_ts_type = $type;
  					break;
  				}
  			}
+ 		}
  		$redirect['path'] = user_trailingslashit($redirect['path'], $user_ts_type);
  	} elseif ( is_home() ) {
  		$redirect['path'] = trailingslashit($redirect['path']);

Attachments (1)

7483.diff (641 bytes) - added by DD32 16 years ago.
Reporters code in .diff format.

Download all attachments as: .zip

Change History (6)

@DD32
16 years ago

Reporters code in .diff format.

#1 @DD32
16 years ago

  • Keywords has-patch added
  • Version set to 2.7

#2 @ryan
16 years ago

  • Owner changed from anonymous to markjaquith

#3 @markjaquith
16 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [8593]) Fix braces so user_trailingslashit gets the correct information passed in canonical redirect code. props xorax. fixes #7483 for trunk

#4 @markjaquith
16 years ago

  • Milestone changed from 2.7 to 2.6.1
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for 2.6.1

#5 @markjaquith
16 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [8594]) Fix braces so user_trailingslashit gets the correct information passed in canonical redirect code. props xorax. fixes #7483 for 2.6.1

Note: See TracTickets for help on using tickets.