[wp-hackers] Mass edit

Rich Bowen rbowen at rcbowen.com
Thu Jul 8 00:12:58 UTC 2004


I discovered that the Mass Edit mode "doesn't work". Upon further
investigation, I discovered that it relies on "register_globals" being
set to "On". I consider "register_globals" to be evil and to be shunned.

So, here's a patch that gets around this requirement. Please consider
including it in future distributions. Thanks.

42c42,43
< if (!empty($delete_comments)) {
---
> 
> if (!empty($_POST['delete_comments'])) {
45,46c46,47
<       $del_comments = ''; $safe_delete_commeents = ''; $i = 0;
<       foreach ($delete_comments as $comment) { // Check the permissions on each
---
>       $i = 0;
>       foreach ($_POST['delete_comments'] as $comment) { // Check the permissions on each




Note that the patch also removes two unused and useless variables. 
I'm not sure what they are there for, so perhaps that portion of the patch
is inappropriate. But it didn't seem to break anything.

Comments welcome. Thanks.

See also http://drbacchus.com/wordpress/index.php?p=626

-- 
Nothing is perfect, certainly not me
Success to failure, just a matter of degrees
Working at perfect got me down on my knees
        (Working at perfekt - Geddy Lee)



More information about the hackers mailing list