Fix an issue with URIs missing trailing slashes, like "/maniphest"
Summary: In D3144, I made us look in application maps to find routing rules. However, we don't process //all// the maps when we 404 and try to do a "/" redirect. Process all of the maps. Additionally, in D3146 I made the menu items application-driven. However, some pages (like 404) don't have a controller. Drop the requirement that the controller be nonnull. Test Plan: - Visited "/maniphest", got a redirect after this patch. - Visited "/asldknfalksfn", got a 404 after this patch. Reviewers: davidreuss, vrana, btrahan Reviewed By: davidreuss CC: aran Maniphest Tasks: T1607 Differential Revision: https://secure.phabricator.com/D3158
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
|
||||
/**
|
||||
* @task info Application Information
|
||||
* @task ui UI Integration
|
||||
* @task uri URI Routing
|
||||
* @task fact Fact Integration
|
||||
* @task meta Application Management
|
||||
@@ -78,16 +79,26 @@ abstract class PhabricatorApplication {
|
||||
}
|
||||
|
||||
|
||||
/* -( Launch Integration )------------------------------------------------- */
|
||||
/* -( UI Integration )----------------------------------------------------- */
|
||||
|
||||
|
||||
public function loadStatus(PhabricatorUser $user) {
|
||||
return array();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Build items for the main menu.
|
||||
*
|
||||
* @param PhabricatorUser The viewing user.
|
||||
* @param AphrontController The current controller. May be null for special
|
||||
* pages like 404, exception handlers, etc.
|
||||
* @return list<PhabricatorMainMenuIconView> List of menu items.
|
||||
* @task UI
|
||||
*/
|
||||
public function buildMainMenuItems(
|
||||
PhabricatorUser $user,
|
||||
PhabricatorController $controller) {
|
||||
PhabricatorController $controller = null) {
|
||||
return array();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user