Page MenuHomePhabricator

add a pppageprops param to prop=pageprops
Closed, ResolvedPublic

Description

It is possible to add a "pppageprops" param, which only list specified page props?. "Useful for checking whether a certain page uses a certain page prop."

Thanks.


Version: 1.18.x
Severity: enhancement

Details

Reference
bz26480

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:19 PM
bzimport set Reference to bz26480.

Bryan.TongMinh wrote:

We would need to track somewhere which pageprops exist, which I don't really want to do. Or make it an unvalidated string param.

In my opinion a "unvalidated string param" is enough.

Maybe "Useful for checking whether a certain page *has* a certain page prop." is better, as description. Because a page has props and not use it.

(In reply to comment #1)

We would need to track somewhere which pageprops exist, which I don't really
want to do. Or make it an unvalidated string param.

IIRC, didn't Soxred93 do something like that originally, which you reverted that part and cleaned up

(Don't take that as me disagreeing with what you did though! :))

  • Name/value pairs indexed by page_id

CREATE TABLE /*_*/page_props (

pp_page int NOT NULL,
pp_propname varbinary(60) NOT NULL,
pp_value blob NOT NULL

) /*$wgDBTableOptions*/\G

CREATE UNIQUE INDEX /*i*/pp_page_propname ON /*_*/page_props (pp_page,pp_propname)\G

Having already filtered by a page... Filtering by a propname afterwards, wouldn't to too expensive (thinking about if we left it as an unvalidated input string)