Navigation Menu

Skip to content

Commit

Permalink
Remove extra strtolower() calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jul 4, 2012
1 parent d669082 commit df84dac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Cake/Routing/Route/Route.php
Expand Up @@ -196,21 +196,21 @@ public function getName() {
} }
$name = ''; $name = '';
if (isset($this->defaults['plugin'])) { if (isset($this->defaults['plugin'])) {
$name = strtolower($this->defaults['plugin']) . '.'; $name = $this->defaults['plugin'] . '.';
} }
foreach (array('controller', 'action') as $key) { foreach (array('controller', 'action') as $key) {
if ($key === 'action') { if ($key === 'action') {
$name .= ':'; $name .= ':';
} }
if (isset($this->defaults[$key])) { if (isset($this->defaults[$key])) {
$name .= strtolower($this->defaults[$key]); $name .= $this->defaults[$key];
} }
$var = ':' . $key; $var = ':' . $key;
if (strpos($this->template, $var) !== false) { if (strpos($this->template, $var) !== false) {
$name .= '_' . $key; $name .= '_' . $key;
} }
} }
return $this->_name = $name; return $this->_name = strtolower($name);
} }


/** /**
Expand Down

0 comments on commit df84dac

Please sign in to comment.