Skip to content
Browse files

Replaced two elseifs by if in sqlserver datasource

  • Loading branch information...
1 parent a980fd9 commit 446792987a41081a0882a4295a6c8cdc884ceafc @ravage84 ravage84 committed
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/Cake/Model/Datasource/Database/Sqlserver.php
View
6 lib/Cake/Model/Datasource/Database/Sqlserver.php
@@ -538,7 +538,8 @@ public function renderStatement($type, $data) {
WHERE _cake_paging_.{$rowCounter} > {$offset}
ORDER BY _cake_paging_.{$rowCounter}
";
- } elseif (strpos($limit, 'FETCH') !== false) {
+ }
+ if (strpos($limit, 'FETCH') !== false) {
return "SELECT {$fields} FROM {$table} {$alias} {$joins} {$conditions} {$group} {$order} {$limit}";
}
return "SELECT {$limit} {$fields} FROM {$table} {$alias} {$joins} {$conditions} {$group} {$order}";
@@ -573,7 +574,8 @@ public function renderStatement($type, $data) {
public function value($data, $column = null) {
if ($data === null || is_array($data) || is_object($data)) {
return parent::value($data, $column);
- } elseif (in_array($data, array('{$__cakeID__$}', '{$__cakeForeignKey__$}'), true)) {
+ }
+ if (in_array($data, array('{$__cakeID__$}', '{$__cakeForeignKey__$}'), true)) {
return $data;
}

0 comments on commit 4467929

Please sign in to comment.
Something went wrong with that request. Please try again.