mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Removing unreachable code. Fixes #614
This commit is contained in:
parent
a29866b7fb
commit
353c600cd7
1 changed files with 0 additions and 8 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue