Skip to content

Commit

Permalink
Removing dirty hack in Router for detecting requestAction.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Oct 29, 2010
1 parent d784728 commit 14ec870
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cake/libs/router.php
Expand Up @@ -724,11 +724,11 @@ public static function url($url = null, $full = false) {

$path = array('base' => null);
if (!empty(self::$_requests)) {
// bad hack for detecting if doing a request action.
if (isset($this) && !isset($this->params['requested'])) {
$currentRequest = self::$_requests[count(self::$_requests) - 1];
if (!empty($currentRequest->params['requested'])) {
$request = self::$_requests[0];
} else {
$request = end(self::$_requests);
$request = $currentRequest;
}
$params = $request->params;
$path = array('base' => $request->base, 'here' => $request->here);
Expand Down

0 comments on commit 14ec870

Please sign in to comment.