Changeset 909

Show
Ignore:
Timestamp:
03/09/07 15:17:25 (2 years ago)
Author:
donncha
Message:

WP Merge to rev 5007

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/app.php

    r904 r909  
    193193                        } else { 
    194194                                $endtag = $this->ns_to_prefix($name); 
    195                                 if(strstr($this->in_content[count($this->in_content)-1], "<$endtag")) { 
     195                                if (strpos($this->in_content[count($this->in_content)-1], '<' . $endtag) !== false) { 
    196196                                        array_push($this->in_content, "/>"); 
    197197                                } else { 
     
    221221                if(!empty($this->in_content)) { 
    222222                        // handle self-closing tags (case: text node found, need to close element started) 
    223                         if(strstr($this->in_content[count($this->in_content)-1], "<")) { 
     223                        if (strpos($this->in_content[count($this->in_content)-1], '<') !== false) { 
    224224                                array_push($this->in_content, ">"); 
    225225                        } 
  • trunk/wp-admin/admin-functions.php

    r904 r909  
    11571157                        $state = true; 
    11581158                        foreach ( $markerdata as $n => $markerline ) { 
    1159                                 if ( strstr( $markerline, "# BEGIN {$marker}" )
     1159                                if (strpos($markerline, '# BEGIN ' . $marker) !== false
    11601160                                        $state = false; 
    11611161                                if ( $state ) { 
     
    11651165                                                fwrite( $f, "{$markerline}" ); 
    11661166                                } 
    1167                                 if ( strstr( $markerline, "# END {$marker}" ) ) { 
     1167                                if (strpos($markerline, '# END ' . $marker) !== false) { 
    11681168                                        fwrite( $f, "# BEGIN {$marker}\n" ); 
    11691169                                        if ( is_array( $insertion )) 
     
    12031203                $state = false; 
    12041204                foreach ( $markerdata as $markerline ) { 
    1205                         if ( strstr( $markerline, "# END {$marker}" )
     1205                        if (strpos($markerline, '# END ' . $marker) !== false
    12061206                                $state = false; 
    12071207                        if ( $state ) 
    12081208                                $result[] = $markerline; 
    1209                         if ( strstr( $markerline, "# BEGIN {$marker}" )
     1209                        if (strpos($markerline, '# BEGIN ' . $marker) !== false
    12101210                                $state = true; 
    12111211                } 
     
    15571557function add_theme_page( $page_title, $menu_title, $access_level, $file, $function = '' ) { 
    15581558        return add_submenu_page( 'themes.php', $page_title, $menu_title, $access_level, $file, $function ); 
     1559} 
     1560 
     1561function add_users_page( $page_title, $menu_title, $access_level, $file, $function = '' ) { 
     1562        if ( current_user_can('edit_users') ) 
     1563                $parent = 'users.php'; 
     1564        else 
     1565                $parent = 'profile.php'; 
     1566        return add_submenu_page( $parent, $page_title, $menu_title, $access_level, $file, $function ); 
    15591567} 
    15601568 
     
    17721780                '; 
    17731781} 
    1774 if ( strstr( $_SERVER['HTTP_USER_AGENT'], 'MSIE' )) 
     1782 
     1783if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) 
    17751784        add_action( 'admin_footer', 'browse_happy' ); 
    17761785 
     
    19331942        $size = strtolower( ini_get( 'upload_max_filesize' ) ); 
    19341943        $bytes = 0; 
    1935         if ( strstr( $size, 'k' )
     1944        if (strpos($size, 'k') !== false
    19361945                $bytes = $size * 1024; 
    1937         if ( strstr( $size, 'm' )
     1946        if (strpos($size, 'm') !== false
    19381947                $bytes = $size * 1024 * 1024; 
    1939         if ( strstr( $size, 'g' )
     1948        if (strpos($size, 'g') !== false
    19401949                $bytes = $size * 1024 * 1024 * 1024; 
    19411950?> 
    1942 <form enctype="multipart/form-data" id="import-upload-form" method="post" action="<?php echo $action ?>"> 
     1951<form enctype="multipart/form-data" id="import-upload-form" method="post" action="<?php echo attribute_escape($action) ?>"> 
    19431952<p> 
    19441953<label for="upload"><?php _e( 'Choose a file from your computer:' ); ?></label> (<?php printf( __('Maximum size: %s' ), $size ); ?> ) 
  • trunk/wp-admin/admin-header.php

    r810 r909  
    4545<body> 
    4646<div id="wphead"> 
    47 <h1><?php echo wptexturize(get_option(('blogname'))); ?> <span>(<a href="<?php echo get_option('home') . '/'; ?>"><?php _e('View site &raquo;') ?></a>)</span></h1> 
     47<h1><?php echo wptexturize(get_bloginfo(('name'))); ?> <span>(<a href="<?php echo get_option('home') . '/'; ?>"><?php _e('View site &raquo;') ?></a>)</span></h1> 
    4848</div> 
    4949<div id="user_info"><p><?php printf(__('Howdy, <strong>%s</strong>.'), $user_identity) ?> [<a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="<?php _e('Log out of this account') ?>"><?php _e('Sign Out'); ?></a>, <a href="profile.php"><?php _e('My Profile'); ?></a>] </p></div> 
  • trunk/wp-admin/custom-header.php

    r904 r909  
    175175<p><?php printf(__('Images of exactly <strong>%1$d x %2$d pixels</strong> will be used as-is.'), HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT); ?></p> 
    176176 
    177 <form enctype="multipart/form-data" id="uploadForm" method="POST" action="<?php echo add_query_arg('step', 2) ?>" style="margin: auto; width: 50%;"> 
     177<form enctype="multipart/form-data" id="uploadForm" method="POST" action="<?php echo attribute_escape(add_query_arg('step', 2)) ?>" style="margin: auto; width: 50%;"> 
    178178<label for="upload"><?php _e('Choose an image from your computer:'); ?></label><br /><input type="file" id="upload" name="import" /> 
    179179<input type="hidden" name="action" value="save" /> 
     
    189189<h2><?php _e('Reset Header Image and Color'); ?></h2> 
    190190<p><?php _e('This will restore the original header image and color. You will not be able to retrieve any customizations.') ?></p> 
    191 <form method="post" action="<?php echo add_query_arg('step', 1) ?>"> 
     191<form method="post" action="<?php echo attribute_escape(add_query_arg('step', 1)) ?>"> 
    192192<input type="submit" name="resetheader" value="<?php _e('Restore Original Header'); ?>" /> 
    193193</form> 
     
    241241<div class="wrap"> 
    242242 
    243 <form method="POST" action="<?php echo add_query_arg('step', 3) ?>"> 
     243<form method="POST" action="<?php echo attribute_escape(add_query_arg('step', 3)) ?>"> 
    244244 
    245245<p><?php _e('Choose the part of the image you want to use as your header.'); ?></p> 
  • trunk/wp-admin/edit-comments.php

    r861 r909  
    102102if ( 1 < $page ) { 
    103103        $args['apage'] = ( 1 == $page - 1 ) ? FALSE : $page - 1; 
    104         $r .=  '<a class="prev" href="' . add_query_arg( $args ) . '">&laquo; '. __('Previous Page') .'</a>' . "\n"; 
     104        $r .=  '<a class="prev" href="' . attribute_escape(add_query_arg( $args )) . '">&laquo; '. __('Previous Page') .'</a>' . "\n"; 
    105105} 
    106106if ( ( $total_pages = ceil( $total / 20 ) ) > 1 ) { 
     
    112112                        if ( $page_num < 3 || ( $page_num >= $page - 3 && $page_num <= $page + 3 ) || $page_num > $total_pages - 3 ) : 
    113113                                $args['apage'] = ( 1 == $page_num ) ? FALSE : $page_num; 
    114                                 $r .= '<a class="page-numbers" href="' . add_query_arg($args) . '">' . ( $page_num ) . "</a>\n"; 
     114                                $r .= '<a class="page-numbers" href="' . attribute_escape(add_query_arg($args)) . '">' . ( $page_num ) . "</a>\n"; 
    115115                                $in = true; 
    116116                        elseif ( $in == true ) : 
     
    123123if ( ( $page ) * 20 < $total || -1 == $total ) { 
    124124        $args['apage'] = $page + 1; 
    125         $r .=  '<a class="next" href="' . add_query_arg($args) . '">'. __('Next Page') .' &raquo;</a>' . "\n"; 
     125        $r .=  '<a class="next" href="' . attribute_escape(add_query_arg($args)) . '">'. __('Next Page') .' &raquo;</a>' . "\n"; 
    126126} 
    127127echo "<p class='pagenav'>$r</p>"; 
     
    154154<?php comment_text() ?> 
    155155 
    156 <p><?php comment_date('M j, g:i A');  ?> &#8212; [ 
     156<p><?php comment_date(__('M j, g:i A'));  ?> &#8212; [ 
    157157<?php 
    158158if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 
     
    249249if ( 1 < $page ) { 
    250250        $args['apage'] = ( 1 == $page - 1 ) ? FALSE : $page - 1; 
    251         $r .=  '<a class="prev" href="' . add_query_arg( $args ) . '">&laquo; '. __('Previous Page') .'</a>' . "\n"; 
     251        $r .=  '<a class="prev" href="' . attribute_escape(add_query_arg( $args )) . '">&laquo; '. __('Previous Page') .'</a>' . "\n"; 
    252252} 
    253253if ( ( $total_pages = ceil( $total / 20 ) ) > 1 ) { 
     
    259259                        if ( $page_num < 3 || ( $page_num >= $page - 3 && $page_num <= $page + 3 ) || $page_num > $total_pages - 3 ) : 
    260260                                $args['apage'] = ( 1 == $page_num ) ? FALSE : $page_num; 
    261                                 $r .= '<a class="page-numbers" href="' . add_query_arg($args) . '">' . ( $page_num ) . "</a>\n"; 
     261                                $r .= '<a class="page-numbers" href="' . attribute_escape(add_query_arg($args)) . '">' . ( $page_num ) . "</a>\n"; 
    262262                                $in = true; 
    263263                        elseif ( $in == true ) : 
     
    270270if ( ( $page ) * 20 < $total || -1 == $total ) { 
    271271        $args['apage'] = $page + 1; 
    272         $r .=  '<a class="next" href="' . add_query_arg($args) . '">'. __('Next Page') .' &raquo;</a>' . "\n"; 
     272        $r .=  '<a class="next" href="' . attribute_escape(add_query_arg($args)) . '">'. __('Next Page') .' &raquo;</a>' . "\n"; 
    273273} 
    274274echo "<p class='pagenav'>$r</p>"; 
  • trunk/wp-admin/edit-form-advanced.php

    r865 r909  
    245245 
    246246<?php if ('edit' == $action) : $delete_nonce = wp_create_nonce( 'delete-post_' . $post_ID ); ?> 
    247 <input name="deletepost" class="button delete" type="submit" id="deletepost" tabindex="10" value="<?php _e('Delete this post') ?>" <?php echo "onclick=\"if ( confirm('" . js_escape(sprintf(__("You are about to delete this post '%s'\n  'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { document.forms.post._wpnonce.value = '$delete_nonce'; return true;}return false;\""; ?> /> 
     247<input name="deletepost" class="button delete" type="submit" id="deletepost" tabindex="10" value="<?php echo ( 'draft' == $post->post_status ) ? __('Delete this draft') : __('Delete this post'); ?>" <?php echo "onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n  'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this post '%s'\n  'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { document.forms.post._wpnonce.value = '$delete_nonce'; return true;}return false;\""; ?> /> 
    248248<?php endif; ?> 
    249249 
  • trunk/wp-admin/edit-link-form.php

    r860 r909  
    2323 
    2424        if ('' == $value) { 
    25                 if ('family' == $class && !strstr($link_rel, 'child') && !strstr($link_rel, 'parent') && !strstr($link_rel, 'sibling') && !strstr($link_rel, 'spouse') && !strstr($link_rel, 'kin')) echo ' checked="checked"'; 
    26                 if ('friendship' == $class && !strstr($link_rel, 'friend') && !strstr($link_rel, 'acquaintance') && !strstr($link_rel, 'contact') ) echo ' checked="checked"'; 
    27                 if ('geographical' == $class && !strstr($link_rel, 'co-resident') && !strstr($link_rel, 'neighbor') ) echo ' checked="checked"'; 
     25                if ('family' == $class && strpos($link_rel, 'child') === false && strpos($link_rel, 'parent') === false && strpos($link_rel, 'sibling') === false && strpos($link_rel, 'spouse') === false && strpos($link_rel, 'kin') === false) echo ' checked="checked"'; 
     26                if ('friendship' == $class && strpos($link_rel, 'friend') === false && strpos($link_rel, 'acquaintance') === false && strpos($link_rel, 'contact') === false) echo ' checked="checked"'; 
     27                if ('geographical' == $class && strpos($link_rel, 'co-resident') === false && strpos($link_rel, 'neighbor') === false) echo ' checked="checked"'; 
    2828                if ('identity' == $class && in_array('me', $rels) ) echo ' checked="checked"'; 
    2929        } 
  • trunk/wp-admin/edit.php

    r900 r909  
    2222                if (0 != $i) 
    2323                        echo ', '; 
    24                 $draft->post_title = stripslashes($draft->post_title); 
     24                $draft->post_title = apply_filters('the_title', stripslashes($draft->post_title)); 
    2525                if ($draft->post_title == '') 
    2626                        $draft->post_title = sprintf(__('Post #%s'), $draft->ID); 
     
    2929                } 
    3030        ?> 
    31        .</p> 
     31.</p> 
    3232<?php } ?> 
    3333 
     
    3939                if (0 != $i) 
    4040                        echo ', '; 
    41                 $draft->post_title = stripslashes($draft->post_title); 
     41                $draft->post_title = apply_filters('the_title', stripslashes($draft->post_title)); 
    4242                if ($draft->post_title == '') 
    4343                        $draft->post_title = sprintf(__('Post #%s'), $draft->ID); 
     
    178178        case 'date': 
    179179                ?> 
    180                 <td><?php if ( '0000-00-00 00:00:00' ==$post->post_modified ) _e('Unpublished'); else the_time(_('Y-m-d \<\b\r \/\> g:i:s a')); ?></td> 
     180                <td><?php if ( '0000-00-00 00:00:00' ==$post->post_modified ) _e('Unpublished'); else the_time(__('Y-m-d \<\b\r \/\> g:i:s a')); ?></td> 
    181181                <?php 
    182182                break; 
  • trunk/wp-admin/import/blogger.php

    r904 r909  
    942942                        } else { 
    943943                                $endtag = $this->ns_to_prefix($name); 
    944                                 if(strstr($this->in_content[count($this->in_content)-1], "<$endtag")) { 
     944                                if (strpos($this->in_content[count($this->in_content)-1], '<' . $endtag) !== false) { 
    945945                                        array_push($this->in_content, "/>"); 
    946946                                } else { 
     
    970970                if(!empty($this->in_content)) { 
    971971                        // handle self-closing tags (case: text node found, need to close element started) 
    972                         if(strstr($this->in_content[count($this->in_content)-1], "<")) { 
     972                        if (strpos($this->in_content[count($this->in_content)-1], '<') !== false) { 
    973973                                array_push($this->in_content, ">"); 
    974974                        } 
  • trunk/wp-admin/link-add.php

    r829 r909  
    2929<div id="wp-link-bookmarklet"  class="wrap"> 
    3030<h3><?php _e('Add Link Bookmarklet'); ?></h3> 
    31 <p><?php _e('Right click on the following link and choose "Bookmark This Link..." to create an add link shortcut. Right now this only works on Mozilla or Netscape, but we&#8217;re working on it.'); ?></p> 
     31<p><?php _e('Right click on the following link and choose &#0147;Bookmark This Link...&#0148; or &#0147;Add to Favorites...&#0148; to create a Link This shortcut.'); ?></p> 
    3232<?php printf('<p><a href="%s" title="'.__('Link add bookmarklet').'">'.__('Link This').'</a></p>', "javascript:void(linkmanpopup=window.open('" . get_option('siteurl') . "/wp-admin/link-add.php?action=popup&amp;linkurl='+escape(location.href)+'&amp;name='+escape(document.title),'LinkManager','scrollbars=yes,width=750,height=550,left=15,top=15,status=yes,resizable=yes'));linkmanpopup.focus();window.focus();linkmanpopup.focus();") ?> 
    3333</div> 
  • trunk/wp-admin/menu.php

    r904 r909  
    77$menu[0] = array(__('Dashboard'), 'read', 'index.php'); 
    88 
    9 if ( strstr($_SERVER['REQUEST_URI'], 'edit-pages.php')
     9if (strpos($_SERVER['REQUEST_URI'], 'edit-pages.php') !== false
    1010        $menu[5] = array(__('Write'), 'edit_pages', 'page-new.php'); 
    1111else 
    1212        $menu[5] = array(__('Write'), 'edit_posts', 'post-new.php'); 
    13 if ( strstr($_SERVER['REQUEST_URI'], 'page-new.php')
     13if (strpos($_SERVER['REQUEST_URI'], 'page-new.php') !== false
    1414        $menu[10] = array(__('Manage'), 'edit_pages', 'edit-pages.php'); 
    1515else 
  • trunk/wp-admin/moderation.php

    r835 r909  
    122122        <p><strong><?php comment_author() ?></strong> <?php if ($comment->comment_author_email) { ?>| <?php comment_author_email_link() ?> <?php } if ($comment->comment_author_url && 'http://' != $comment->comment_author_url) { ?> | <?php comment_author_url_link() ?> <?php } ?>| <?php _e('IP:') ?> <a href="http://ws.arin.net/cgi-bin/whois.pl?queryinput=<?php comment_author_IP() ?>"><?php comment_author_IP() ?></a></p> 
    123123<?php comment_text() ?> 
    124 <p><?php comment_date('M j, g:i A'); ?> &#8212; [ <?php 
     124<p><?php comment_date(__('M j, g:i A')); ?> &#8212; [ <?php 
    125125echo '<a href="comment.php?action=editcomment&amp;c='.$comment->comment_ID.'">' . __('Edit') . '</a> | '; 
    126126echo " <a href=\"post.php?action=deletecomment&amp;p=".$comment->comment_post_ID."&amp;comment=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment', $comment->comment_ID, '" . js_escape(sprintf(__("You are about to delete this comment by '%s'.\n'Cancel' to stop, 'OK' to delete."), $comment->comment_author )) . "', theCommentList );\">" . __('Delete') . "</a> | "; ?> 
  • trunk/wp-admin/options-general.php

    r906 r909  
    4343$lang_files = glob( ABSPATH . WPINC . "/languages/*" ); 
    4444$lang = get_option( "WPLANG" ); 
    45 if( $lang == false ) { 
    46         $lang = get_site_option( "WPLANG" ); 
    47         add_option( "WPLANG", $lang ); 
    48 } 
    4945 
    50 if( is_array( $lang_files ) && count($lang_files) => 1 ) { 
     46if( is_array( $lang_files ) && count($lang_files) >= 1 ) { 
    5147        ?> 
    52                <tr valign="top">  
    53                <th width="33%" scope="row"><?php _e('Language:') ?></th>  
    54                <td><select name="WPLANG" id="WPLANG"> 
    55                <?php 
    56                echo "<option value=''>Default</option>"; 
     48        <tr valign="top">  
     49        <th width="33%" scope="row"><?php _e('Language:') ?></th>  
     50        <td><select name="WPLANG" id="WPLANG"> 
     51        <?php 
     52        echo "<option value=''>Default</option>"; 
    5753        while( list( $key, $val ) = each( $lang_files ) ) {  
    5854                $l = basename( $val, ".mo" ); 
  • trunk/wp-admin/options-misc.php

    r828 r909  
    3838 
    3939<p><input name="use_linksupdate" type="checkbox" id="use_linksupdate" value="1" <?php checked('1', get_option('use_linksupdate')); ?> /> 
    40 <label for="use_linksupdate"><?php _e('Track Bookmarks&#8217; Update Times') ?></label></p> 
     40<label for="use_linksupdate"><?php _e('Track Links&#8217; Update Times') ?></label></p> 
    4141<p> 
    4242<label><input type="checkbox" name="hack_file" value="1" <?php checked('1', get_option('hack_file')); ?> /> <?php _e('Use legacy <code>my-hacks.php</code> file support') ?></label> 
  • trunk/wp-admin/options-writing.php

    r810 r909  
    4242</tr> 
    4343<tr valign="top"> 
    44 <th scope="row"><?php _e('Default bookmark category:') ?></th> 
     44<th scope="row"><?php _e('Default link category:') ?></th> 
    4545<td><select name="default_link_category" id="default_link_category"> 
    4646<?php 
  • trunk/wp-admin/options.php

    r904 r909  
    168168<td>"; 
    169169 
    170         if (stristr($value, "\n")) echo "<textarea class='$class' name='$option->option_name' id='$option->option_name' cols='30' rows='5'>$value</textarea>"; 
     170        if (strpos($value, "\n") !== false) echo "<textarea class='$class' name='$option->option_name' id='$option->option_name' cols='30' rows='5'>$value</textarea>"; 
    171171        else echo "<input class='$class' type='text' name='$option->option_name' id='$option->option_name' size='30' value='" . $value . "'$disabled />"; 
    172172 
  • trunk/wp-admin/page.php

    r904 r909  
    150150 
    151151        $sendback = wp_get_referer(); 
    152         if (strstr($sendback, 'page.php')) $sendback = get_option('siteurl') .'/wp-admin/page.php'; 
    153         elseif (strstr($sendback, 'attachments.php')) $sendback = get_option('siteurl') .'/wp-admin/attachments.php'; 
     152        if (strpos($sendback, 'page.php') !== false) $sendback = get_option('siteurl') .'/wp-admin/page.php'; 
     153        elseif (strpos($sendback, 'attachments.php') !== false) $sendback = get_option('siteurl') .'/wp-admin/attachments.php'; 
    154154        $sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback); 
    155155        wp_redirect($sendback); 
  • trunk/wp-admin/plugins.php

    r868 r909  
    124124                if ( $style != '' ) 
    125125                        $style = 'class="' . $style . '"'; 
    126                 if ( is_writable(ABSPATH . 'wp-content/plugins/' . $plugin_file) ) 
     126                if ( is_writable(ABSPATH . PLUGINDIR . '/' . $plugin_file) ) 
    127127                        $edit = "<a href='plugin-editor.php?file=$plugin_file' title='".__('Open this file in the Plugin Editor')."' class='edit'>".__('Edit')."</a>"; 
    128128                else 
  • trunk/wp-admin/post.php

    r904 r909  
    161161 
    162162        $sendback = wp_get_referer(); 
    163         if (strstr($sendback, 'post.php')) $sendback = get_option('siteurl') .'/wp-admin/post-new.php'; 
    164         elseif (strstr($sendback, 'attachments.php')) $sendback = get_option('siteurl') .'/wp-admin/attachments.php'; 
     163        if (strpos($sendback, 'post.php') !== false) $sendback = get_option('siteurl') .'/wp-admin/post-new.php'; 
     164        elseif (strpos($sendback, 'attachments.php') !== false) $sendback = get_option('siteurl') .'/wp-admin/attachments.php'; 
    165165        $sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback); 
    166166        wp_redirect($sendback); 
  • trunk/wp-admin/setup-config.php

    r810 r909  
    159159                switch (substr($line,0,16)) { 
    160160                        case "define('DB_NAME'": 
    161                                 fwrite($handle, str_replace("wordpress", $dbname, $line)); 
     161                                fwrite($handle, str_replace("putyourdbnamehere", $dbname, $line)); 
    162162                                break; 
    163163                        case "define('DB_USER'": 
    164                                 fwrite($handle, str_replace("'username'", "'$uname'", $line)); 
     164                                fwrite($handle, str_replace("'usernamehere'", "'$uname'", $line)); 
    165165                                break; 
    166166                        case "define('DB_PASSW": 
    167                                 fwrite($handle, str_replace("'password'", "'$passwrd'", $line)); 
     167                                fwrite($handle, str_replace("'yourpasswordhere'", "'$passwrd'", $line)); 
    168168                                break; 
    169169                        case "define('DB_HOST'": 
  • trunk/wp-admin/templates.php

    r829 r909  
    5454                wp_die('<p>'.__('You do not have sufficient permissions to edit templates for this blog.').'</p>'); 
    5555 
    56         if ( strstr( $file, 'wp-config.php' )
     56        if (strpos($file, 'wp-config.php') !== false
    5757        wp_die('<p>'.__('The config file cannot be edited or viewed through the web interface. Sorry!').'</p>'); 
    5858 
  • trunk/wp-admin/themes.php

    r810 r909  
    6262<div id="message1" class="updated fade"><p><?php _e('The active theme is broken.  Reverting to the default theme.'); ?></p></div> 
    6363<?php elseif ( isset($_GET['activated']) ) : ?> 
    64 <div id="message2" class="updated fade"><p><?php printf(__('New theme activated. <a href="%s">View site &raquo;</a>'), get_bloginfo('home') . '/'); ?></p></div> 
     64<div id="message2" class="updated fade"><p><?php printf(__('New theme activated. <a href="%s">View site &raquo;</a>'), get_bloginfo('url') . '/'); ?></p></div> 
    6565<?php endif; ?> 
    6666 
     
    7070<div id="currenttheme"> 
    7171<?php if ( $ct->screenshot ) : ?> 
    72 <img src="../<?php echo $ct->stylesheet_dir . '/' . $ct->screenshot; ?>" alt="<?php _e('Current theme preview'); ?>" /> 
     72<img src="<?php echo get_option('siteurl') . '/' . $ct->stylesheet_dir . '/' . $ct->screenshot; ?>" alt="<?php _e('Current theme preview'); ?>" /> 
    7373<?php endif; ?> 
    74 <h3><?php printf(__('%1$s %2$s by %3$s'), $ct->title, '', $ct->author) ; ?></h3> 
     74<h3><?php printf(__('%1$s %2$s by %3$s'), $ct->title, $ct->version, $ct->author) ; ?></h3> 
    7575<p><?php echo $ct->description; ?></p> 
    7676</div> 
     
    9999?> 
    100100<div class="available-theme"> 
    101 <h3><a href="<?php echo $activate_link; ?>"><?php echo "$title"; ?></a></h3> 
     101<h3><a href="<?php echo $activate_link; ?>"><?php echo "$title $version"; ?></a></h3> 
    102102 
    103103<a href="<?php echo $activate_link; ?>" class="screenshot"> 
    104104<?php if ( $screenshot ) : ?> 
    105 <img src="../<?php echo $stylesheet_dir . '/' . $screenshot; ?>" alt="" /> 
     105<img src="<?php echo get_option('siteurl') . '/' . $stylesheet_dir . '/' . $screenshot; ?>" alt="" /> 
    106106<?php endif; ?> 
    107107</a> 
  • trunk/wp-admin/upgrade-functions.php

    r854 r909  
    452452                $categories = $wpdb->get_col("SELECT cat_ID FROM $wpdb->categories"); 
    453453                foreach ( $categories as $cat_id ) { 
    454                         $count = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->post2cat, $wpdb->posts WHERE $wpdb->posts.ID=$wpdb->post2cat.post_id AND post_type='post' AND post_status='publish' AND category_id = '$cat_id'"); 
     454                        $count = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->post2cat, $wpdb->posts WHERE $wpdb->posts.ID=$wpdb->post2cat.post_id AND post_status='publish' AND category_id = '$cat_id'"); 
    455455                        $wpdb->query("UPDATE $wpdb->categories SET category_count = '$count' WHERE cat_ID = '$cat_id'"); 
    456456                } 
     
    932932                if ($oldfile == 'index.php') { // Check to make sure it's not a new index 
    933933                        $index = implode('', file("$oldpath/$oldfile")); 
    934                         if ( strstr( $index, 'WP_USE_THEMES' ) ) { 
     934                        if (strpos($index, 'WP_USE_THEMES') !== false) { 
    935935                                if (! @copy(ABSPATH . 'wp-content/themes/default/index.php', "$site_dir/$newfile")) 
    936936                                        return false; 
     
    10041004 
    10051005                foreach ($stylelines as $line) { 
    1006                         if (strstr($line, "Theme Name:")) $line = "Theme Name: $theme_name"
    1007                         elseif (strstr($line, "Theme URI:")) $line = "Theme URI: " . __get_option('siteurl'); 
    1008                         elseif (strstr($line, "Description:")) $line = "Description: Your theme"
    1009                         elseif (strstr($line, "Version:")) $line = "Version: 1"
    1010                         elseif (strstr($line, "Author:")) $line = "Author: You"
    1011                         fwrite($f, "{$line}\n"); 
     1006                        if (strpos($line, 'Theme Name:') !== false) $line = 'Theme Name: ' . $theme_name
     1007                        elseif (strpos($line, 'Theme URI:') !== false) $line = 'Theme URI: ' . __get_option('url'); 
     1008                        elseif (strpos($line, 'Description:') !== false) $line = 'Description: Your theme.'
     1009                        elseif (strpos($line, 'Version:') !== false) $line = 'Version: 1'
     1010                        elseif (strpos($line, 'Author:') !== false) $line = 'Author: You'
     1011                        fwrite($f, $line . "\n"); 
    10121012                } 
    10131013                fclose($f); 
  • trunk/wp-admin/upload-functions.php

    r904 r909  
    1919                $post_title = attribute_escape(ob_get_contents()); 
    2020        ob_end_clean(); 
    21         $post_content = apply_filters( 'content_edit_pre', $post->post_content ); 
     21        $post_content = attribute_escape(apply_filters( 'content_edit_pre', $post->post_content )); 
    2222 
    2323        $class = 'text'; 
  • trunk/wp-blog-header.php

    r591 r909  
    33if (! isset($wp_did_header)): 
    44if ( !file_exists( dirname(__FILE__) . '/wp-config.php') ) { 
    5         if ( strstr( $_SERVER['PHP_SELF'], 'wp-admin') ) $path = ''; 
     5        if (strpos($_SERVER['PHP_SELF'], 'wp-admin') !== false) $path = ''; 
    66        else $path = 'wp-admin/'; 
    77        include( "index-install.php" ); // install WPMU! 
  • trunk/wp-config-sample.php

    r882 r909  
    1313if( $base == 'BASE' ) 
    1414        die( 'Problem in wp-config.php - $base is set to BASE when it should be the path like "/" or "/blogs/"! Please fix it!' ); 
    15  
    16 // Change the prefix if you want to have multiple blogs in a single database. 
    17 $table_prefix  = 'wp_';   // example: 'wp_' or 'b2' or 'mylogin_' 
     15// You can have multiple installations in one database if you give each a unique prefix 
     16$table_prefix  = 'wp_';   // Only numbers, letters, and underscores please! 
    1817 
    1918// Change this to localize WordPress.  A corresponding MO file for the 
  • trunk/wp-content/themes/default/functions.php

    r761 r909  
    2626 
    2727function kubrick_upper_color() { 
    28         if ( strstr( $url = kubrick_header_image_url(), 'header-img.php?' ) ) { 
     28        if (strpos($url = kubrick_header_image_url(), 'header-img.php?') !== false) { 
    2929                parse_str(substr($url, strpos($url, '?') + 1), $q); 
    3030                return $q['upper']; 
     
    3434 
    3535function kubrick_lower_color() { 
    36         if ( strstr( $url = kubrick_header_image_url(), 'header-img.php?' ) ) { 
     36        if (strpos($url = kubrick_header_image_url(), 'header-img.php?') !== false) { 
    3737                parse_str(substr($url, strpos($url, '?') + 1), $q); 
    3838                return $q['lower']; 
  • trunk/wp-content/themes/default/searchform.php

    r734 r909  
    1 <form method="get" id="searchform" action="<?php bloginfo('home'); ?>/"> 
     1<form method="get" id="searchform" action="<?php bloginfo('url'); ?>/"> 
    22<div><input type="text" value="<?php the_search_query(); ?>" name="s" id="s" /> 
    33<input type="submit" id="searchsubmit" value="Search" /> 
  • trunk/wp-content/themes/default/sidebar.php

    r835 r909  
    2626 
    2727                        <?php /* If this is a yearly archive */ } elseif (is_day()) { ?> 
    28                         <p>You are currently browsing the <a href="<?php bloginfo('home'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives 
     28                        <p>You are currently browsing the <a href="<?php bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives 
    2929                        for the day <?php the_time('l, F jS, Y'); ?>.</p> 
    3030 
    3131                        <?php /* If this is a monthly archive */ } elseif (is_month()) { ?> 
    32                         <p>You are currently browsing the <a href="<?php bloginfo('home'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives 
     32                        <p>You are currently browsing the <a href="<?php bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives 
    3333                        for <?php the_time('F, Y'); ?>.</p> 
    3434 
    3535                        <?php /* If this is a yearly archive */ } elseif (is_year()) { ?> 
    36                         <p>You are currently browsing the <a href="<?php bloginfo('home'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives 
     36                        <p>You are currently browsing the <a href="<?php bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives 
    3737                        for the year <?php the_time('Y'); ?>.</p> 
    3838 
    3939                        <?php /* If this is a monthly archive */ } elseif (is_search()) { ?> 
    40                         <p>You have searched the <a href="<?php echo bloginfo('home'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives 
     40                        <p>You have searched the <a href="<?php echo bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives 
    4141                        for <strong>'<?php the_search_query(); ?>'</strong>. If you are unable to find anything in these search results, you can try one of these links.</p> 
    4242 
    4343                        <?php /* If this is a monthly archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?> 
    44                         <p>You are currently browsing the <a href="<?php echo bloginfo('home'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives.</p> 
     44                        <p>You are currently browsing the <a href="<?php echo bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives.</p> 
    4545 
    4646                        <?php } ?> 
  • trunk/wp-includes/bookmark-template.php

    r904 r909  
    327327        $output = ''; 
    328328 
    329         if ( is_array($class) ) 
    330                 $class = trim(join(' ', $class)); 
    331  
    332329        if ( $categorize ) { 
    333330                //Split the bookmarks into ul's for each category 
     
    335332 
    336333                foreach ( (array) $cats as $cat ) { 
    337                         $bookmarks = get_bookmarks("limit=$limit&category={$cat->cat_ID}&show_updated=$show_updated&orderby=$orderby&order=$order&hide_invisible=$hide_invisible&show_updated=$show_updated"); 
     334                        $params = array_merge($r, array('category'=>$cat->cat_ID)); 
     335                        $bookmarks = get_bookmarks($params); 
    338336                        if ( empty($bookmarks) ) 
    339337                                continue; 
     
    345343        } else { 
    346344                //output one single list using title_li for the title 
    347                 $bookmarks = get_bookmarks("limit=$limit&category=$category&show_updated=$show_updated&orderby=$orderby&order=$order&hide_invisible=$hide_invisible&show_updated=$show_updated"); 
     345                $bookm