Page MenuHomePhabricator

Parameter to limit results to revisions made by a particular user, when querying revisions for a page
Closed, ResolvedPublic

Description

Though that sometimes you want to get revisions baded on if a specific user made
the revision or not, so I've made a patch to enable that (only in enumeration mode)


Version: 1.9.x
Severity: major

Details

Reference
bz8772

Event Timeline

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

the promised patch

Attached:

bugfix

As someone had changed something in the patch before applying, rvuser at the moment doesnt work. Don't know why that edit was made. fix here.

Attached:

My mistake -- I introduced a new parameter type "user", and updated your diff to use it. My mistake was that I kept $this->addWhere($value) instead of using $this->addWhereFld($field, $value), even though i passed two parameters. PHP has no problem with taking more parameters than the function's declaration, hence I never noticed the difference.

I would prefer to use addWhereFld because it automatically appends the quotes and escaping to the value instead of doing it all over the place.

addWhere is for special conditions such as !=, >=, etc.