WordPress.org

Make WordPress Core

Ticket #9789: don't.show.empty.div.for.more.files.patch

File don't.show.empty.div.for.more.files.patch, 2.3 KB (added by Simek, 6 years ago)
  • categories.php

     
    135135</h2> 
    136136 
    137137<?php 
    138 if ( isset($_GET['message']) && ( $msg = (int) $_GET['message'] ) ) : ?> 
     138if ( isset($_GET['message']) && ( $msg = (int) $_GET['message'] ) && $msg >= 1 && $msg <= 5 ) : ?> 
    139139<div id="message" class="updated fade"><p><?php echo $messages[$msg]; ?></p></div> 
    140140<?php $_SERVER['REQUEST_URI'] = remove_query_arg(array('message'), $_SERVER['REQUEST_URI']); 
    141141endif; ?> 
  • edit-link-categories.php

     
    6666        printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', wp_specialchars( stripslashes($_GET['s']) ) ); ?> 
    6767</h2> 
    6868 
    69 <?php if ( isset($_GET['message']) && ( $msg = (int) $_GET['message'] ) ) : ?> 
     69<?php if ( isset($_GET['message']) && ( $msg = (int) $_GET['message'] ) && $msg >= 1 && $msg <= 6 ) : ?> 
    7070<div id="message" class="updated fade"><p><?php echo $messages[$msg]; ?></p></div> 
    7171<?php $_SERVER['REQUEST_URI'] = remove_query_arg(array('message'), $_SERVER['REQUEST_URI']); 
    7272endif; ?> 
  • edit-tags.php

     
    151151        printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', wp_specialchars( stripslashes($_GET['s']) ) ); ?> 
    152152</h2> 
    153153 
    154 <?php if ( isset($_GET['message']) && ( $msg = (int) $_GET['message'] ) ) : ?> 
     154<?php if ( isset($_GET['message']) && ( $msg = (int) $_GET['message'] ) && $msg >= 1 && $msg <= 6 ) : ?> 
    155155<div id="message" class="updated fade"><p><?php echo $messages[$msg]; ?></p></div> 
    156156<?php $_SERVER['REQUEST_URI'] = remove_query_arg(array('message'), $_SERVER['REQUEST_URI']); 
    157157endif; ?> 
  • upload.php

     
    170170</h2> 
    171171 
    172172<?php 
    173 if ( isset($message) ) { ?> 
     173if ( isset($message) && $msg >= 1 && $msg <= 3 ) { ?> 
    174174<div id="message" class="updated fade"><p><?php echo $message; ?></p></div> 
    175175<?php 
    176176}