Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scheduler-3437739
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Issue forks
scheduler-3437739
Commits
40b4ff38
Commit
40b4ff38
authored
7 years ago
by
Jonathan Smith
Committed by
Jonathan Smith
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2902512
by jonathan1055: Use !empty instead of greater than 0 to match other checks
parent
dcde416d
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
scheduler.module
+1
-1
1 addition, 1 deletion
scheduler.module
with
1 addition
and
1 deletion
scheduler.module
+
1
−
1
View file @
40b4ff38
...
...
@@ -342,7 +342,7 @@ function scheduler_node_presave(EntityInterface $node) {
// If the node type is enabled for scheduled publishing and has a publish_on
// date then check if publishing is allowed and if the content needs to be
// published immediately.
if
(
$entity
->
getThirdPartySetting
(
'scheduler'
,
'publish_enable'
,
$config
->
get
(
'default_publish_enable'
))
&&
$node
->
publish_on
->
value
>
0
)
{
if
(
$entity
->
getThirdPartySetting
(
'scheduler'
,
'publish_enable'
,
$config
->
get
(
'default_publish_enable'
))
&&
!
empty
(
$node
->
publish_on
->
value
)
)
{
// Check that other modules allow the action on this node.
$publication_allowed
=
\Drupal
::
service
(
'scheduler.manager'
)
->
isAllowed
(
$node
,
'publish'
);
...
...
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