Ticket #12700: 12700.diff
File 12700.diff, 2.2 KB (added by , 14 years ago) |
---|
-
wp-includes/rewrite.php
1365 1374 1366 1375 //create query for /page/xx 1367 1376 $pagematch = $match . $pageregex; 1368 $pagequery = $index . '?' . $query . '&paged=' . $this->preg_index($num_toks + 1);1377 $pagequery = add_query_arg('paged', $this->preg_index($num_toks + 1), $index . '?' . $query); 1369 1378 1370 1379 //create query for /comment-page-xx 1371 1380 $commentmatch = $match . $commentregex; 1372 $commentquery = $index . '?' . $query . '&cpage=' . $this->preg_index($num_toks + 1);1381 $commentquery = add_query_arg('cpage', $this->preg_index($num_toks + 1), $index . '?' . $query); 1373 1382 1374 1383 if ( get_option('page_on_front') ) { 1375 1384 //create query for Root /comment-page-xx 1376 1385 $rootcommentmatch = $match . $commentregex; 1377 $rootcommentquery = $index . '?' . $query . '&page_id=' . get_option('page_on_front') . '&cpage=' . $this->preg_index($num_toks + 1); 1386 $rootcommentquery = add_query_arg(array( 1387 'page_id' => get_option('page_on_front'), 1388 'cpage' => $this->preg_index($num_toks + 1) 1389 ), $index . '?' . $query); 1378 1390 } 1379 1391 1380 1392 //create query for /feed/(feed|atom|rss|rss2|rdf) 1381 1393 $feedmatch = $match . $feedregex; 1382 $feedquery = $feedindex . '?' . $query . '&feed=' . $this->preg_index($num_toks + 1);1394 $feedquery = add_query_arg('feed', $this->preg_index($num_toks + 1), $feedindex . '?' . $query); 1383 1395 1396 //if asked to, turn the feed query into a comment feed one 1397 if ( $forcomments ) 1398 $feedquery = add_query_arg('withcomments', 1, $feedquery); 1399 1384 1400 //create query for /(feed|atom|rss|rss2|rdf) (see comment near creation of $feedregex) 1385 1401 $feedmatch2 = $match . $feedregex2; 1386 $feedquery2 = $feed index . '?' . $query . '&feed=' . $this->preg_index($num_toks + 1);1402 $feedquery2 = $feedquery; 1387 1403 1388 //if asked to, turn the feed queries into comment feed ones1389 if ( $forcomments ) {1390 $feedquery .= '&withcomments=1';1391 $feedquery2 .= '&withcomments=1';1392 }1393 1394 1404 //start creating the array of rewrites for this dir 1395 1405 $rewrite = array(); 1396 1406 if ( $feed ) //...adding on /feed/ regexes => queries