Changeset 909
- Timestamp:
- 03/09/07 15:17:25 (2 years ago)
- Files:
-
- trunk/app.php (modified) (2 diffs)
- trunk/wp-admin/admin-functions.php (modified) (6 diffs)
- trunk/wp-admin/admin-header.php (modified) (1 diff)
- trunk/wp-admin/cat.js (added)
- trunk/wp-admin/custom-header.php (modified) (3 diffs)
- trunk/wp-admin/dbx-admin-key.js (added)
- trunk/wp-admin/edit-comments.php (modified) (7 diffs)
- trunk/wp-admin/edit-form-advanced.php (modified) (1 diff)
- trunk/wp-admin/edit-link-form.php (modified) (1 diff)
- trunk/wp-admin/edit.php (modified) (4 diffs)
- trunk/wp-admin/import/blogger.php (modified) (2 diffs)
- trunk/wp-admin/link-add.php (modified) (1 diff)
- trunk/wp-admin/menu.php (modified) (1 diff)
- trunk/wp-admin/moderation.php (modified) (1 diff)
- trunk/wp-admin/options-general.php (modified) (1 diff)
- trunk/wp-admin/options-misc.php (modified) (1 diff)
- trunk/wp-admin/options-writing.php (modified) (1 diff)
- trunk/wp-admin/options.php (modified) (1 diff)
- trunk/wp-admin/page.php (modified) (1 diff)
- trunk/wp-admin/plugins.php (modified) (1 diff)
- trunk/wp-admin/post.php (modified) (1 diff)
- trunk/wp-admin/setup-config.php (modified) (1 diff)
- trunk/wp-admin/templates.php (modified) (1 diff)
- trunk/wp-admin/themes.php (modified) (3 diffs)
- trunk/wp-admin/upgrade-functions.php (modified) (3 diffs)
- trunk/wp-admin/upload-functions.php (modified) (1 diff)
- trunk/wp-admin/upload.js (added)
- trunk/wp-blog-header.php (modified) (1 diff)
- trunk/wp-config-sample.php (modified) (1 diff)
- trunk/wp-content/themes/default/functions.php (modified) (2 diffs)
- trunk/wp-content/themes/default/searchform.php (modified) (1 diff)
- trunk/wp-content/themes/default/sidebar.php (modified) (1 diff)
- trunk/wp-includes/bookmark-template.php (modified) (3 diffs)
- trunk/wp-includes/classes.php (modified) (4 diffs)
- trunk/wp-includes/comment-template.php (modified) (1 diff)
- trunk/wp-includes/cron.php (modified) (1 diff)
- trunk/wp-includes/feed.php (modified) (1 diff)
- trunk/wp-includes/formatting.php (modified) (4 diffs)
- trunk/wp-includes/functions.php (modified) (7 diffs)
- trunk/wp-includes/general-template.php (modified) (13 diffs)
- trunk/wp-includes/js/autosave.js (added)
- trunk/wp-includes/js/jquery/jquery.form.js (added)
- trunk/wp-includes/js/jquery/jquery.js (modified) (1 diff)
- trunk/wp-includes/js/list-manipulation.js (added)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyGoogleSpell.class.php (modified) (3 diffs)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspellShell.class.php (modified) (7 diffs)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/config.php (modified) (2 diffs)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/css/content.css (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/css/spellchecker.css (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/editor_plugin.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/langs/en.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/tinyspell.php (modified) (5 diffs)
- trunk/wp-includes/js/tinymce/plugins/wordpress/wordpress.css (modified) (1 diff)
- trunk/wp-includes/js/tinymce/wp-mce-help.php (modified) (1 diff)
- trunk/wp-includes/js/wp-ajax.js (added)
- trunk/wp-includes/link-template.php (modified) (2 diffs)
- trunk/wp-includes/pluggable.php (modified) (1 diff)
- trunk/wp-includes/post.php (modified) (1 diff)
- trunk/wp-includes/query.php (modified) (24 diffs)
- trunk/wp-includes/rewrite.php (modified) (2 diffs)
- trunk/wp-includes/rss.php (modified) (2 diffs)
- trunk/wp-includes/script-loader.php (modified) (9 diffs)
- trunk/wp-includes/theme.php (modified) (2 diffs)
- trunk/wp-includes/vars.php (modified) (1 diff)
- trunk/wp-includes/wp-db.php (modified) (1 diff)
- trunk/wp-login.php (modified) (5 diffs)
- trunk/wp-settings.php (modified) (3 diffs)
- trunk/xmlrpc.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/app.php
r904 r909 193 193 } else { 194 194 $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) { 196 196 array_push($this->in_content, "/>"); 197 197 } else { … … 221 221 if(!empty($this->in_content)) { 222 222 // 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) { 224 224 array_push($this->in_content, ">"); 225 225 } trunk/wp-admin/admin-functions.php
r904 r909 1157 1157 $state = true; 1158 1158 foreach ( $markerdata as $n => $markerline ) { 1159 if ( strstr( $markerline, "# BEGIN {$marker}" ))1159 if (strpos($markerline, '# BEGIN ' . $marker) !== false) 1160 1160 $state = false; 1161 1161 if ( $state ) { … … 1165 1165 fwrite( $f, "{$markerline}" ); 1166 1166 } 1167 if ( strstr( $markerline, "# END {$marker}" )) {1167 if (strpos($markerline, '# END ' . $marker) !== false) { 1168 1168 fwrite( $f, "# BEGIN {$marker}\n" ); 1169 1169 if ( is_array( $insertion )) … … 1203 1203 $state = false; 1204 1204 foreach ( $markerdata as $markerline ) { 1205 if ( strstr( $markerline, "# END {$marker}" ))1205 if (strpos($markerline, '# END ' . $marker) !== false) 1206 1206 $state = false; 1207 1207 if ( $state ) 1208 1208 $result[] = $markerline; 1209 if ( strstr( $markerline, "# BEGIN {$marker}" ))1209 if (strpos($markerline, '# BEGIN ' . $marker) !== false) 1210 1210 $state = true; 1211 1211 } … … 1557 1557 function add_theme_page( $page_title, $menu_title, $access_level, $file, $function = '' ) { 1558 1558 return add_submenu_page( 'themes.php', $page_title, $menu_title, $access_level, $file, $function ); 1559 } 1560 1561 function 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 ); 1559 1567 } 1560 1568 … … 1772 1780 '; 1773 1781 } 1774 if ( strstr( $_SERVER['HTTP_USER_AGENT'], 'MSIE' )) 1782 1783 if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) 1775 1784 add_action( 'admin_footer', 'browse_happy' ); 1776 1785 … … 1933 1942 $size = strtolower( ini_get( 'upload_max_filesize' ) ); 1934 1943 $bytes = 0; 1935 if ( strstr( $size, 'k' ))1944 if (strpos($size, 'k') !== false) 1936 1945 $bytes = $size * 1024; 1937 if ( strstr( $size, 'm' ))1946 if (strpos($size, 'm') !== false) 1938 1947 $bytes = $size * 1024 * 1024; 1939 if ( strstr( $size, 'g' ))1948 if (strpos($size, 'g') !== false) 1940 1949 $bytes = $size * 1024 * 1024 * 1024; 1941 1950 ?> 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) ?>"> 1943 1952 <p> 1944 1953 <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 45 45 <body> 46 46 <div id="wphead"> 47 <h1><?php echo wptexturize(get_ option(('blogname'))); ?> <span>(<a href="<?php echo get_option('home') . '/'; ?>"><?php _e('View site »') ?></a>)</span></h1>47 <h1><?php echo wptexturize(get_bloginfo(('name'))); ?> <span>(<a href="<?php echo get_option('home') . '/'; ?>"><?php _e('View site »') ?></a>)</span></h1> 48 48 </div> 49 49 <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 175 175 <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> 176 176 177 <form enctype="multipart/form-data" id="uploadForm" method="POST" action="<?php echo a dd_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%;"> 178 178 <label for="upload"><?php _e('Choose an image from your computer:'); ?></label><br /><input type="file" id="upload" name="import" /> 179 179 <input type="hidden" name="action" value="save" /> … … 189 189 <h2><?php _e('Reset Header Image and Color'); ?></h2> 190 190 <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 a dd_query_arg('step', 1) ?>">191 <form method="post" action="<?php echo attribute_escape(add_query_arg('step', 1)) ?>"> 192 192 <input type="submit" name="resetheader" value="<?php _e('Restore Original Header'); ?>" /> 193 193 </form> … … 241 241 <div class="wrap"> 242 242 243 <form method="POST" action="<?php echo a dd_query_arg('step', 3) ?>">243 <form method="POST" action="<?php echo attribute_escape(add_query_arg('step', 3)) ?>"> 244 244 245 245 <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 102 102 if ( 1 < $page ) { 103 103 $args['apage'] = ( 1 == $page - 1 ) ? FALSE : $page - 1; 104 $r .= '<a class="prev" href="' . a dd_query_arg( $args) . '">« '. __('Previous Page') .'</a>' . "\n";104 $r .= '<a class="prev" href="' . attribute_escape(add_query_arg( $args )) . '">« '. __('Previous Page') .'</a>' . "\n"; 105 105 } 106 106 if ( ( $total_pages = ceil( $total / 20 ) ) > 1 ) { … … 112 112 if ( $page_num < 3 || ( $page_num >= $page - 3 && $page_num <= $page + 3 ) || $page_num > $total_pages - 3 ) : 113 113 $args['apage'] = ( 1 == $page_num ) ? FALSE : $page_num; 114 $r .= '<a class="page-numbers" href="' . a dd_query_arg($args) . '">' . ( $page_num ) . "</a>\n";114 $r .= '<a class="page-numbers" href="' . attribute_escape(add_query_arg($args)) . '">' . ( $page_num ) . "</a>\n"; 115 115 $in = true; 116 116 elseif ( $in == true ) : … … 123 123 if ( ( $page ) * 20 < $total || -1 == $total ) { 124 124 $args['apage'] = $page + 1; 125 $r .= '<a class="next" href="' . a dd_query_arg($args) . '">'. __('Next Page') .' »</a>' . "\n";125 $r .= '<a class="next" href="' . attribute_escape(add_query_arg($args)) . '">'. __('Next Page') .' »</a>' . "\n"; 126 126 } 127 127 echo "<p class='pagenav'>$r</p>"; … … 154 154 <?php comment_text() ?> 155 155 156 <p><?php comment_date( 'M j, g:i A'); ?> — [156 <p><?php comment_date(__('M j, g:i A')); ?> — [ 157 157 <?php 158 158 if ( current_user_can('edit_post', $comment->comment_post_ID) ) { … … 249 249 if ( 1 < $page ) { 250 250 $args['apage'] = ( 1 == $page - 1 ) ? FALSE : $page - 1; 251 $r .= '<a class="prev" href="' . a dd_query_arg( $args) . '">« '. __('Previous Page') .'</a>' . "\n";251 $r .= '<a class="prev" href="' . attribute_escape(add_query_arg( $args )) . '">« '. __('Previous Page') .'</a>' . "\n"; 252 252 } 253 253 if ( ( $total_pages = ceil( $total / 20 ) ) > 1 ) { … … 259 259 if ( $page_num < 3 || ( $page_num >= $page - 3 && $page_num <= $page + 3 ) || $page_num > $total_pages - 3 ) : 260 260 $args['apage'] = ( 1 == $page_num ) ? FALSE : $page_num; 261 $r .= '<a class="page-numbers" href="' . a dd_query_arg($args) . '">' . ( $page_num ) . "</a>\n";261 $r .= '<a class="page-numbers" href="' . attribute_escape(add_query_arg($args)) . '">' . ( $page_num ) . "</a>\n"; 262 262 $in = true; 263 263 elseif ( $in == true ) : … … 270 270 if ( ( $page ) * 20 < $total || -1 == $total ) { 271 271 $args['apage'] = $page + 1; 272 $r .= '<a class="next" href="' . a dd_query_arg($args) . '">'. __('Next Page') .' »</a>' . "\n";272 $r .= '<a class="next" href="' . attribute_escape(add_query_arg($args)) . '">'. __('Next Page') .' »</a>' . "\n"; 273 273 } 274 274 echo "<p class='pagenav'>$r</p>"; trunk/wp-admin/edit-form-advanced.php
r865 r909 245 245 246 246 <?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;\""; ?> /> 248 248 <?php endif; ?> 249 249 trunk/wp-admin/edit-link-form.php
r860 r909 23 23 24 24 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"'; 28 28 if ('identity' == $class && in_array('me', $rels) ) echo ' checked="checked"'; 29 29 } trunk/wp-admin/edit.php
r900 r909 22 22 if (0 != $i) 23 23 echo ', '; 24 $draft->post_title = stripslashes($draft->post_title);24 $draft->post_title = apply_filters('the_title', stripslashes($draft->post_title)); 25 25 if ($draft->post_title == '') 26 26 $draft->post_title = sprintf(__('Post #%s'), $draft->ID); … … 29 29 } 30 30 ?> 31 .</p>31 .</p> 32 32 <?php } ?> 33 33 … … 39 39 if (0 != $i) 40 40 echo ', '; 41 $draft->post_title = stripslashes($draft->post_title);41 $draft->post_title = apply_filters('the_title', stripslashes($draft->post_title)); 42 42 if ($draft->post_title == '') 43 43 $draft->post_title = sprintf(__('Post #%s'), $draft->ID); … … 178 178 case 'date': 179 179 ?> 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> 181 181 <?php 182 182 break; trunk/wp-admin/import/blogger.php
r904 r909 942 942 } else { 943 943 $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) { 945 945 array_push($this->in_content, "/>"); 946 946 } else { … … 970 970 if(!empty($this->in_content)) { 971 971 // 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) { 973 973 array_push($this->in_content, ">"); 974 974 } trunk/wp-admin/link-add.php
r829 r909 29 29 <div id="wp-link-bookmarklet" class="wrap"> 30 30 <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’re working on it.'); ?></p>31 <p><?php _e('Right click on the following link and choose “Bookmark This Link...” or “Add to Favorites...” to create a Link This shortcut.'); ?></p> 32 32 <?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&linkurl='+escape(location.href)+'&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();") ?> 33 33 </div> trunk/wp-admin/menu.php
r904 r909 7 7 $menu[0] = array(__('Dashboard'), 'read', 'index.php'); 8 8 9 if ( strstr($_SERVER['REQUEST_URI'], 'edit-pages.php'))9 if (strpos($_SERVER['REQUEST_URI'], 'edit-pages.php') !== false) 10 10 $menu[5] = array(__('Write'), 'edit_pages', 'page-new.php'); 11 11 else 12 12 $menu[5] = array(__('Write'), 'edit_posts', 'post-new.php'); 13 if ( strstr($_SERVER['REQUEST_URI'], 'page-new.php'))13 if (strpos($_SERVER['REQUEST_URI'], 'page-new.php') !== false) 14 14 $menu[10] = array(__('Manage'), 'edit_pages', 'edit-pages.php'); 15 15 else trunk/wp-admin/moderation.php
r835 r909 122 122 <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> 123 123 <?php comment_text() ?> 124 <p><?php comment_date( 'M j, g:i A'); ?> — [ <?php124 <p><?php comment_date(__('M j, g:i A')); ?> — [ <?php 125 125 echo '<a href="comment.php?action=editcomment&c='.$comment->comment_ID.'">' . __('Edit') . '</a> | '; 126 126 echo " <a href=\"post.php?action=deletecomment&p=".$comment->comment_post_ID."&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 43 43 $lang_files = glob( ABSPATH . WPINC . "/languages/*" ); 44 44 $lang = get_option( "WPLANG" ); 45 if( $lang == false ) {46 $lang = get_site_option( "WPLANG" );47 add_option( "WPLANG", $lang );48 }49 45 50 if( is_array( $lang_files ) && count($lang_files) =>1 ) {46 if( is_array( $lang_files ) && count($lang_files) >= 1 ) { 51 47 ?> 52 <tr valign="top">53 <th width="33%" scope="row"><?php _e('Language:') ?></th>54 <td><select name="WPLANG" id="WPLANG">55 <?php56 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>"; 57 53 while( list( $key, $val ) = each( $lang_files ) ) { 58 54 $l = basename( $val, ".mo" ); trunk/wp-admin/options-misc.php
r828 r909 38 38 39 39 <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’ Update Times') ?></label></p>40 <label for="use_linksupdate"><?php _e('Track Links’ Update Times') ?></label></p> 41 41 <p> 42 42 <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 42 42 </tr> 43 43 <tr valign="top"> 44 <th scope="row"><?php _e('Default bookmark category:') ?></th>44 <th scope="row"><?php _e('Default link category:') ?></th> 45 45 <td><select name="default_link_category" id="default_link_category"> 46 46 <?php trunk/wp-admin/options.php
r904 r909 168 168 <td>"; 169 169 170 if (str istr($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>"; 171 171 else echo "<input class='$class' type='text' name='$option->option_name' id='$option->option_name' size='30' value='" . $value . "'$disabled />"; 172 172 trunk/wp-admin/page.php
r904 r909 150 150 151 151 $sendback = wp_get_referer(); 152 if (str str($sendback, 'page.php')) $sendback = get_option('siteurl') .'/wp-admin/page.php';153 elseif (str str($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'; 154 154 $sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback); 155 155 wp_redirect($sendback); trunk/wp-admin/plugins.php
r868 r909 124 124 if ( $style != '' ) 125 125 $style = 'class="' . $style . '"'; 126 if ( is_writable(ABSPATH . 'wp-content/plugins/' . $plugin_file) )126 if ( is_writable(ABSPATH . PLUGINDIR . '/' . $plugin_file) ) 127 127 $edit = "<a href='plugin-editor.php?file=$plugin_file' title='".__('Open this file in the Plugin Editor')."' class='edit'>".__('Edit')."</a>"; 128 128 else trunk/wp-admin/post.php
r904 r909 161 161 162 162 $sendback = wp_get_referer(); 163 if (str str($sendback, 'post.php')) $sendback = get_option('siteurl') .'/wp-admin/post-new.php';164 elseif (str str($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'; 165 165 $sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback); 166 166 wp_redirect($sendback); trunk/wp-admin/setup-config.php
r810 r909 159 159 switch (substr($line,0,16)) { 160 160 case "define('DB_NAME'": 161 fwrite($handle, str_replace(" wordpress", $dbname, $line));161 fwrite($handle, str_replace("putyourdbnamehere", $dbname, $line)); 162 162 break; 163 163 case "define('DB_USER'": 164 fwrite($handle, str_replace("'username '", "'$uname'", $line));164 fwrite($handle, str_replace("'usernamehere'", "'$uname'", $line)); 165 165 break; 166 166 case "define('DB_PASSW": 167 fwrite($handle, str_replace("' password'", "'$passwrd'", $line));167 fwrite($handle, str_replace("'yourpasswordhere'", "'$passwrd'", $line)); 168 168 break; 169 169 case "define('DB_HOST'": trunk/wp-admin/templates.php
r829 r909 54 54 wp_die('<p>'.__('You do not have sufficient permissions to edit templates for this blog.').'</p>'); 55 55 56 if ( strstr( $file, 'wp-config.php' ))56 if (strpos($file, 'wp-config.php') !== false) 57 57 wp_die('<p>'.__('The config file cannot be edited or viewed through the web interface. Sorry!').'</p>'); 58 58 trunk/wp-admin/themes.php
r810 r909 62 62 <div id="message1" class="updated fade"><p><?php _e('The active theme is broken. Reverting to the default theme.'); ?></p></div> 63 63 <?php elseif ( isset($_GET['activated']) ) : ?> 64 <div id="message2" class="updated fade"><p><?php printf(__('New theme activated. <a href="%s">View site »</a>'), get_bloginfo(' home') . '/'); ?></p></div>64 <div id="message2" class="updated fade"><p><?php printf(__('New theme activated. <a href="%s">View site »</a>'), get_bloginfo('url') . '/'); ?></p></div> 65 65 <?php endif; ?> 66 66 … … 70 70 <div id="currenttheme"> 71 71 <?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'); ?>" /> 73 73 <?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> 75 75 <p><?php echo $ct->description; ?></p> 76 76 </div> … … 99 99 ?> 100 100 <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> 102 102 103 103 <a href="<?php echo $activate_link; ?>" class="screenshot"> 104 104 <?php if ( $screenshot ) : ?> 105 <img src=" ../<?php echo$stylesheet_dir . '/' . $screenshot; ?>" alt="" />105 <img src="<?php echo get_option('siteurl') . '/' . $stylesheet_dir . '/' . $screenshot; ?>" alt="" /> 106 106 <?php endif; ?> 107 107 </a> trunk/wp-admin/upgrade-functions.php
r854 r909 452 452 $categories = $wpdb->get_col("SELECT cat_ID FROM $wpdb->categories"); 453 453 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'"); 455 455 $wpdb->query("UPDATE $wpdb->categories SET category_count = '$count' WHERE cat_ID = '$cat_id'"); 456 456 } … … 932 932 if ($oldfile == 'index.php') { // Check to make sure it's not a new index 933 933 $index = implode('', file("$oldpath/$oldfile")); 934 if ( strstr( $index, 'WP_USE_THEMES' )) {934 if (strpos($index, 'WP_USE_THEMES') !== false) { 935 935 if (! @copy(ABSPATH . 'wp-content/themes/default/index.php', "$site_dir/$newfile")) 936 936 return false; … … 1004 1004 1005 1005 foreach ($stylelines as $line) { 1006 if (str str($line, "Theme Name:")) $line = "Theme Name: $theme_name";1007 elseif (str str($line, "Theme URI:")) $line = "Theme URI: " . __get_option('siteurl');1008 elseif (str str($line, "Description:")) $line = "Description: Your theme";1009 elseif (str str($line, "Version:")) $line = "Version: 1";1010 elseif (str str($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"); 1012 1012 } 1013 1013 fclose($f); trunk/wp-admin/upload-functions.php
r904 r909 19 19 $post_title = attribute_escape(ob_get_contents()); 20 20 ob_end_clean(); 21 $post_content = a pply_filters( 'content_edit_pre', $post->post_content);21 $post_content = attribute_escape(apply_filters( 'content_edit_pre', $post->post_content )); 22 22 23 23 $class = 'text'; trunk/wp-blog-header.php
r591 r909 3 3 if (! isset($wp_did_header)): 4 4 if ( !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 = ''; 6 6 else $path = 'wp-admin/'; 7 7 include( "index-install.php" ); // install WPMU! trunk/wp-config-sample.php
r882 r909 13 13 if( $base == 'BASE' ) 14 14 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! 18 17 19 18 // Change this to localize WordPress. A corresponding MO file for the trunk/wp-content/themes/default/functions.php
r761 r909 26 26 27 27 function 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) { 29 29 parse_str(substr($url, strpos($url, '?') + 1), $q); 30 30 return $q['upper']; … … 34 34 35 35 function 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) { 37 37 parse_str(substr($url, strpos($url, '?') + 1), $q); 38 38 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'); ?>/"> 2 2 <div><input type="text" value="<?php the_search_query(); ?>" name="s" id="s" /> 3 3 <input type="submit" id="searchsubmit" value="Search" /> trunk/wp-content/themes/default/sidebar.php
r835 r909 26 26 27 27 <?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 archives28 <p>You are currently browsing the <a href="<?php bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives 29 29 for the day <?php the_time('l, F jS, Y'); ?>.</p> 30 30 31 31 <?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 archives32 <p>You are currently browsing the <a href="<?php bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives 33 33 for <?php the_time('F, Y'); ?>.</p> 34 34 35 35 <?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 archives36 <p>You are currently browsing the <a href="<?php bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives 37 37 for the year <?php the_time('Y'); ?>.</p> 38 38 39 39 <?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 archives40 <p>You have searched the <a href="<?php echo bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives 41 41 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> 42 42 43 43 <?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> 45 45 46 46 <?php } ?> trunk/wp-includes/bookmark-template.php
r904 r909 327 327 $output = ''; 328 328 329 if ( is_array($class) )330 $class = trim(join(' ', $class));331 332 329 if ( $categorize ) { 333 330 //Split the bookmarks into ul's for each category … … 335 332 336 333 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); 338 336 if ( empty($bookmarks) ) 339 337 continue; … … 345 343 } else { 346 344 //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
