Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
feeds
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
feeds
Commits
7e6679d2
Commit
7e6679d2
authored
11 years ago
by
Chris Leppanen
Browse files
Options
Downloads
Patches
Plain Diff
Issue #1989196 by beeradb: Fixed Never Pass FeedsDateTime objects into date_create().
parent
38d6ee8f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mappers/date.inc
+17
-12
17 additions, 12 deletions
mappers/date.inc
with
17 additions
and
12 deletions
mappers/date.inc
+
17
−
12
View file @
7e6679d2
...
@@ -46,23 +46,28 @@ function date_feeds_processor_targets_alter(&$targets, $entity_type, $bundle_nam
...
@@ -46,23 +46,28 @@ function date_feeds_processor_targets_alter(&$targets, $entity_type, $bundle_nam
*/
*/
function
date_feeds_set_target
(
$source
,
$entity
,
$target
,
$feed_element
)
{
function
date_feeds_set_target
(
$source
,
$entity
,
$target
,
$feed_element
)
{
list
(
$field_name
,
$sub_field
)
=
explode
(
':'
,
$target
,
2
);
list
(
$field_name
,
$sub_field
)
=
explode
(
':'
,
$target
,
2
);
if
(
!
(
$feed_element
instanceof
FeedsDateTimeElement
))
{
if
(
!
is_array
(
$feed_element
))
{
if
(
!
is_array
(
$feed_element
))
{
$feed_element
=
array
(
$feed_element
);
$feed_element
=
array
(
$feed_element
);
}
}
$delta
=
0
;
foreach
(
$feed_element
as
$f
)
{
$delta
=
0
;
if
(
empty
(
$f
)
||
!
is_numeric
(
$f
)
&&
!
date_create
(
$f
))
{
foreach
(
$feed_element
as
$f
)
{
$array_element
=
new
FeedsDateTimeElement
(
NULL
,
NULL
);
if
(
!
(
$feed_element
instanceof
FeedsDateTimeElement
))
{
if
(
empty
(
$f
)
||
!
is_numeric
(
$f
)
&&
is_string
(
$f
)
&&
!
date_create
(
$f
))
{
$f
=
new
FeedsDateTimeElement
(
NULL
,
NULL
);
}
}
elseif
(
$sub_field
==
'end'
)
{
elseif
(
$sub_field
==
'end'
)
{
$
array_element
=
new
FeedsDateTimeElement
(
NULL
,
$f
);
$
f
=
new
FeedsDateTimeElement
(
NULL
,
$f
);
}
}
else
{
else
{
$
array_element
=
new
FeedsDateTimeElement
(
$f
,
NULL
);
$
f
=
new
FeedsDateTimeElement
(
$f
,
NULL
);
}
}
$array_element
->
buildDateField
(
$entity
,
$field_name
,
$delta
);
$delta
++
;
}
}
$f
->
buildDateField
(
$entity
,
$field_name
,
$delta
);
$delta
++
;
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment