Log in with username/password: lyceum/lyceum

Changeset 1253

Show
Ignore:
Timestamp:
10/29/07 21:16:54 (1 year ago)
Author:
jjb
Message:

#859, #869 Accounting for b var in 404 logic.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.0/src/lib/functions.php

    r1251 r1253  
    443443} 
    444444 
     445function remove_b_var_from_query_string($qs){ 
     446   return preg_replace('/b=[^&]*/', '', $qs); 
     447} 
     448 
    445449function get_url_arg_pairs($url) { 
    446450   $parsed_url = parse_url($url); 
  • branches/1.0/src/lyceum/wp-includes/classes.php

    r1187 r1253  
    17911791      // or if the request was a regular query string request rather than a 
    17921792      // permalink request. 
    1793       if ( (0 == count($wp_query->posts)) && !is_404() && !is_search() && ( $this->did_permalink || (!empty($_SERVER['QUERY_STRING']) && (false === strpos($_SERVER['REQUEST_URI'], '?'))) ) ) { 
     1793      $qs = remove_b_var_from_query_string($_SERVER['QUERY_STRING']); 
     1794      if ( (0 == count($wp_query->posts)) && !is_404() && !is_search() && ( $this->did_permalink || (!empty($qs) && (false === strpos($_SERVER['REQUEST_URI'], '?'))) ) ) { 
    17941795         $wp_query->set_404(); 
    17951796         status_header( 404 ); 
Log in with username/password: lyceum/lyceum