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). 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 ... ? |
|
Posts: 6818
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
Posts: 3
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.
Posts: 6818
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
Posts: 3
1.) yes
2.) yes
3.) only selected comments are deleted (2, 3 in your example)
Once again, sorry for my English.
mikr
Posts: 6818
Okay.
so 1.) is the problem.
Everything else is correct.
Jens
--
Gallery Developer
Posts: 2
Removed to start own post, sorry!