lib/Cake/Model/Datasource/Database/Postgres.php 1 location
|
@@ 410-413 (lines=4) @@
|
| 407 |
|
} |
| 408 |
|
|
| 409 |
|
$prepend = ''; |
| 410 |
|
if (strpos($fields[$i], 'DISTINCT') !== false) { |
| 411 |
|
$prepend = 'DISTINCT '; |
| 412 |
|
$fields[$i] = trim(str_replace('DISTINCT', '', $fields[$i])); |
| 413 |
|
} |
| 414 |
|
|
| 415 |
|
if (strrpos($fields[$i], '.') === false) { |
| 416 |
|
$fields[$i] = $prepend . $this->name($alias) . '.' . $this->name($fields[$i]) . ' AS ' . $this->name($alias . '__' . $fields[$i]); |
lib/Cake/Model/Datasource/DboSource.php 1 location
|
@@ 2336-2339 (lines=4) @@
|
| 2333 |
|
} elseif (!preg_match('/^.+\\(.*\\)/', $fields[$i])) { |
| 2334 |
|
$prepend = ''; |
| 2335 |
|
|
| 2336 |
|
if (strpos($fields[$i], 'DISTINCT') !== false) { |
| 2337 |
|
$prepend = 'DISTINCT '; |
| 2338 |
|
$fields[$i] = trim(str_replace('DISTINCT', '', $fields[$i])); |
| 2339 |
|
} |
| 2340 |
|
$dot = strpos($fields[$i], '.'); |
| 2341 |
|
|
| 2342 |
|
if ($dot === false) { |