Last modified: 2011-02-08 21:55:57 UTC
When $wgDisablePageCounters is enabled, API queries may still return the counter property. In cases where the counter property is returned, it's set to 0. A better behavior would be to throw a warning for any query that would explicitly or implicitly return counter when $wgDisablePageCounters is enabled.
Just for the record, it's set to 3 here: http://en.wikipedia.org/w/api.php?action=query&titles=Einstein&format=txtfm&prop=info
(In reply to comment #1) > Just for the record, it's set to 3 here: > http://en.wikipedia.org/w/api.php?action=query&titles=Einstein&format=txtfm&prop=info Yes. That predates the feature being disabled. It will return whatever the stored value is. The issue is that it shouldn't return the property at all if the feature has been disabled.
I don't think the warning is really necessary... It's just returned as part of the information.. It's whether we want to just return like "" if the counter is disabled, or nothing at all Relatively trivial to fix
(In reply to comment #3) > I don't think the warning is really necessary... It's just returned as part of > the information.. > > It's whether we want to just return like "" if the counter is disabled, or > nothing at all > I think it's best to return "" and keep the property there (least chance of breaking clients, although the change should still be announced). Raising a warning here would be very noisy.
r75999