Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
salesforce
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
salesforce
Commits
ee57d320
Commit
ee57d320
authored
11 years ago
by
Aaron Bauman
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#1832860
- set entity status using property_exists rather than isset() and empty()
parent
ad5251ad
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
sf_entity/sf_entity.module
+4
-4
4 additions, 4 deletions
sf_entity/sf_entity.module
with
4 additions
and
4 deletions
sf_entity/sf_entity.module
+
4
−
4
View file @
ee57d320
...
@@ -1166,8 +1166,8 @@ function _sf_entity_import_preprocess_entity(&$entity, $entity_type, $bundle_nam
...
@@ -1166,8 +1166,8 @@ function _sf_entity_import_preprocess_entity(&$entity, $entity_type, $bundle_nam
// After that node_object_prepare() can be called to set default values.
// After that node_object_prepare() can be called to set default values.
node_object_prepare
(
$entity
);
node_object_prepare
(
$entity
);
}
}
// S
et the node to published, if a status has not already been
set.
// S
tatus property must be
set.
if
(
!
isset
(
$entity
->
status
)
||
empty
(
$entity
->
status
))
{
if
(
!
property_exists
(
$entity
,
'
status
'
))
{
$entity
->
status
=
1
;
$entity
->
status
=
1
;
}
}
// To save a node, a uid must be set.
// To save a node, a uid must be set.
...
@@ -1203,8 +1203,8 @@ function _sf_entity_import_preprocess_entity(&$entity, $entity_type, $bundle_nam
...
@@ -1203,8 +1203,8 @@ function _sf_entity_import_preprocess_entity(&$entity, $entity_type, $bundle_nam
*/
*/
function
_sf_entity_import_process_entity
(
&
$entity
,
$entity_type
,
$bundle_name
=
NULL
)
{
function
_sf_entity_import_process_entity
(
&
$entity
,
$entity_type
,
$bundle_name
=
NULL
)
{
if
(
$entity_type
==
'user'
)
{
if
(
$entity_type
==
'user'
)
{
//
If s
tatus
is still empty, set it to 1 (active)
//
S
tatus
property must be set.
if
(
!
isset
(
$entity
->
status
)
||
empty
(
$entity
->
status
))
{
if
(
!
property_exists
(
$entity
,
'
status
'
))
{
$entity
->
status
=
1
;
$entity
->
status
=
1
;
}
}
// If the created date is still empty, set it to now.
// If the created date is still empty, set it to now.
...
...
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