1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 22:10:55 +01:00

Default newPage() to device-ready

Summary:
Ref T9690. The "meta viewport" tag got dropped by accident because of the sort of weird logic on the old flow.

Make the default device-ready, then just turn it off for the tiny number of non-device pages.

Test Plan:
  - Verified meta viewport tag appears on normal pages again.
  - Verified it doesn't show up on non-mobile pages like Maniphest Reports.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9690

Differential Revision: https://secure.phabricator.com/D14396
This commit is contained in:
epriestley 2015-11-03 20:51:12 +00:00 committed by epriestley
parent 0afccd20d0
commit 6b194af669

View file

@ -447,7 +447,8 @@ abstract class PhabricatorController extends AphrontController {
public function newPage() { public function newPage() {
$page = id(new PhabricatorStandardPageView()) $page = id(new PhabricatorStandardPageView())
->setRequest($this->getRequest()) ->setRequest($this->getRequest())
->setController($this); ->setController($this)
->setDeviceReady(true);
$application = $this->getCurrentApplication(); $application = $this->getCurrentApplication();
if ($application) { if ($application) {
@ -595,8 +596,8 @@ abstract class PhabricatorController extends AphrontController {
$page->setPageObjectPHIDs($object_phids); $page->setPageObjectPHIDs($object_phids);
} }
if (idx($options, 'device', true)) { if (!idx($options, 'device', true)) {
$page->setDeviceReady(true); $page->setDeviceReady(false);
} }
$page->setShowFooter(idx($options, 'showFooter', true)); $page->setShowFooter(idx($options, 'showFooter', true));