diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-03-09 15:17:25 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-03-09 15:17:25 +0000 |
| commit | 492aa4ee7086ed94cb2f37a2bce3b52905841659 (patch) | |
| tree | 825b6d0ae66246bae7a65c1f610a65b59789a6b5 /wp-includes/rewrite.php | |
| parent | 359223a4711934ea6ec20e4c7613832e1f1132b5 (diff) | |
| download | wordpress-mu-492aa4ee7086ed94cb2f37a2bce3b52905841659.tar.gz wordpress-mu-492aa4ee7086ed94cb2f37a2bce3b52905841659.tar.xz wordpress-mu-492aa4ee7086ed94cb2f37a2bce3b52905841659.zip | |
WP Merge to rev 5007
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@909 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/rewrite.php')
| -rw-r--r-- | wp-includes/rewrite.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/wp-includes/rewrite.php b/wp-includes/rewrite.php index a8af33a..d22d3fc 100644 --- a/wp-includes/rewrite.php +++ b/wp-includes/rewrite.php @@ -591,11 +591,11 @@ class WP_Rewrite { //individual post. Do this by checking it contains at least one of 1) post name,
//2) post ID, 3) page name, 4) timestamp (year, month, day, hour, second and
//minute all present). Set these flags now as we need them for the endpoints.
- if (strstr($struct, '%postname%') || strstr($struct, '%post_id%')
- || strstr($struct, '%pagename%')
- || (strstr($struct, '%year%') && strstr($struct, '%monthnum%') && strstr($struct, '%day%') && strstr($struct, '%hour%') && strstr($struct, '%minute') && strstr($struct, '%second%'))) {
+ if (strpos($struct, '%postname%') !== false || strpos($struct, '%post_id%') !== false
+ || strpos($struct, '%pagename%') !== false
+ || (strpos($struct, '%year%') !== false && strpos($struct, '%monthnum%') !== false && strpos($struct, '%day%') !== false && strpos($struct, '%hour%') !== false && strpos($struct, '%minute%') !== false && strpos($struct, '%second%') !== false)) {
$post = true;
- if ( strstr($struct, '%pagename%') )
+ if (strpos($struct, '%pagename%') !== false)
$page = true;
}
@@ -809,7 +809,7 @@ class WP_Rewrite { //nada.
}
- if (strstr($query, $this->index)) {
+ if (strpos($query, $this->index) !== false) {
$rules .= 'RewriteRule ^' . $match . ' ' . $home_root . $query . " [QSA,L]\n";
} else {
$rules .= 'RewriteRule ^' . $match . ' ' . $site_root . $query . " [QSA,L]\n";
|
