Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Applying patch from 'robustsolution' for optimization in Dispatcher::…

…dispatch. Fixes #317
  • Loading branch information...
commit a30aec99fd39978b0532ea6f3e1027f34675af34 1 parent 5d25780
@markstory markstory authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 cake/dispatcher.php
View
4 cake/dispatcher.php
@@ -136,13 +136,13 @@ function dispatch($url = null, $additionalParams = array()) {
)));
}
- $privateAction = (bool)(strpos($this->params['action'], '_', 0) === 0);
+ $privateAction = $this->params['action'][0] === '_';
$prefixes = Router::prefixes();
if (!empty($prefixes)) {
if (isset($this->params['prefix'])) {
$this->params['action'] = $this->params['prefix'] . '_' . $this->params['action'];
- } elseif (strpos($this->params['action'], '_') !== false && !$privateAction) {
+ } elseif (strpos($this->params['action'], '_') > 0) {
list($prefix, $action) = explode('_', $this->params['action']);
$privateAction = in_array($prefix, $prefixes);
}
Please sign in to comment.
Something went wrong with that request. Please try again.