From ffd44371e20ca185d0f2728d9d7bc3335ea7fba5 Mon Sep 17 00:00:00 2001 From: westi Date: Fri, 5 Sep 2008 23:29:30 +0000 Subject: [PATCH] Fix Notice. Mark unreachable code as TODO. git-svn-id: http://svn.automattic.com/wordpress/trunk@8828 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit.php | 3 ++- wp-admin/upload.php | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/wp-admin/edit.php b/wp-admin/edit.php index ad48ebf3e..c602b54d5 100644 --- a/wp-admin/edit.php +++ b/wp-admin/edit.php @@ -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; diff --git a/wp-admin/upload.php b/wp-admin/upload.php index 0acdc3c72..7e24e3f9c 100644 --- a/wp-admin/upload.php +++ b/wp-admin/upload.php @@ -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 = '';