mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Fixed typo in function name strpos replaces strrpos
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4832 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
8ed1b69b3f
commit
30ea0fb69b
1 changed files with 5 additions and 5 deletions
|
@ -997,8 +997,8 @@ class DboSource extends DataSource {
|
|||
$assocFields = $this->fields($model, $model->name, array("{$model->name}.{$model->primaryKey}"));
|
||||
$passedFields = $this->fields($model, $model->name, $queryData['fields']);
|
||||
if(count($passedFields) === 1) {
|
||||
$match = strrpos($passedFields[0], $assocFields[0]);
|
||||
$match1 = strrpos($passedFields[0], 'COUNT(');
|
||||
$match = strpos($passedFields[0], $assocFields[0]);
|
||||
$match1 = strpos($passedFields[0], 'COUNT(');
|
||||
if($match === false && $match1 === false){
|
||||
$queryData['fields'] = array_unique(array_merge($passedFields, $assocFields));
|
||||
} else {
|
||||
|
@ -1425,12 +1425,12 @@ class DboSource extends DataSource {
|
|||
$prepend = 'DISTINCT ';
|
||||
$fields[$i] = trim(r('DISTINCT', '', $fields[$i]));
|
||||
}
|
||||
$dot = strrpos($fields[$i], '.');
|
||||
$dot = strpos($fields[$i], '.');
|
||||
|
||||
if ($dot === false) {
|
||||
$fields[$i] = $prepend . $this->name($alias) . '.' . $this->name($fields[$i]);
|
||||
} else {
|
||||
$comma = strrpos($fields[$i], ',');
|
||||
$comma = strpos($fields[$i], ',');
|
||||
if ($comma === false) {
|
||||
$build = explode('.', $fields[$i]);
|
||||
if (!Set::numeric($build)) {
|
||||
|
@ -1449,7 +1449,7 @@ class DboSource extends DataSource {
|
|||
}
|
||||
} elseif (preg_match('/\(([\.\w]+)\)/', $fields[$i], $field)) {
|
||||
if (isset($field[1])) {
|
||||
if (strrpos($field[1], '.') === false) {
|
||||
if (strpos($field[1], '.') === false) {
|
||||
$field[1] = $this->name($alias) . '.' . $this->name($field[1]);
|
||||
} else {
|
||||
$field[0] = explode('.', $field[1]);
|
||||
|
|
Loading…
Reference in a new issue