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
4e522ebf
Commit
4e522ebf
authored
Jan 22, 2008
by
jwage
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes #717
parent
f9ee88a5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
22 deletions
+28
-22
Timestampable.php
lib/Doctrine/Template/Listener/Timestampable.php
+14
-10
Timestampable.php
lib/Doctrine/Template/Timestampable.php
+14
-12
No files found.
lib/Doctrine/Template/Listener/Timestampable.php
View file @
4e522ebf
...
@@ -95,6 +95,9 @@ class Doctrine_Template_Listener_Timestampable extends Doctrine_Record_Listener
...
@@ -95,6 +95,9 @@ class Doctrine_Template_Listener_Timestampable extends Doctrine_Record_Listener
{
{
$options
=
$this
->
_options
[
$type
];
$options
=
$this
->
_options
[
$type
];
if
(
$options
[
'expression'
]
!==
false
&&
is_string
(
$options
[
'expression'
]))
{
return
new
Doctrine_Expression
(
$options
[
'expression'
]);
}
else
{
if
(
$options
[
'type'
]
==
'date'
)
{
if
(
$options
[
'type'
]
==
'date'
)
{
return
date
(
$options
[
'format'
],
time
());
return
date
(
$options
[
'format'
],
time
());
}
else
if
(
$options
[
'type'
]
==
'timestamp'
)
{
}
else
if
(
$options
[
'type'
]
==
'timestamp'
)
{
...
@@ -103,4 +106,5 @@ class Doctrine_Template_Listener_Timestampable extends Doctrine_Record_Listener
...
@@ -103,4 +106,5 @@ class Doctrine_Template_Listener_Timestampable extends Doctrine_Record_Listener
return
time
();
return
time
();
}
}
}
}
}
}
}
\ No newline at end of file
lib/Doctrine/Template/Timestampable.php
View file @
4e522ebf
...
@@ -43,11 +43,13 @@ class Doctrine_Template_Timestampable extends Doctrine_Template
...
@@ -43,11 +43,13 @@ class Doctrine_Template_Timestampable extends Doctrine_Template
'type'
=>
'timestamp'
,
'type'
=>
'timestamp'
,
'format'
=>
'Y-m-d H:i:s'
,
'format'
=>
'Y-m-d H:i:s'
,
'disabled'
=>
false
,
'disabled'
=>
false
,
'expression'
=>
false
,
'options'
=>
array
()),
'options'
=>
array
()),
'updated'
=>
array
(
'name'
=>
'updated_at'
,
'updated'
=>
array
(
'name'
=>
'updated_at'
,
'type'
=>
'timestamp'
,
'type'
=>
'timestamp'
,
'format'
=>
'Y-m-d H:i:s'
,
'format'
=>
'Y-m-d H:i:s'
,
'disabled'
=>
false
,
'disabled'
=>
false
,
'expression'
=>
false
,
'options'
=>
array
()));
'options'
=>
array
()));
/**
/**
...
...
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