Make WordPress Core


Ignore:
Timestamp:
08/14/2008 05:00:37 PM (18 years ago)
Author:
ryan
Message:

Notice fixes. Props DD32. see #7509

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit.php

    r8484 r8646  
    5757    if ( isset($_GET['post_status']) && in_array( $_GET['post_status'], array_keys($post_stati) ) )
    5858        $post_status_label = $post_stati[$_GET['post_status']][1];
    59     if ( $post_listing_pageable && !is_archive() && !is_search() )
    60         $h2_noun = is_paged() ? sprintf(__( 'Previous %s' ), $post_status_label) : sprintf(__('Latest %s'), $post_status_label);
    61     else
     59    //if ( $post_listing_pageable && !is_archive() && !is_search() ) //Unreachable code: $post_listing_pageable is undefined, Similar code in upload.php
     60    //  $h2_noun = is_paged() ? sprintf(__( 'Previous %s' ), $post_status_label) : sprintf(__('Latest %s'), $post_status_label);
     61    //else
    6262        $h2_noun = $post_status_label;
    6363    // Use $_GET instead of is_ since they can override each other
    6464    $h2_author = '';
    65     $_GET['author'] = (int) $_GET['author'];
     65    $_GET['author'] = isset($_GET['author']) ? (int) $_GET['author'] : 0;
    6666    if ( $_GET['author'] != 0 ) {
    6767        if ( $_GET['author'] == '-' . $user_ID ) { // author exclusion
     
    9494    if ( empty( $num_posts->$status ) )
    9595        continue;
    96     if ( $status == $_GET['post_status'] )
     96    if ( isset($_GET['post_status']) && $status == $_GET['post_status'] )
    9797        $class = ' class="current"';
    9898
     
    147147$month_count = count($arc_result);
    148148
    149 if ( $month_count && !( 1 == $month_count && 0 == $arc_result[0]->mmonth ) ) { ?>
     149if ( $month_count && !( 1 == $month_count && 0 == $arc_result[0]->mmonth ) ) {
     150$m = isset($_GET['m']) ? (int)$_GET['m'] : 0;
     151?>
    150152<select name='m'>
    151 <option<?php selected( @$_GET['m'], 0 ); ?> value='0'><?php _e('Show all dates'); ?></option>
     153<option<?php selected( $m, 0 ); ?> value='0'><?php _e('Show all dates'); ?></option>
    152154<?php
    153155foreach ($arc_result as $arc_row) {
     
    156158    $arc_row->mmonth = zeroise( $arc_row->mmonth, 2 );
    157159
    158     if ( $arc_row->yyear . $arc_row->mmonth == $_GET['m'] )
     160    if ( $arc_row->yyear . $arc_row->mmonth == $m )
    159161        $default = ' selected="selected"';
    160162    else
Note: See TracChangeset for help on using the changeset viewer.