Bug #10687

@subpackage cannot be unset when rendering URIs

Added by Robert Lemke almost 9 years ago. Updated almost 9 years ago.

Status:
Resolved
Priority:
Should have
Assignee:
Category:
MVC - Routing
Start date:
2010-11-08
Due date:
% Done:

100%

PHP Version:
Has patch:
Complexity:

Description

The UriBuilder's behavior is that if no controller, package, subpackage etc. are specified to the uriFor() method, the current controller, package etc. are used.

That turns out to become a problem if one would like to link from a controller within a subpackage to a controller without a subpackage namespace part: specifying an empty subpackage is recognized as "not specified" and results in use of the current subpackage.

A possible fix is to only use the current subpackage if neither a package nor a subpackage have been specified. If only a package but no subpackage is passed to uriFor(), an empty subpackage key should be assumed.

Associated revisions

Revision e805f558 (diff)
Added by Robert Lemke almost 9 years ago

[+BUGFIX] FLOW3 (MVC): Fix URI building for links between within and outside subpackages

UriBuilder errorously used the current subpackage key while trying to render
a link from a controller within a subpackage to one without a subpackage key
in its namespace.

This patch makes these types of links possible.

Change-Id: I548929452f6853caa12556e2dd3a8a657f30ff51
Resolves: #10687

History

#1 Updated by Robert Lemke almost 9 years ago

  • Status changed from Accepted to Under Review

#2 Updated by Robert Lemke almost 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF