[wp-hackers] Mass edit
Rich Bowen
rbowen at rcbowen.com
Thu Jul 8 00:44:31 UTC 2004
On Wed, 7 Jul 2004, Carthik Sharma wrote:
> In the original , there's
>
> 45,46c46,47
> < $del_comments = ''; $safe_delete_commeents = ''; $i = 0;
>
> maybe it is the spelling of comments (commeents) that is causing
> things to break :)
Nope. It's spelled that way in the distributed source. And the variable
is entirely unused anywhere. The problem that I'm experiencing is cause
entirely by the reliance on the 'register_globals' PHP variable.
>
> Carthik.
>
> On Wed, 7 Jul 2004 20:12:58 -0400 (EDT), Rich Bowen <rbowen at rcbowen.com> 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.
> >
> > 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)
> >
> > _______________________________________________
> > hackers mailing list
> > hackers at wordpress.org
> > http://wordpress.org/mailman/listinfo/hackers_wordpress.org
> >
>
>
>
--
Rich Bowen - rbowen at rcbowen.com
Did I have the dream, or did the dream have me? (Rush - Nocturne)
More information about the hackers
mailing list