mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merging fixes and enhancements into trunk
Revision: [1850] Added fix for duplicate alias name being added to fields passed the the Model methods, when a field already was aliased Example: Post.id will no longer return Post.Post.id. git-svn-id: https://svn.cakephp.org/repo/trunk/cake@1851 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
2407160dc5
commit
660259640d
2 changed files with 11 additions and 2 deletions
|
@ -6,4 +6,4 @@
|
|||
// +---------------------------------------------------------------------------------------------------+ //
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
0.10.7.1849 RC 2
|
||||
0.10.7.1851 RC 3
|
|
@ -907,7 +907,16 @@ class DboSource extends DataSource
|
|||
{
|
||||
for ($i = 0; $i < $count; $i++)
|
||||
{
|
||||
$fields[$i] = $this->name($alias).'.'.$this->name($fields[$i]);
|
||||
$dot = strrpos($fields[$i], '.');
|
||||
if ($dot === false)
|
||||
{
|
||||
$fields[$i] = $this->name($alias).'.'.$this->name($fields[$i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$build = explode('.',$fields[$i]);
|
||||
$fields[$i] = $this->name($build[0]).'.'.$this->name($build[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $fields;
|
||||
|
|
Loading…
Reference in a new issue