[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Page MenuHomePhabricator

WebRequest::getLimitOffset should accept a user
Closed, ResolvedPublic

Description

Currently, WebRequest::getLimitOffset accepts an optional default limit, and an optional option name, as parameters.
There should be a user parameter accepted, and eventually, required, for accessing user preferences.
To clarify that the function gets the limit and offset for a specific user, I suggest:

  • Create WebRequest::getLimitOffsetForUser
    • Which requires a user to be passed to get the user preference for an option
  • Convert WebRequest::getLimitOffset to a wrapper that simple uses $wgUser
  • Replace uses of ::getLimitOffset with ::getLimitOffsetForUser, supplying a user, since whether its needed or not depends on unknown user input
  • Deprecate ::getLimitOffset

Deployed uses of getLimitOffset:
https://codesearch.wmflabs.org/deployed/?q=getLimitOffset%5C(&i=nope&files=&repos=

Event Timeline

Change 567528 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Add WebRequest::getLimitOffsetForUser to replace ::getLimitOffset

https://gerrit.wikimedia.org/r/567528

Change 567528 merged by jenkins-bot:
[mediawiki/core@master] Add WebRequest::getLimitOffsetForUser to replace ::getLimitOffset

https://gerrit.wikimedia.org/r/567528

Change 573027 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/CentralNotice@master] Replace WebRequest::getLimitOffset with ::getLimitOffsetForUser

https://gerrit.wikimedia.org/r/573027

Change 573029 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/Flow@master] Replace WebRequest::getLimitOffset with ::getLimitOffsetForUser

https://gerrit.wikimedia.org/r/573029

Change 573030 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/ProofreadPage@master] Replace WebRequest::getLimitOffset with ::getLimitOffsetForUser

https://gerrit.wikimedia.org/r/573030

Change 573031 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/Wikibase@master] Replace WebRequest::getLimitOffset with ::getLimitOffsetForUser

https://gerrit.wikimedia.org/r/573031

Change 573033 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Replace WebRequest::getLimitOffset with ::getLimitOffsetForUser

https://gerrit.wikimedia.org/r/573033

Change 573030 merged by jenkins-bot:
[mediawiki/extensions/ProofreadPage@master] Replace WebRequest::getLimitOffset with ::getLimitOffsetForUser

https://gerrit.wikimedia.org/r/573030

Change 573033 merged by jenkins-bot:
[mediawiki/core@master] Replace WebRequest::getLimitOffset with ::getLimitOffsetForUser

https://gerrit.wikimedia.org/r/573033

Change 573027 merged by jenkins-bot:
[mediawiki/extensions/CentralNotice@master] Replace WebRequest::getLimitOffset with ::getLimitOffsetForUser

https://gerrit.wikimedia.org/r/573027

Change 573068 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Deprecate WebRequest::getLimitOffset

https://gerrit.wikimedia.org/r/573068

Change 573031 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Replace WebRequest::getLimitOffset with ::getLimitOffsetForUser

https://gerrit.wikimedia.org/r/573031

Change 573029 merged by jenkins-bot:
[mediawiki/extensions/Flow@master] Replace WebRequest::getLimitOffset with ::getLimitOffsetForUser

https://gerrit.wikimedia.org/r/573029

Change 573068 merged by jenkins-bot:
[mediawiki/core@master] Hard deprecate WebRequest::getLimitOffset

https://gerrit.wikimedia.org/r/573068