Skip to content

Commit

Permalink
Fixes #5939
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7965 3807eeeb-6ff5-0310-8944-8be069107fe0
  • Loading branch information
phishy committed Dec 29, 2008
1 parent af799e1 commit afe9970
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cake/libs/model/datasources/dbo/dbo_oracle.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,6 @@ function listSources() {
while($r = $this->fetchRow()) {
$sources[] = strtolower($r[0]['name']);
}
parent::listSources($sources);
return $sources;
}
/**
Expand Down Expand Up @@ -835,7 +834,8 @@ function value($data, $column = null, $safe = false) {

switch($column) {
case 'date':
$data = date('Y-m-d H:i:s', strtotime($data));
$date = new DateTime($data);
$data = $date->format('Y-m-d H:i:s');
$data = "TO_DATE('$data', 'YYYY-MM-DD HH24:MI:SS')";
break;
case 'integer' :
Expand Down Expand Up @@ -975,7 +975,7 @@ function queryAssociation(&$model, &$linkModel, $type, $association, $assocData,
$ins = array_chunk($ins, 1000);
foreach ($ins as $i) {
$q = str_replace('{$__cakeID__$}', join(', ', $i), $query);
$q = str_replace('= (', 'IN (', $q);
$q = str_replace('= (', 'IN (', $q);
$res = $this->fetchAll($q, $model->cacheQueries, $model->alias);
$fetch = array_merge($fetch, $res);
}
Expand Down Expand Up @@ -1019,7 +1019,7 @@ function queryAssociation(&$model, &$linkModel, $type, $association, $assocData,
$ins = array_chunk($ins, 1000);
foreach ($ins as $i) {
$q = str_replace('{$__cakeID__$}', '(' .join(', ', $i) .')', $query);
$q = str_replace('= (', 'IN (', $q);
$q = str_replace('= (', 'IN (', $q);
$q = str_replace(' WHERE 1 = 1', '', $q);


Expand Down

0 comments on commit afe9970

Please sign in to comment.