Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
941a2e57
Commit
941a2e57
authored
Jul 18, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
b13a70c0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
AuditLog.php
lib/Doctrine/AuditLog.php
+4
-3
Record.php
lib/Doctrine/Record.php
+4
-0
No files found.
lib/Doctrine/AuditLog.php
View file @
941a2e57
...
@@ -129,7 +129,7 @@ class Doctrine_AuditLog
...
@@ -129,7 +129,7 @@ class Doctrine_AuditLog
return
$q
->
execute
(
$values
,
Doctrine_HYDRATE
::
HYDRATE_ARRAY
);
return
$q
->
execute
(
$values
,
Doctrine_HYDRATE
::
HYDRATE_ARRAY
);
}
}
public
function
buildDefinition
(
Doctrine_Table
$table
)
public
function
buildDefinition
(
Doctrine_Table
$table
)
{
{
$this
->
_options
[
'className'
]
=
str_replace
(
'%CLASS%'
,
$this
->
_options
[
'className'
]
=
str_replace
(
'%CLASS%'
,
$this
->
_options
[
'table'
]
->
getComponentName
(),
$this
->
_options
[
'table'
]
->
getComponentName
(),
$this
->
_options
[
'className'
]);
$this
->
_options
[
'className'
]);
...
@@ -143,6 +143,9 @@ class Doctrine_AuditLog
...
@@ -143,6 +143,9 @@ class Doctrine_AuditLog
}
}
$columns
=
$table
->
getColumns
();
$columns
=
$table
->
getColumns
();
// the version column should be part of the primary key definition
$columns
[
$this
->
_options
[
'versionColumn'
]][
'primary'
]
=
true
;
$id
=
$table
->
getIdentifier
();
$id
=
$table
->
getIdentifier
();
...
@@ -150,8 +153,6 @@ class Doctrine_AuditLog
...
@@ -150,8 +153,6 @@ class Doctrine_AuditLog
$builder
=
new
Doctrine_Import_Builder
();
$builder
=
new
Doctrine_Import_Builder
();
$options
[
'primary'
][]
=
$this
->
_options
[
'versionColumn'
];
$def
=
$builder
->
buildDefinition
(
$options
,
$columns
);
$def
=
$builder
->
buildDefinition
(
$options
,
$columns
);
if
(
!
$this
->
_options
[
'generateFiles'
])
{
if
(
!
$this
->
_options
[
'generateFiles'
])
{
...
...
lib/Doctrine/Record.php
View file @
941a2e57
...
@@ -1375,6 +1375,10 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count
...
@@ -1375,6 +1375,10 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count
->
getAuditLog
()
->
getAuditLog
()
->
getVersion
(
$this
,
$version
);
->
getVersion
(
$this
,
$version
);
if
(
!
isset
(
$data
[
0
]))
{
throw
new
Doctrine_Record_Exception
(
'Version '
.
$version
.
' does not exist!'
);
}
$this
->
_data
=
$data
[
0
];
$this
->
_data
=
$data
[
0
];
}
}
/**
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment