Skip to content

Commit

Permalink
Various bug fixes (openemr#6976)
Browse files Browse the repository at this point in the history
* Various bug fixes
-  Undefined array key "mod_relative_link"
-  Warning:  Undefined variable $closeAnchorClasses

* - property menu_id missing for top level nav bar HIE
  • Loading branch information
sjpadgett authored Nov 6, 2023
1 parent bbc52c8 commit 9775cc0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions interface/main/tabs/templates/patient_data_template.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class="img-thumbnail"
<!-- ko if: patient -->
<?php
$classes = "";
$closeAnchorClasses = '';
switch ($GLOBALS['patient_name_display']) :
case 'btn':
$classes = "btn btn-sm btn-secondary";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ private function updateModulesReportsMenu(&$menu_list)
continue;
}

$relative_link = "/interface/modules/" . $modulePath . "/" . $hookrow['mod_relative_link'] . $hookrow['path'];
$relative_link = "/interface/modules/" . $modulePath . "/" . ($hookrow['mod_relative_link'] ?? '') . $hookrow['path'];
$mod_nick_name = $hookrow['menu_name'] ? $hookrow['menu_name'] : 'NoName';

$subEntry = new \stdClass();
Expand Down
4 changes: 2 additions & 2 deletions src/Menu/PatientMenuRole.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,11 @@ public function displayHorizNavBarMenu()
if (!empty($value->children)) {
// create dropdown if there are children (bootstrap3 horizontal nav bar with dropdown)
$class = isset($value->class) ? $value->class : '';
$list = '<li class="dropdown"><a href="#" id="' . attr($value->menu_id) . '" class="nav-link dropdown-toggle text-body ' . attr($class) . '" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">' . text($value->label) . ' <span class="caret"></span></a>';
$list = '<li class="dropdown"><a href="#" id="' . attr($value->menu_id ?? $value->label) . '" class="nav-link dropdown-toggle text-body ' . attr($class) . '" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">' . text($value->label) . ' <span class="caret"></span></a>';
$list .= '<ul class="dropdown-menu">';
foreach ($value->children as $children_key => $children_value) {
$link = ($children_value->pid != "true") ? $children_value->url : $children_value->url . attr($pid);
$class = isset($children_value->class) ? $children_value->class : '';
$class = $children_value->class ?? '';
$list .= '<li class="nav-item ' . attr($class) . '" id="' . attr($children_value->menu_id) . '">';
$list .= '<a class="nav-link text-dark" href="' . attr($link) . '" onclick="' . $children_value->on_click . '"> ' . text($children_value->label) . ' </a>';
$list .= '</li>';
Expand Down

0 comments on commit 9775cc0

Please sign in to comment.