Fix Notice. Mark unreachable code as TODO.

git-svn-id: http://svn.automattic.com/wordpress/trunk@8828 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2008-09-05 23:29:30 +00:00
parent 475c4eecaa
commit ffd44371e2
2 changed files with 6 additions and 4 deletions

View File

@ -79,7 +79,8 @@ if ( is_single() ) {
$post_status_label = _c('Posts|manage posts header');
if ( isset($_GET['post_status']) && in_array( $_GET['post_status'], array_keys($post_stati) ) )
$post_status_label = $post_stati[$_GET['post_status']][1];
//if ( $post_listing_pageable && !is_archive() && !is_search() ) //Unreachable code: $post_listing_pageable is undefined, Similar code in upload.php
//TODO: Unreachable code: $post_listing_pageable is undefined, Similar code in upload.php
//if ( $post_listing_pageable && !is_archive() && !is_search() )
// $h2_noun = is_paged() ? sprintf(__( 'Previous %s' ), $post_status_label) : sprintf(__('Latest %s'), $post_status_label);
//else
$h2_noun = $post_status_label;

View File

@ -73,9 +73,10 @@ if ( is_singular() ) {
$post_mime_type_label = _c('Media|manage media header');
if ( isset($_GET['post_mime_type']) && in_array( $_GET['post_mime_type'], array_keys($post_mime_types) ) )
$post_mime_type_label = $post_mime_types[$_GET['post_mime_type']][1];
if ( $post_listing_pageable && !is_archive() && !is_search() )
$h2_noun = is_paged() ? sprintf(__( 'Previous %s' ), $post_mime_type_label) : sprintf(__('Latest %s'), $post_mime_type_label);
else
//TODO: Unreachable code: $post_listing_pageable is undefined, Similar code in edit.php
//if ( $post_listing_pageable && !is_archive() && !is_search() )
// $h2_noun = is_paged() ? sprintf(__( 'Previous %s' ), $post_mime_type_label) : sprintf(__('Latest %s'), $post_mime_type_label);
//else
$h2_noun = $post_mime_type_label;
// Use $_GET instead of is_ since they can override each other
$h2_author = '';