Jump to content

Post #0 unset as best answer


Go to solution Solved by Marc,

Recommended Posts

Posted (edited)

Hi,

I wonder if the message "Post #0 unset as best answer" is the correct expected value in the moderator logs (in the ACP and in the topic itself). It seems weird to me. The language key is modlog__best_answer_unset which defaults to Post #%s unset as best answer. I believe that %s should be replaced with the post id (pid).

image.png.b2fdc911d41086077e638e15a48a6b0a.png

If we check the logs for setting the best answer, we can see that the post id (pid) is being set correctly:

image.png.b262ca655d42b5d50591fad4b9574cf8.png

Upon inspecting the source code, I found the bug at 

/system/Content/Controller.php

Where it is:

\IPS\Session::i()->modLog( 'modlog__best_answer_unset', array( $item->$solvedField => FALSE ), $item );

It should be:

\IPS\Session::i()->modLog( 'modlog__best_answer_unset', array( $comment->$idField => FALSE ), $item );

Cheers,

Gabe.

Edited by Gabriel Torres
  • 1 month later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...