Don't show box if there's nothing to show.

git-svn-id: http://svn.automattic.com/wordpress/trunk@2159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2005-01-27 22:24:07 +00:00
parent 264d9ac56f
commit 3d59d342d1
1 changed files with 5 additions and 2 deletions

View File

@ -4,7 +4,7 @@ require_once('admin.php');
$title = __('Moderate comments'); $title = __('Moderate comments');
$parent_file = 'edit.php'; $parent_file = 'edit.php';
$wpvarstoreset = array('action', 'item_ignored', 'item_deleted', 'item_approved', 'feelinglucky', 'ignored', 'deleted', 'approved'); $wpvarstoreset = array('action', 'item_ignored', 'item_deleted', 'item_approved', 'feelinglucky');
for ($i=0; $i<count($wpvarstoreset); $i += 1) { for ($i=0; $i<count($wpvarstoreset); $i += 1) {
$wpvar = $wpvarstoreset[$i]; $wpvar = $wpvarstoreset[$i];
if (!isset($$wpvar)) { if (!isset($$wpvar)) {
@ -74,8 +74,11 @@ default:
require_once('admin-header.php'); require_once('admin-header.php');
if ( isset($deleted) || isset($approved) || isset($ignored) ) { if ( isset($_GET['deleted']) || isset($_GET['approved']) || isset($_GET['ignored']) ) {
echo "<div class='updated'>\n<p>"; echo "<div class='updated'>\n<p>";
$_GET['approved'] = (int) $_GET['approved'];
$_GET['deleted'] = (int) $_GET['deleted'];
$_GET['ignored'] = (int) $_GET['ignored'];
if ($approved) { if ($approved) {
if ('1' == $approved) { if ('1' == $approved) {
echo __("1 comment approved <br />") . "\n"; echo __("1 comment approved <br />") . "\n";