Skip to content

Commit

Permalink
Fixing detection of project nodes that have a custom node type name.
Browse files Browse the repository at this point in the history
  • Loading branch information
quicksketch committed Aug 28, 2021
1 parent 5834bed commit 2afe34d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion project_telemetry/project_telemetry.module
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function project_telemetry_menu() {
*/
function project_telemetry_access($node, $account = NULL) {
$access = user_access('access project telemetry data', $account);
return $access && $node->type === 'project' && !empty($node->project['telemetry']['enabled']);
return $access && project_node_is_project($node) && !empty($node->project['telemetry']['enabled']);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion project_telemetry/project_telemetry.pages.inc
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ function project_telemetry_project_settings_submit(&$form, &$form_state) {
* Either a Project or Project Release node.
*/
function project_telemetry_page(Node $node) {
if ($node->type === 'project') {
if (project_node_is_project($node)) {
$output = project_telemetry_project_page($node);
}
else {
Expand Down

0 comments on commit 2afe34d

Please sign in to comment.