Permalink
Browse files

Fixes #5939

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7965 3807eeeb-6ff5-0310-8944-8be069107fe0
  • Loading branch information...
1 parent af799e1 commit afe99701572830a936011112dad430ecfc8b682c phishy committed Dec 29, 2008
Showing with 4 additions and 4 deletions.
  1. +4 −4 cake/libs/model/datasources/dbo/dbo_oracle.php
@@ -454,7 +454,6 @@ function listSources() {
while($r = $this->fetchRow()) {
$sources[] = strtolower($r[0]['name']);
}
- parent::listSources($sources);
return $sources;
}
/**
@@ -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' :
@@ -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);
}
@@ -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);

0 comments on commit afe9970

Please sign in to comment.