Page MenuHomePhabricator

Push construction of routing maps into Sites
ClosedPublic

Authored by epriestley on Aug 29 2015, 10:08 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 24, 11:51 PM
Unknown Object (File)
Thu, Apr 11, 8:07 AM
Unknown Object (File)
Sun, Apr 7, 5:14 AM
Unknown Object (File)
Thu, Apr 4, 10:10 PM
Unknown Object (File)
Fri, Mar 29, 3:48 PM
Unknown Object (File)
Wed, Mar 27, 6:06 PM
Unknown Object (File)
Mar 24 2024, 9:22 PM
Unknown Object (File)
Mar 21 2024, 11:29 AM
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.