Page MenuHomePhabricator

Push construction of routing maps into Sites
ClosedPublic

Authored by epriestley on Aug 29 2015, 10:08 PM.
Tags
None
Referenced Files
F14068699: D14008.diff
Tue, Nov 19, 11:48 PM
F14055442: D14008.diff
Sat, Nov 16, 11:55 AM
F14044117: D14008.diff
Tue, Nov 12, 3:03 PM
F14029416: D14008.id33865.diff
Fri, Nov 8, 8:40 PM
F14028761: D14008.diff
Fri, Nov 8, 3:43 PM
F14027455: D14008.diff
Fri, Nov 8, 7:14 AM
F14027452: D14008.diff
Fri, Nov 8, 7:14 AM
F14022193: D14008.id33887.diff
Wed, Nov 6, 3:42 PM
Subscribers
None
Tokens
"Like" token, awarded by joshuaspence.

Details

Reviewers
chad
Commits
Restricted Diffusion Commit
rPbcc5e55af288: Push construction of routing maps into Sites
Summary

This enables CORGI.

Currently, AphrontSite subclasses can't really have their own routes. They can do this sort of hacky rewriting of paths, but that's a mess and not desirable in the long run.

Instead, let subclasses build their own routing maps. This will let CORP and ORG have their own routing maps.

I was able to get rid of the PhameBlogResourcesSite since it can really just share the standard resources site.

Test Plan
  • With no base URI set, and a base URI set, loaded main page and resources (from main site).
  • With file domain set, loaded resources from main site and file site.
  • Loaded a skinned blog from a domain.
  • Loaded a skinned blog from the main site.
  • Viewed "Request" tab of DarkConsole to see site/controller info.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Push construction of routing maps into Sites.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
src/aphront/configuration/AphrontApplicationConfiguration.php
286–308

This had been mostly reduced to lies by the introduction of Sites.

src/applications/console/plugin/DarkConsoleRequestPlugin.php
3

These changes are mostly letting me delete the aphrontpath.php script, which required some routing methods to be public.

Instead, this information is moved into DarkConsole, which is more accessible anyway, since you can just see where your request went on the page itself:

Screen Shot 2015-08-29 at 3.10.24 PM.png (195×471 px, 19 KB)

The rest of these changes mostly just make this i18n safe: we were doing this kind of thing before:

array(
  pht('x') => ...,
  pht('y') => ...,
)

This is incorrect in the general case because both "x" and "y" may translate to the same string in Ancient Mongol, which would silently drop some data.

chad edited edge metadata.
This revision is now accepted and ready to land.Aug 29 2015, 10:51 PM
This revision was automatically updated to reflect the committed changes.