Page MenuHomePhabricator

action=raw hook
Closed, ResolvedPublic

Description

Author: thdemon

Description:
I wish for a hook to modify raw access to article data. This may be helpful to
prevent automatic content grabbing by bots for example.


Version: 1.8.x
Severity: enhancement
Platform: PC

Details

Reference
bz8567

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:31 PM
bzimport set Reference to bz8567.
bzimport added a subscriber: Unknown Object (MLST).

leon wrote:

Where should that hook be placed? What do you want to do with it/what parameter
should it pass?

thdemon wrote:

I want to replace text or textparts. Or better I hope to implement the following:

if ( !userIsLoggedin && !userIsBot ) {

addHook("rawEdit", "methodX");

}
...

methodX(string rawData) {

return "you are a bad robot";
}

robchur wrote:

Do we not have a generic action handler override hook? If not, do we want one?
If so, then implement that, rather than this. :)

leon wrote:

So I fixed that one (r19117), as I couldn't see that someone's going to write
Rob's super hook :)