Validation fixes from nbachiyski. fixes #5962

git-svn-id: http://svn.automattic.com/wordpress/trunk@6980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-02-22 17:30:43 +00:00
parent a93e4504f6
commit 90ef210610
15 changed files with 30 additions and 29 deletions

View File

@ -46,7 +46,7 @@ foreach($posts_columns as $column_name=>$column_display_name) {
case 'media':
?>
<td><strong><a href="# TODO: upload.php?action=edit&post=<?php the_ID(); ?>"><?php the_title(); ?></a></strong><br />
<td><strong><a href="# TODO: upload.php?action=edit&amp;post=<?php the_ID(); ?>"><?php the_title(); ?></a></strong><br />
<?php echo strtoupper(preg_replace('/^.*?\.(\w+)$/', '$1', $post->guid)); ?>
<?php do_action('manage_media_media_column', $post->ID); ?>
</td>
@ -85,7 +85,7 @@ foreach($posts_columns as $column_name=>$column_display_name) {
if ( empty($title) )
$title = __('(no title)');
?>
<td><strong><a href="post.php?action=edit&post=<?php echo $post->post_parent; ?>"><?php echo $title ?></a></strong></td>
<td><strong><a href="post.php?action=edit&amp;post=<?php echo $post->post_parent; ?>"><?php echo $title ?></a></strong></td>
<?php
break;

View File

@ -96,6 +96,7 @@ if ( $extra_comments ) : ?>
<input type="hidden" name="page" value="<?php echo $page; ?>" />
<input type="hidden" name="s" value="<?php echo attribute_escape(@$_GET['s']); ?>" />
<?php wp_nonce_field( 'add-comment', '_ajax_nonce', false ); ?>
</form>
</div>
<?php endif; // $extra_comments ?>

View File

@ -53,7 +53,7 @@ if ( isset($_GET['post_status']) && in_array( $_GET['post_status'], array_keys($
}
?>
<script>
<script type="text/javascript">
/* <![CDATA[ */
jQuery(function($){$('#the-list').wpList();});
/* ]]> */
@ -146,6 +146,7 @@ if ($posts) {
<?php
} else {
?>
</form>
<p><?php _e('No pages found.') ?></p>
<?php
} // end if ($posts)

View File

@ -68,7 +68,7 @@ foreach($posts_columns as $column_name=>$column_display_name) {
if ( empty($title) )
$title = __('(no title)');
?>
<td><strong><a href="post.php?action=edit&post=<?php the_ID(); ?>"><?php echo $title ?></a></strong>
<td><strong><a href="post.php?action=edit&amp;post=<?php the_ID(); ?>"><?php echo $title ?></a></strong>
<?php if ('private' == $post->post_status) _e(' &#8212; <strong>Private</strong>'); ?></td>
<?php
break;

View File

@ -145,7 +145,7 @@ function media_buttons() {
$uploading_iframe_ID = (int) (0 == $post_ID ? $temp_ID : $post_ID);
$multimedia_upload_iframe_src = "media-upload.php?type=multimedia&amp;post_id=$uploading_iframe_ID";
$multimedia_upload_iframe_src = apply_filters('multimedia_upload_iframe_src', $multimedia_upload_iframe_src);
echo "<a href='$multimedia_upload_iframe_src&TB_iframe=true&height=500&width=640' class='button thickbox'>" . __('Add media'). '</a>';
echo "<a href='$multimedia_upload_iframe_src&amp;TB_iframe=true&amp;height=500&amp;width=640' class='button thickbox'>" . __('Add media'). '</a>';
}
add_action( 'media_buttons', 'media_buttons' );

View File

@ -84,7 +84,7 @@ function link_cat_row( $category ) {
'<th scope="row" class="check-column"> <input type="checkbox" name="delete[]" value="' . $category->term_id . '" /></th>' .
"<td>$edit</td>
<td>$category->description</td>
<td align='center'>$count</td>";
<td align='center'>$count</td></tr>";
return apply_filters( 'link_cat_row', $output );
}
@ -236,7 +236,7 @@ function _tag_row( $tag, $class = '' ) {
$out .= '<tr id="tag-' . $tag->term_id . '"' . $class . '>';
$out .= '<th scope="row" class="check-column"> <input type="checkbox" name="delete_tags[]" value="' . $tag->term_id . '" /></th>';
$out .= '<td><a href="edit-tags.php?action=edit&amp;tag_ID=' . $tag->term_id . '">' .
apply_filters( 'term_name', $tag->name ) . '</td>';
apply_filters( 'term_name', $tag->name ) . '</a></td>';
$out .= "<td>$count</td>";
$out .= '</tr>';
@ -403,7 +403,7 @@ foreach ($posts_columns as $column_name=>$column_display_name) {
if ( empty($title) )
$title = __('(no title)');
?>
<td><strong><a href="page.php?action=edit&post=<?php the_ID(); ?>"><?php echo $pad; echo $title ?></a></strong>
<td><strong><a href="page.php?action=edit&amp;post=<?php the_ID(); ?>"><?php echo $pad; echo $title ?></a></strong>
<?php if ('private' == $page->post_status) _e(' &#8212; <strong>Private</strong>'); ?></td>
<?php
break;
@ -543,7 +543,7 @@ function user_row( $user_object, $style = '', $role = '' ) {
$short_url = substr( $short_url, 0, 32 ).'...';
$numposts = get_usernumposts( $user_object->ID );
if ( current_user_can( 'edit_user', $user_object->ID ) ) {
$edit = add_query_arg( 'wp_http_referer', urlencode( clean_url( stripslashes( $_SERVER['REQUEST_URI'] ) ) ), "user-edit.php?user_id=$user_object->ID" );
$edit = clean_url( add_query_arg( 'wp_http_referer', urlencode( clean_url( stripslashes( $_SERVER['REQUEST_URI'] ) ) ), "user-edit.php?user_id=$user_object->ID" ) );
$edit = "<a href=\"$edit\">$user_object->user_login</a>";
} else {
$edit = $user_object->user_login;
@ -616,15 +616,15 @@ function _wp_comment_list_item( $id, $alt = 0 ) {
<?php
if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
echo " <a href='comment.php?action=editcomment&amp;c=$id'>" . __('Edit') . '</a>';
$url = clean_url( wp_nonce_url( "comment.php?action=deletecomment&p=$comment->comment_post_ID&c=$id", "delete-comment_$id" ) );
$url = clean_url( wp_nonce_url( "comment.php?action=deletecomment&amp;p=$comment->comment_post_ID&amp;c=$id", "delete-comment_$id" ) );
echo " | <a href='$url' class='delete:the-comment-list:comment-$id'>" . __('Delete') . '</a> ';
if ( ('none' != $comment_status) && ( current_user_can('moderate_comments') ) ) {
$url = clean_url( wp_nonce_url( "comment.php?action=unapprovecomment&p=$comment->comment_post_ID&c=$id", "unapprove-comment_$id" ) );
$url = clean_url( wp_nonce_url( "comment.php?action=unapprovecomment&amp;p=$comment->comment_post_ID&amp;c=$id", "unapprove-comment_$id" ) );
echo "<span class='unapprove'> | <a href='$url' class='dim:the-comment-list:comment-$id:unapproved:FFFF33'>" . __('Unapprove') . '</a> </span>';
$url = clean_url( wp_nonce_url( "comment.php?action=approvecomment&p=$comment->comment_post_ID&c=$id", "approve-comment_$id" ) );
$url = clean_url( wp_nonce_url( "comment.php?action=approvecomment&amp;p=$comment->comment_post_ID&amp;c=$id", "approve-comment_$id" ) );
echo "<span class='approve'> | <a href='$url' class='dim:the-comment-list:comment-$id:unapproved:33FF33:33FF33'>" . __('Approve') . '</a> </span>';
}
$url = clean_url( wp_nonce_url( "comment.php?action=deletecomment&dt=spam&p=$comment->comment_post_ID&c=$id", "delete-comment_$id" ) );
$url = clean_url( wp_nonce_url( "comment.php?action=deletecomment&amp;dt=spam&amp;p=$comment->comment_post_ID&amp;c=$id", "delete-comment_$id" ) );
echo " | <a href='$url' class='delete:the-comment-list:comment-$id::spam=1'>" . __('Spam') . '</a> ';
}
if ( !is_single() ) {

View File

@ -124,7 +124,7 @@ function wp_list_widget_controls( $widgets, $edit_widget = -1 ) {
?>
<ul class="widget-control-list">
<li />
<?php
foreach ( $widgets as $key => $widget )
wp_widget_control( $key, $widget, $key == $edit_widget ? 'edit' : 'display' );
@ -170,7 +170,7 @@ function wp_widget_control( $key, $widget, $display = 'display' ) {
<?php else : ?>
<a class="widget-action widget-control-edit" href="<?php echo add_query_arg( array( 'edit' => $id_format, 'key' => $key ) ); ?>"><?php _e('Edit'); ?></a>
<a class="widget-action widget-control-edit" href="<?php echo clean_url( add_query_arg( array( 'edit' => $id_format, 'key' => $key ) ) ); ?>"><?php _e('Edit'); ?></a>
<?php endif; ?>
@ -196,7 +196,7 @@ function wp_widget_control( $key, $widget, $display = 'display' ) {
<?php endif; ?>
<a class="widget-action widget-control-remove delete alignright" href="<?php echo add_query_arg( array( 'remove' => $id_format, 'key' => $key ), wp_nonce_url( null, "remove-widget_$widget[id]" ) ); ?>"><?php _e('Remove'); ?></a>
<a class="widget-action widget-control-remove delete alignright" href="<?php echo clean_url( add_query_arg( array( 'remove' => $id_format, 'key' => $key ), wp_nonce_url( null, "remove-widget_$widget[id]" ) ) ); ?>"><?php _e('Remove'); ?></a>
<br class="clear" />
</div>
</div>

View File

@ -211,6 +211,10 @@ if ( $links ) {
?>
</tbody>
</table>
<?php } else { ?>
<p><?php _e('No links found.') ?></p>
<?php } ?>
</form>
<div id="ajax-response"></div>
@ -219,7 +223,6 @@ if ( $links ) {
<br style="clear:both;" />
</div>
<?php } ?>
</div>

View File

@ -171,9 +171,7 @@ $comments = array_slice( $comments, $start, $stop );
| <?php _e( 'IP:' ); ?> <a href="http://ws.arin.net/cgi-bin/whois.pl?queryinput=<?php comment_author_IP(); ?>"><?php comment_author_IP(); ?></a>
</p>
<p>
<?php comment_text(); ?>
</p>
<?php comment_text(); ?>
<p>
<?php comment_date( __( 'M j, g:i A' ) ); ?>
@ -237,4 +235,4 @@ $comments = array_slice( $comments, $start, $stop );
</script>
</form>
</div>
<?php include_once './admin-footer.php'; ?>
<?php include_once './admin-footer.php'; ?>

View File

@ -51,8 +51,7 @@ include('admin-header.php');
<br />
<label for="require_name_email"><input type="checkbox" name="require_name_email" id="require_name_email" value="1" <?php checked('1', get_option('require_name_email')); ?> /> <?php _e('Comment author must fill out name and e-mail') ?></label>
<br />
<label for="comment_whitelist"><input type="checkbox" name="comment_whitelist" id="comment_whitelist" value="1" <?php checked('1', get_option('comment_whitelist')); ?> /> <?php _e('Comment author must have a previously approved comment') ?></label></li>
</ul>
<label for="comment_whitelist"><input type="checkbox" name="comment_whitelist" id="comment_whitelist" value="1" <?php checked('1', get_option('comment_whitelist')); ?> /> <?php _e('Comment author must have a previously approved comment') ?></label>
</td>
</tr>
<tr valign="top">

View File

@ -130,7 +130,7 @@ $structures = array(
<table class="niceblue">
<tr>
<th><label><input name="selection" type="radio" value="" class="tog" <?php checked('', $permalink_structure); ?> /> <?php _e('Default'); ?></label></th>
<td><code><?php echo get_option('home'); ?>/?p=123</code></span></td>
<td><code><?php echo get_option('home'); ?>/?p=123</code></td>
</tr>
<tr>
<th><label><input name="selection" type="radio" value="<?php echo $structures[1]; ?>" class="tog" <?php checked($structures[1], $permalink_structure); ?> /> <?php _e('Date and name based'); ?></label></th>

View File

@ -76,7 +76,7 @@ endforeach;
<label for="medium_size_w"><?php _e('Width'); ?></label>
<input name="medium_size_w" type="text" id="medium_size_w" value="<?php form_option('medium_size_w'); ?>" size="6" />
<label for="medium_size_h"><?php _e('Height'); ?></label>
<input name="medium_size_h" type="text" id="thumbnail_size_h" value="<?php form_option('medium_size_h'); ?>" size="6" />
<input name="medium_size_h" type="text" id="medium_size_h" value="<?php form_option('medium_size_h'); ?>" size="6" />
</td>
</tr>
</table>
@ -128,7 +128,7 @@ endforeach;
<?php else : ?>
<p><?php printf(__('WordPress is not notifying any <a href="http://codex.wordpress.org/Update_Services">Update Services</a> because of your blog\'s <a href="%s">privacy settings</a>.'), 'options-privacy.php'); ?>
<p><?php printf(__('WordPress is not notifying any <a href="http://codex.wordpress.org/Update_Services">Update Services</a> because of your blog\'s <a href="%s">privacy settings</a>.'), 'options-privacy.php'); ?></p>
<?php endif; ?>

View File

@ -152,6 +152,7 @@ if (empty($plugins)) {
<?php
} // endif active/inactive plugin check
?>
</td>
</tr>
</table>

View File

@ -320,8 +320,6 @@ unset($role_links);
<p><a href="users.php"><?php _e('&laquo; Back to All Users'); ?></a></p>
<?php endif; ?>
<form action="" method="post" name="updateusers" id="updateusers">
<?php wp_nonce_field('bulk-users') ?>
<table class="widefat">
<tbody>
<tr class="thead">

View File

@ -181,7 +181,7 @@ if ( isset($_GET['message']) && isset($messages[$_GET['message']]) ) : ?>
<h2><?php _e( 'Widgets' ); ?></h2>
<p id="widget-search">
<input type="text" id="widget-search-input" name="s" value="<?php echo attribute_escape( $widget_search ); ?>" />
<input type="submit" class="button" value="<?php _e( 'Search Widgets' ); ?>" class="button" />
<input type="submit" class="button" value="<?php _e( 'Search Widgets' ); ?>" />
</p>
<div class="widget-liquid-left-holder">