Make WordPress Core


Ignore:
Timestamp:
05/09/2004 05:47:02 AM (22 years ago)
Author:
saxmatt
Message:

Various fixes and cleanups, inspired and pointed out by Joseph Scott.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-blog-header.php

    r1236 r1245  
    516516            $single = 1;
    517517        }
    518         if ($s && empty($paged)) { // If they were doing a search and got one result
    519             header('Location: ' . get_permalink($posts[0]->ID));
    520         }
     518        if ($s && empty($paged)) { // If they were doing a search and got one result
     519            if (!strstr($_SERVER['PHP_SELF'], 'wp-admin')) // And not in admin section
     520                header('Location: ' . get_permalink($posts[0]->ID));
     521        }
    521522    }
    522523} // end if posts.
Note: See TracChangeset for help on using the changeset viewer.