sfPatternRouting.class.php line 3119
public function generate($name, $params = array(), $absolute = false)
{
if (!is_null($this->cache))
{
$cacheKey = 'generate_'.$name.'_'.md5(serialize(array_merge($this->defaultParameters, $params))).'_'.md5(serialize($this->optionscontext?));
if (isset($this->cacheData[$cacheKey]))
{
return $this->cacheData[$cacheKey];
}
}
........................
$url = $route->generate($params, $this->optionscontext?, $absolute);
if (!is_null($this->cache))
{
$this->cacheChanged = true;
$this->cacheData[$cacheKey] = $url;
}
return $this->fixGeneratedUrl($url, $absolute);
}
I make a directory for my backend application to /web/backend/,
and I moved /web/backend.php to /web/backend/index.php.
http://localhost/backend/ it looks OK, but when I try to write some links to the template file, error was here:
link_to('TEXT', 'mymodule/someaction') returns "<a href=/mymodule/someaction.."
what I want was "<a href=/backend/mymodule/someaction.."
Edit line 3126
return $this->cacheData[$cacheKey];
to
return $this->fixGeneratedUrl($this->cacheData[$cacheKey], $absolute);
or Edit line 3145 to
$url = $this->fixGeneratedUrl($url, $absolute);
if (!is_null($this->cache))
{
$this->cacheChanged = true;
$this->cacheData[$cacheKey] = $url;
}
return $url;
all was OK.