[wp-trac] Re: [WordPress Trac] #4548: De-spamming no spam causes
page header to not be loaded
WordPress Trac
wp-trac at lists.automattic.com
Tue Jul 3 19:44:38 GMT 2007
#4548: De-spamming no spam causes page header to not be loaded
----------------------------+-----------------------------------------------
Reporter: Podz | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.3 (trunk)
Component: Administration | Version: 2.3
Severity: normal | Resolution:
Keywords: |
----------------------------+-----------------------------------------------
Comment (by Otto42):
In the akismet_caught() function, this check is being performed:
{{{
if (isset($_POST['submit']) && 'recover' == $_POST['action'] && !
empty($_POST['not_spam']))
}}}
When you click the Not Spam button without anything checked, then the
first two items pass, but the !empty check fails, and so none of the
functionality in there takes effect, including the redirect. So you're
brought right back to the same main Akismet screen, but with noheader set
(thinking that a redirect was imminent), you don't get a header.
This can be corrected by adding this code just below the end of that if
statement (but before the delete action check):
{{{
if (isset($_POST['submit']) && 'recover' == $_POST['action'] &&
empty($_POST['not_spam'])) {
wp_redirect( $_SERVER['HTTP_REFERER'] );
}
}}}
--
Ticket URL: <http://trac.wordpress.org/ticket/4548#comment:5>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list