<?php
/*
Plugin Name: Search Pages
Plugin URI: http://randomfrequency.net/wordpress/search-pages/
Description: This makes search queries look at pages and posts instead of only posts. Based off of <a href="http://kwebble.com/">Rob Schluter's</a> <a href="http://kwebble.com/blog_archives/2005/02/20/searching-pages-in-wordpress-15/">hack</a>.
Author: David B. Nagle
Version: 0.1
Author URI: http://randomfrequency.net/
*/ 

function add_paged_search_where($where) {
    global 
$wp_query;
    if (!empty(
$wp_query->query_vars['s'])) {
        
$where str_replace(' AND (post_status = "publish"'' AND ((post_status = "static" or post_status = "publish")'$where);
    }
    return 
$where;
}

add_filter('posts_where''add_paged_search_where');
?>