Can't delete comments within "comments view" (G1.5.9)

mikr

Joined: 2008-11-14
Posts: 3
Posted: Fri, 2008-11-14 22:41

Hello,

I upgraded my gallery to version 1.5.9 recently (from 1.5.4 if it's).
Everything went fine, till I tried to delete some spam comments from albums, in the previous version I used "comments view" and distinguished which one is a spam...
My problem: When I check checkboxes on the right side and then press delete selected comments, nothing happens.
I tried to find out the solution, but the only topic I found was http://gallery.menalto.com/node/79698, which states that (sort of) this problem was solved (maybe something different).
I'm quite a newbie (my knowledge of English is much better than my knowledge of PHP :) ), but tried to solve the problem myself. Page reloads, but the code don't enter the if statement on the line 117 (view_comments.php)

if (!empty($submit) && $gallery->user->canWriteToAlbum($gallery->album) &&
    !empty($comment_index) &&
    !empty($index) && $comment_index[$index])

As I understood - the variable $index stores the index of the photo in the album, but $comment_index[$index] is never assigned, is it? So I removed the last clause from the condition ( "&& $comment_index[$index]") and it worked - comments get deleted. But I don't know, if it's ok? I deleted spams I needed and then switched back to original version. Any further help please? Did I miss something or ... ?
Thanks in advance.
------------------------------------------------------
Gallery version: 1.5.9 (2008-09-16)
Apache version: Apache/2.2.9
PHP version: 4.4.4-9+lenny1
Graphics Toolkit: ImageMagick
Operating system: Debian (sorry, I don't know more)

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Fri, 2008-11-14 22:49

Hi,

Can you try to reproduce the problem here: http://jems.de/gallery-1.5.10
user: mikr
pass: mikr123

You're admin, feel free to test.

Jens
--
Gallery Developer

 
mikr

Joined: 2008-11-14
Posts: 3
Posted: Fri, 2008-11-14 23:00

Yes, it behaves the same. I can only delete comments, which have same index as the photo in the album (when I select more comments and also the one with index same as photo index, then every selected comment gets deleted). Sorry for deleting some of (yours?) comments.

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Fri, 2008-11-14 23:05

Hm,

okay. So we need a fix.

Lets me rephrase and you tell me if i understood correct.

- Photoindex: 2
- 3 Comments
-- comment index 1, 2, 3 and 4

1.) Select comment with index 1 or 4
-- impossible to delete

2.) Select comment with index 2
-- possible to delete

3.) Select comment with index 2, 3
-- ALL comments (also with index 1 and 4) are deleted.

Is that correct?

Jens
--
Gallery Developer

 
mikr

Joined: 2008-11-14
Posts: 3
Posted: Fri, 2008-11-14 23:11

1.) yes
2.) yes
3.) only selected comments are deleted (2, 3 in your example)
Once again, sorry for my English.
mikr

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Fri, 2008-11-14 23:48

Okay.

so 1.) is the problem.
Everything else is correct.

Jens
--
Gallery Developer

 
Deedee16

Joined: 2009-03-07
Posts: 2
Posted: Wed, 2009-03-11 06:04

Removed to start own post, sorry!