Skip to content

Commit

Permalink
Fixed PHP warning if approving/deleting/etc with no items selected.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Feb 1, 2003
1 parent d521c22 commit a9b1c68
Showing 1 changed file with 21 additions and 12 deletions.
33 changes: 21 additions & 12 deletions php_interface/queue.php
Expand Up @@ -432,7 +432,26 @@ function handle_news_queue_commands()
$iccnews_userqueue = $form_qid;
} // if

else if ( ($form_moveqid) and (isset($form_qid)) )
else if ($form_purgeall)
{
$err = get_connected($sock);
if ( ($err) || ($err = news_purgeall($sock)) )
{
echo "<font color=\"#FF0000\">failed to purge items.";
echo " $err</font><br>\n";
} // if
} // else if


// rest of these need at least one queue item selected...

if (!isset($itemid)) // nothing selected? Bail out.
{
news_logout($sock);
return;
}

if ( ($form_moveqid) and (isset($form_qid)) )
{
$err = get_connected($sock);

Expand All @@ -445,7 +464,7 @@ function handle_news_queue_commands()
echo " $err</font><br>\n";
} // if
} // foreach
} // else if
} // if

else if ($form_delete)
{
Expand Down Expand Up @@ -489,16 +508,6 @@ function handle_news_queue_commands()
} // for
} // else if

else if ($form_purgeall)
{
$err = get_connected($sock);
if ( ($err) || ($err = news_purgeall($sock)) )
{
echo "<font color=\"#FF0000\">failed to purge items.";
echo " $err</font><br>\n";
} // if
} // else if

else if ($form_approve)
{
$err = get_connected($sock);
Expand Down

0 comments on commit a9b1c68

Please sign in to comment.