Avoid page_restrictions field queries for templates on edit form
authorAaron Schulz <aschulz@wikimedia.org>
Sat, 11 Apr 2015 19:34:48 +0000 (12:34 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Mon, 13 Apr 2015 23:04:23 +0000 (23:04 +0000)
commit5e513509c9c4c6a9281a991278b7df08ca84058e
tree85da39f0d0ffef8e71a5a49b324f4980d97d77ab
parent412dee71ef6160ac35a3042bfab5cc3989090cb0
Avoid page_restrictions field queries for templates on edit form

* Title::newFromRow() will actually load page_restrictions, which
  should normally be empty. This avoids queries in getRestrictions().
  Those queries could add 100-200ms to edit form views.
* getLinksFrom() has been simplified to use newFromRow(), thus
  loading the old restrictions in passing.

Change-Id: I225955589a82e4accbf059d17390a5e28e2fa1ca
includes/Title.php