Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions graph.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@
<h2>Navigation</h2>
<?php
include_once "data.php";
function hasElementChildren($element) {
$hasContent = false;
foreach ($element as $activityName => $content) {
if (!array_key_exists("dependsOn", $content)) {
continue;
}
$hasContent = true;

/** Return true if has dependsOn. */
function hasElementChildren($activities) {
foreach ($activities as $activityName => $activity) {
if ($activity["dependsOn"] ?? null)
return true;
}
return $hasContent;
return false;
}

foreach ($dimensions as $dimension => $subdimensions) {
Expand Down Expand Up @@ -211,4 +210,4 @@ function transform(d) {
<?php
}
}
?>
?>