Skip to content

Commit

Permalink
calendar facilities list bug (openemr#4161)
Browse files Browse the repository at this point in the history
* calendar facilities list bug
- list not responsive if more than six facilities
- modify dump command option escaping

* - fix lists on windows
  • Loading branch information
sjpadgett committed Jan 5, 2021
1 parent 386eeb7 commit a00d6f8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
35 changes: 18 additions & 17 deletions interface/main/backup.php
Original file line number Diff line number Diff line change
Expand Up @@ -461,14 +461,17 @@ function gzopen($filename, $mode, $use_include_path = 0)
$cmd .= "echo 'DELETE FROM list_options WHERE list_id = \"" . add_escape_custom($listid) . "\";' >> " . escapeshellarg($EXPORT_FILE) . ";";
$cmd .= "echo 'DELETE FROM list_options WHERE list_id = \"lists\" AND option_id = \"" . add_escape_custom($listid) . "\";' >> " . escapeshellarg($EXPORT_FILE) . ";";
}
$cmd .= $dumppfx .
" --where='list_id = \"lists\" AND option_id = \"" . add_escape_custom($listid) . "\" OR list_id = \"" . add_escape_custom($listid) . "\" " .
"ORDER BY list_id != \"lists\", seq, title' " .
escapeshellarg($sqlconf["dbase"]) . " list_options";
if (IS_WINDOWS) {
# windows uses the & to join statements.
# windows uses the & to join statements.
$cmd .= $dumppfx . " --where=\"list_id = 'lists' AND option_id = '$listid' OR list_id = '$listid' " .
"ORDER BY list_id != 'lists', seq, title\" " .
escapeshellarg($sqlconf["dbase"]) . " list_options";
$cmd .= " >> " . escapeshellarg($EXPORT_FILE) . " & ";
} else {
$cmd .= $dumppfx . " --where='list_id = \"lists\" AND option_id = \"" .
add_escape_custom($listid) . "\" OR list_id = \"" .
add_escape_custom($listid) . "\" " . "ORDER BY list_id != \"lists\", seq, title' " .
escapeshellarg($sqlconf["dbase"]) . " list_options";
$cmd .= " >> " . escapeshellarg($EXPORT_FILE) . ";";
}
}
Expand Down Expand Up @@ -501,23 +504,21 @@ function gzopen($filename, $mode, $use_include_path = 0)
} else {
$cmd .= "echo 'DELETE FROM layout_group_properties WHERE grp_form_id = \"" . add_escape_custom($layoutid) . "\";' >> " . escapeshellarg($EXPORT_FILE) . ";";
}
$cmd .= $dumppfx .
' --where="grp_form_id = \'' . add_escape_custom($layoutid) . "'\" " .
escapeshellarg($sqlconf["dbase"]) . " layout_group_properties";
if (IS_WINDOWS) {
# windows uses the & to join statements.
$cmd .= $dumppfx . ' --where="grp_form_id = \'' . add_escape_custom($layoutid) . "'\" " .
escapeshellarg($sqlconf["dbase"]) . " layout_group_properties";
$cmd .= " >> " . escapeshellarg($EXPORT_FILE) . " & ";
$cmd .= $dumppfx . ' --where="form_id = \'' . add_escape_custom($layoutid) . '\' ORDER BY group_id, seq, title" ' .
escapeshellarg($sqlconf["dbase"]) . " layout_options" ;
$cmd .= " >> " . escapeshellarg($EXPORT_FILE) . " & ";
} else {
$cmd .= $dumppfx . " --where='grp_form_id = \"" . add_escape_custom($layoutid) . "\"' " .
escapeshellarg($sqlconf["dbase"]) . " layout_group_properties";
$cmd .= " >> " . escapeshellarg($EXPORT_FILE) . ";";
$cmd .= $dumppfx . " --where='form_id = \"" . add_escape_custom($layoutid) . "\" ORDER BY group_id, seq, title' " .
escapeshellarg($sqlconf["dbase"]) . " layout_options" ;
$cmd .= " >> " . escapeshellarg($EXPORT_FILE) . ";";
}
$cmd .= $dumppfx .
' --where="form_id = \'' . add_escape_custom($layoutid) . '\' ORDER BY group_id, seq, title" ' .
escapeshellarg($sqlconf["dbase"]) . " layout_options" ;
if (IS_WINDOWS) {
# windows uses the & to join statements.
$cmd .= " >> " . escapeshellarg($EXPORT_FILE) . " & ";
} else {
$cmd .= " >> " . escapeshellarg($EXPORT_FILE) . ";";
}
}
}
Expand Down
1 change: 1 addition & 0 deletions interface/themes/ajax_calendar_sass.scss
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ $side-calendar-date-padding: 0.3rem !default;
margin-left: auto;
margin-right: auto;
margin-top: 0.3rem;
max-height: 25vh;
width: 90%;

table {
Expand Down

0 comments on commit a00d6f8

Please sign in to comment.