Skip to content

Commit

Permalink
[Routing] Tweaking the ApacheMatcherDumper formatting - no real change.
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverryan authored and fabpot committed Nov 27, 2010
1 parent 1e9e1b3 commit acb977a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -65,11 +65,11 @@ public function dump(array $options = array())
$conditions[] = sprintf('RewriteCond %%{REQUEST_METHOD} =%s', strtoupper($method));
}

$conditions = implode(" [OR]\n", $conditions)."\n";
$conditions = count($conditions) ? implode(" [OR]\n", $conditions)."\n" : '';

$regexes[] = sprintf("%sRewriteCond %%{PATH_INFO} %s\nRewriteRule .* %s [QSA,L,%s]", $conditions, $regex, $options['script_name'], $variables);
}

return implode("\n", $regexes);
return implode("\n\n", $regexes);
}
}
@@ -1,6 +1,6 @@

RewriteCond %{PATH_INFO} ^/foo/(baz|symfony)$
RewriteRule .* app.php [QSA,L,E=_ROUTING__route:foo,E=_ROUTING_bar:%1,E=_ROUTING_def:test]

RewriteCond %{REQUEST_METHOD} =GET [OR]
RewriteCond %{REQUEST_METHOD} =HEAD
RewriteCond %{PATH_INFO} ^/bar/([^/\.]+?)$
Expand Down

0 comments on commit acb977a

Please sign in to comment.