diff --git a/wp-blog-header.php b/wp-blog-header.php
index ddb4c646c4..c9e0e2907d 100644
--- a/wp-blog-header.php
+++ b/wp-blog-header.php
@@ -1,21 +1,21 @@
wp-config.php file. I need this before we can get started. Need more help? We got it. You can create a wp-config.php
file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file.");
-require_once(dirname(__FILE__).'/' . '/wp-config.php');
+require_once( dirname(__FILE__) . '/wp-config.php');
-require_once(dirname(__FILE__).'/' . 'wp-includes/wp-l10n.php');
+require_once( dirname(__FILE__) . '/wp-includes/wp-l10n.php');
// Process PATH_INFO, if set.
$path_info = array();
-if (! empty($_SERVER['PATH_INFO'])) {
+if ( !empty( $_SERVER['PATH_INFO'] ) ) {
// Fetch the rewrite rules.
$rewrite = rewrite_rules('matches');
$pathinfo = $_SERVER['PATH_INFO'];
// Trim leading '/'.
- $pathinfo = preg_replace("!^/!", '', $pathinfo);
+ $pathinfo = preg_replace('!^/!', '', $pathinfo);
if (! empty($rewrite)) {
// Get the name of the file requesting path info.
@@ -52,46 +52,39 @@ if (! empty($_SERVER['PATH_INFO'])) {
$wpvarstoreset = array('m','p','posts','w', 'cat','withcomments','s','search','exact', 'sentence','poststart','postend','preview','debug', 'calendar','page','paged','more','tb', 'pb','author','order','orderby', 'year', 'monthnum', 'day', 'hour', 'minute', 'second', 'name', 'category_name', 'feed', 'author_name');
- for ($i=0; $iparse_query($query_string);
-// Update some caches.
update_category_cache();
// Call query posts to do the work.
$posts = query_posts($query_string);
if (1 == count($posts)) {
- if ($p || $name) {
- $more = 1;
- $single = 1;
- }
- if ($s && empty($paged)) { // If they were doing a search and got one result
- if (!strstr($_SERVER['PHP_SELF'], 'wp-admin')) // And not in admin section
- header('Location: ' . get_permalink($posts[0]->ID));
- }
+ if ($p || $name) {
+ $more = 1;
+ $single = 1;
+ }
+ if ( $s && empty($paged) && !strstr($_SERVER['PHP_SELF'], 'wp-admin/')) { // If they were doing a search and got one result
+ header('Location: ' . get_permalink($posts[0]->ID));
+ }
}
if ($pagenow != 'wp-feed.php' && $feed != '') {
- require(dirname(__FILE__) . '/wp-feed.php');
- exit;
+ require(dirname(__FILE__) . '/wp-feed.php');
+ exit;
}
if ($pagenow != 'wp-trackback.php' && $tb == 1) {
- require(dirname(__FILE__) . '/wp-trackback.php');
- exit;
+ require(dirname(__FILE__) . '/wp-trackback.php');
+ exit;
}
if ($pagenow != 'post.php' && $pagenow != 'edit.php') {
- if ( get_settings('gzipcompression') )
- gzip_compression();
+ if ( get_settings('gzipcompression') )
+ gzip_compression();
}
?>
\ No newline at end of file