Skip to content

Commit

Permalink
Removing unreachable code. Fixes #614
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed May 14, 2010
1 parent a29866b commit 353c600
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions cake/libs/view/helpers/paginator.php
Expand Up @@ -194,18 +194,10 @@ function sortKey($model = null, $options = array()) {
}

if (isset($options['sort']) && !empty($options['sort'])) {
if (preg_match('/(?:\w+\.)?(\w+)/', $options['sort'], $result) && isset($result[1])) {
if ($result[0] == $this->defaultModel()) {
return $result[1];
}
}
return $options['sort'];
} elseif (isset($options['order']) && is_array($options['order'])) {
return key($options['order']);
} elseif (isset($options['order']) && is_string($options['order'])) {
if (preg_match('/(?:\w+\.)?(\w+)/', $options['order'], $result) && isset($result[1])) {
return $result[1];
}
return $options['order'];
}
return null;
Expand Down

0 comments on commit 353c600

Please sign in to comment.