[wp-hackers] Mass edit

Rich Bowen rbowen at rcbowen.com
Thu Jul 8 00:53:35 UTC 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, 7 Jul 2004, Rich Bowen wrote:

> 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.

Well, shoot. I suppose I should mention that this is a patch to
wp-admin/edit-comments.php

> 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
> 
> 

- -- 
I should have liked, I do confess, to have had the lightest
license of a child, and yet been man enough to know its value.
    Charles Dickens (A Christmas Carol, Stave Two) 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQFA7JsSXP03+sx4yJMRAvdZAJ9+hjZJf96FywAC48mVvAQ2QFh1rQCfSl0f
BxSgZPRgsnaEor4DOe6NlVc=
=PNqm
-----END PGP SIGNATURE-----




More information about the hackers mailing list