Skip to content

Commit

Permalink
php 7.4 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bradymiller committed Sep 2, 2019
1 parent 16b1c0a commit 1ccaafc
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 27 deletions.
8 changes: 4 additions & 4 deletions interface/login/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ function transmit_form() {
}

if (count($result) == 1) {
$resvalue = $result[0]{"name"};
$resvalue = $result[0]["name"];
echo "<input type='hidden' name='authProvider' value='" . attr($resvalue) . "' />\n";
}

Expand All @@ -193,8 +193,8 @@ function transmit_form() {
}

if (count($result2) == 1) {
$defaultLangID = $result2[0]{"lang_id"};
$defaultLangName = $result2[0]{"lang_description"};
$defaultLangID = $result2[0]["lang_id"];
$defaultLangName = $result2[0]["lang_description"];
} else {
//default to english if any problems
$defaultLangID = 1;
Expand Down Expand Up @@ -308,7 +308,7 @@ function transmit_form() {
<select name="authProvider" class="form-control">
<?php
foreach ($result as $iter) {
echo "<option value='".attr($iter{"name"})."'>".text($iter{"name"})."</option>\n";
echo "<option value='".attr($iter["name"])."'>".text($iter["name"])."</option>\n";
}
?>
</select>
Expand Down
30 changes: 15 additions & 15 deletions interface/main/authorizations/authorizations.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@

if ($result1) {
foreach ($result1 as $iter) {
$authorize{$iter{"pid"}}{"billing"} .= "<span class=text>" .
text($iter{"code_text"} . " " . date("n/j/Y", strtotime($iter{"date"}))) .
$authorize[$iter["pid"]]["billing"] .= "<span class=text>" .
text($iter["code_text"] . " " . date("n/j/Y", strtotime($iter["date"]))) .
"</span><br>\n";
}
}
Expand All @@ -120,8 +120,8 @@

if ($result2) {
foreach ($result2 as $iter) {
$authorize{$iter{"pid"}}{"transaction"} .= "<span class=text>" .
text($iter{"title"} . ": " . (strterm($iter{"body"}, 25)) . " " . date("n/j/Y", strtotime($iter{"date"}))) .
$authorize[$iter["pid"]]["transaction"] .= "<span class=text>" .
text($iter["title"] . ": " . (strterm($iter["body"], 25)) . " " . date("n/j/Y", strtotime($iter["date"]))) .
"</span><br>\n";
}
}
Expand All @@ -137,8 +137,8 @@

if ($result3) {
foreach ($result3 as $iter) {
$authorize{$iter{"pid"}}{"pnotes"} .= "<span class=text>" .
text((strterm($iter{"body"}, 25)) . " " . date("n/j/Y", strtotime($iter{"date"}))) .
$authorize[$iter["pid"]]["pnotes"] .= "<span class=text>" .
text((strterm($iter["body"], 25)) . " " . date("n/j/Y", strtotime($iter["date"]))) .
"</span><br>\n";
}
}
Expand All @@ -154,8 +154,8 @@

if ($result4) {
foreach ($result4 as $iter) {
$authorize{$iter{"pid"}}{"forms"} .= "<span class=text>" .
text($iter{"form_name"} . " " . date("n/j/Y", strtotime($iter{"date"}))) .
$authorize[$iter["pid"]]["forms"] .= "<span class=text>" .
text($iter["form_name"] . " " . date("n/j/Y", strtotime($iter["date"]))) .
"</span><br>\n";
}
}
Expand Down Expand Up @@ -192,8 +192,8 @@
echo "<a href='$rootdir/patient_file/summary/demographics.php?set_pid=" .
attr_url($ppid) . "' target='RTop' onclick='top.restoreSession()'>";

echo "<span class='bold'>" . text($name{"fname"}) . " " .
text($name{"lname"}) . "</span></a><br>" .
echo "<span class='bold'>" . text($name["fname"]) . " " .
text($name["lname"]) . "</span></a><br>" .
"<a class=link_submit href='authorizations.php?mode=authorize" .
"&pid=" . attr_url($ppid) . "&csrf_token_form=" . attr_url(CsrfUtils::collectCsrfToken()) . "' onclick='top.restoreSession()'>" .
xlt('Authorize') . "</a></td>\n";
Expand All @@ -214,15 +214,15 @@
));

echo "<td valign=top><span class=bold>".xlt('Provider').":</span><span class=text><br>" .
text($providerName{"lname"}) . "</td>\n";
text($providerName["lname"]) . "</td>\n";
echo "<td valign=top><span class=bold>".xlt('Billing').":</span><span class=text><br>" .
$patient{"billing"} . "</td>\n";
$patient["billing"] . "</td>\n";
echo "<td valign=top><span class=bold>".xlt('Transactions').":</span><span class=text><br>" .
$patient{"transaction"} . "</td>\n";
$patient["transaction"] . "</td>\n";
echo "<td valign=top><span class=bold>".xlt('Patient Notes').":</span><span class=text><br>" .
$patient{"pnotes"} . "</td>\n";
$patient["pnotes"] . "</td>\n";
echo "<td valign=top><span class=bold>".xlt('Encounter Forms').":</span><span class=text><br>" .
$patient{"forms"} . "</td>\n";
$patient["forms"] . "</td>\n";
echo "</tr>\n";

$count++;
Expand Down
2 changes: 1 addition & 1 deletion interface/main/tabs/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ function setupI18n(lang_id) {
app_view_model.application_data.tabs.tabsList()[1].name(<?php echo json_encode($_SESSION['frame2target']); ?>);
<?php } ?>

app_view_model.application_data.user(new user_data_view_model(<?php echo json_encode($_SESSION{"authUser"})
app_view_model.application_data.user(new user_data_view_model(<?php echo json_encode($_SESSION["authUser"])
.',' . json_encode($userQuery['fname'])
.',' . json_encode($userQuery['lname'])
.',' . json_encode($_SESSION['authGroup']); ?>));
Expand Down
2 changes: 1 addition & 1 deletion library/calendar.inc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function toggleNoShow($cid)
{
$rez = sqlStatement("select noshow from calendar where id= ?", array($cid));
$row=sqlFetchArray($rez);
$oldnoshowval = $row{noshow};
$oldnoshowval = $row['noshow'];
$newnoshowval = !($oldnoshowval);
$query = "update calendar set noshow= ? where id= ?";
sqlStatement($query, [$newnoshowval, $cid]);
Expand Down
12 changes: 6 additions & 6 deletions library/patient.inc
Original file line number Diff line number Diff line change
Expand Up @@ -560,11 +560,11 @@ function getPatientLnames($term = "%", $given = "pid, id, lname, fname, mname, p
}

if (!empty($GLOBALS['pt_restrict_field'])) {
if ($_SESSION{"authUser"} != 'admin' || $GLOBALS['pt_restrict_admin']) {
if ($_SESSION["authUser"] != 'admin' || $GLOBALS['pt_restrict_admin']) {
$where .= " AND ( patient_data." . add_escape_custom($GLOBALS['pt_restrict_field']) .
" = ( SELECT facility_id FROM users WHERE username = ?) OR patient_data." .
add_escape_custom($GLOBALS['pt_restrict_field']) . " = '' ) ";
array_push($sqlBindArray, $_SESSION{"authUser"});
array_push($sqlBindArray, $_SESSION["authUser"]);
}
}

Expand Down Expand Up @@ -638,11 +638,11 @@ function getPatientId($pid = "%", $given = "pid, id, lname, fname, mname, provid
$where = "pubpid LIKE ? ";
array_push($sqlBindArray, $pid."%");
if (!empty($GLOBALS['pt_restrict_field']) && $GLOBALS['pt_restrict_by_id']) {
if ($_SESSION{"authUser"} != 'admin' || $GLOBALS['pt_restrict_admin']) {
if ($_SESSION["authUser"] != 'admin' || $GLOBALS['pt_restrict_admin']) {
$where .= "AND ( patient_data." . add_escape_custom($GLOBALS['pt_restrict_field']) .
" = ( SELECT facility_id FROM users WHERE username = ?) OR patient_data." .
add_escape_custom($GLOBALS['pt_restrict_field']) . " = '' ) ";
array_push($sqlBindArray, $_SESSION{"authUser"});
array_push($sqlBindArray, $_SESSION["authUser"]);
}
}

Expand Down Expand Up @@ -854,11 +854,11 @@ function getPatientDOB($DOB = "%", $given = "pid, id, lname, fname, mname", $ord
$where = "DOB like ? ";
array_push($sqlBindArray, $DOB."%");
if (!empty($GLOBALS['pt_restrict_field'])) {
if ($_SESSION{"authUser"} != 'admin' || $GLOBALS['pt_restrict_admin']) {
if ($_SESSION["authUser"] != 'admin' || $GLOBALS['pt_restrict_admin']) {
$where .= "AND ( patient_data." . add_escape_custom($GLOBALS['pt_restrict_field']) .
" = ( SELECT facility_id FROM users WHERE username = ?) OR patient_data." .
add_escape_custom($GLOBALS['pt_restrict_field']) . " = '' ) ";
array_push($sqlBindArray, $_SESSION{"authUser"});
array_push($sqlBindArray, $_SESSION["authUser"]);
}
}

Expand Down

0 comments on commit 1ccaafc

Please sign in to comment.