Page MenuHomePhabricator

Make log ids available to the Thanks extension
Closed, DeclinedPublic


In order for the Thanks extension to be able to "Thank" users for administrative actions the extension needs some way to know when log entires are created. This should be provided via a hook extensions could use.


...I found that where log entries are created, log ids are generally discarded or hidden deep and not available to hooks. These log ids need to be made available so the Thank extension can create thank links.

Event Timeline

I think we specifically need a hook in LogFormatter::getActionLinks(), or right after it.

Why does Thanks need to know when log entries are created? Isn't it only when the thanks is given that the log entry ID is required? And that can't possibly happen at the time of creation.

Also, if we add the thanks link to the end of the lines in Special:log, then we can use the LogEventsListLineEnding hook and it passes in a DatabaseLogEntry object (which has an ID).

I guess this probably depends on where we need to be able to thank log entries from. At the moment, it's looking like it's just Special:Log; are there other places?

Yeah, I don't think we need to do anything special for now. Like you said, the LogEventsListLineEnding hook should have everything we need for adding Thanks on Special:Log, which is all we're doing for version 1. Declining for now. We may want to re-open when/if the scope expands.