Removing unreachable code. Fixes #614

This commit is contained in:
Mark Story 2010-05-13 23:38:26 -04:00
parent a29866b7fb
commit 353c600cd7

View file

@ -194,18 +194,10 @@ class PaginatorHelper extends AppHelper {
}
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;