Removing Router::stripEscape() and all uses of it.

Router::stripEscape() removed escape patterns supported in DboSource.  Since those escape patterns no longer exist, neither does the need for the escaping of those patterns.
This commit is contained in:
mark_story 2009-11-28 23:08:52 -05:00
parent d70689ecda
commit a86e414adc

View file

@ -1030,36 +1030,6 @@ class Router {
return $base; return $base;
} }
/**
* Strip escape characters from parameter values.
*
* @param mixed $param Either an array, or a string
* @return mixed Array or string escaped
* @access public
* @static
*/
function stripEscape($param) {
$self =& Router::getInstance();
if (!is_array($param) || empty($param)) {
if (is_bool($param)) {
return $param;
}
return preg_replace('/^(?:[\\t ]*(?:-!)+)/', '', $param);
}
foreach ($param as $key => $value) {
if (is_string($value)) {
$return[$key] = preg_replace('/^(?:[\\t ]*(?:-!)+)/', '', $value);
} else {
foreach ($value as $array => $string) {
$return[$key][$array] = $self->stripEscape($string);
}
}
}
return $return;
}
/** /**
* Instructs the router to parse out file extensions from the URL. For example, * Instructs the router to parse out file extensions from the URL. For example,
* http://example.com/posts.rss would yield an file extension of "rss". * http://example.com/posts.rss would yield an file extension of "rss".
@ -1121,7 +1091,6 @@ class Router {
if (empty($param) && $param !== '0' && $param !== 0) { if (empty($param) && $param !== '0' && $param !== 0) {
continue; continue;
} }
$param = $self->stripEscape($param);
$separatorIsPresent = strpos($param, $self->named['separator']) !== false; $separatorIsPresent = strpos($param, $self->named['separator']) !== false;
if ((!isset($options['named']) || !empty($options['named'])) && $separatorIsPresent) { if ((!isset($options['named']) || !empty($options['named'])) && $separatorIsPresent) {