Author: jablko
Date: Sat Oct 10 16:32:26 2009
New Revision: 3717
Log:
Make "star parameters" (and query string parameters) behave like ":variable"
parameters with respect to omission from the generated URL when they match
routing default parameters, http://trac.symfony-project.org/ticket/7314, fixes
issue 1043 by never omitting the sf_culture parameter,
http://qubit-toolkit.org/wiki/index.php?title=Routing#Shortest_URL
Modified:
trunk/lib/vendor/symfony/lib/routing/sfRoute.class.php
Modified: trunk/lib/vendor/symfony/lib/routing/sfRoute.class.php
==============================================================================
--- trunk/lib/vendor/symfony/lib/routing/sfRoute.class.php Sat Oct 10
00:02:27 2009 (r3716)
+++ trunk/lib/vendor/symfony/lib/routing/sfRoute.class.php Sat Oct 10
16:32:26 2009 (r3717)
@@ -240,12 +240,12 @@
}
// replace extra parameters if the route contains *
- $url = $this->generateStarParameter($url, $defaults, $tparams);
+ $url = $this->generateStarParameter($url, $defaults, $params);
if ($this->options['extra_parameters_as_query_string'] &&
!$this->hasStarParameter())
{
// add a query string if needed
- if ($extra = array_diff_assoc(array_diff_key($params, $this->variables),
$defaults))
+ if ($extra = array_diff_assoc(array_diff_key($params, $this->variables),
$this->defaults))
{
$url .= '?'.http_build_query($extra);
}
@@ -683,7 +683,7 @@
}
$tmp = array();
- foreach (array_diff_assoc(array_diff_key($parameters, $this->variables),
$defaults) as $key => $value)
+ foreach (array_diff_assoc(array_diff_key($parameters, $this->variables),
$this->defaults) as $key => $value)
{
if (is_array($value))
{
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---