From 2fee39afc265e352a5d9ee8fdb5315dc169a050d Mon Sep 17 00:00:00 2001 From: bradymiller Date: Fri, 13 May 2011 01:15:13 -0700 Subject: [PATCH] Minor bug fixes to the Encounter Paging feature --- interface/patient_file/history/encounters.php | 21 +++++++++------------ library/globals.inc.php | 10 +++++++++- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/interface/patient_file/history/encounters.php b/interface/patient_file/history/encounters.php index e5ce3f937..dee8cdb67 100644 --- a/interface/patient_file/history/encounters.php +++ b/interface/patient_file/history/encounters.php @@ -184,10 +184,7 @@ function changePageSize() pagestart=$(this).attr("pagestart"); issue=$(this).attr("issue"); pagesize=$(this).val(); - if(pagesize=="ALL") - { - pagesize=0; - } + top.restoreSession(); window.location.href="encounters.php?billing="+billing+"&issue="+issue+"&pagestart="+pagestart+"&pagesize="+pagesize; } window.onload=function() @@ -257,13 +254,13 @@ $getStringForPage="&pagesize=".$pagesize."&pagestart=".$pagestart; - Results per page: - "; @@ -274,7 +271,7 @@ $getStringForPage="&pagesize=".$pagesize."&pagestart=".$pagestart; } if($pagesizes[$idx]==0) { - echo "ALL"; + echo htmlspecialchars( xl('ALL'), ENT_NOQUOTES); } else { @@ -365,7 +362,7 @@ $numRes = $count['c']; if($pagesize>0) { - $query .= " LIMIT ".$pagestart.",".$pagesize; + $query .= " LIMIT " . add_escape_custom($pagestart) . "," . add_escape_custom($pagesize); } $upper = $pagestart+$pagesize; if(($upper>$numRes) || ($pagesize==0)) @@ -376,12 +373,12 @@ if(($upper>$numRes) || ($pagesize==0)) if(($pagesize > 0) && ($pagestart>0)) { - generatePageElement($pagestart-$pagesize,$pagesize,$billing_view,$issue,"⇐".xl("Prev")." "); + generatePageElement($pagestart-$pagesize,$pagesize,$billing_view,$issue,"⇐" . htmlspecialchars( xl("Prev"), ENT_NOQUOTES) . " "); } -echo ($pagestart + 1)."-".$upper." of " .$numRes; +echo ($pagestart + 1)."-".$upper." " . htmlspecialchars( xl('of'), ENT_NOQUOTES) . " " .$numRes; if(($pagesize>0) && ($pagestart+$pagesize <= $numRes)) { - generatePageElement($pagestart+$pagesize,$pagesize,$billing_view,$issue," ".xl("Next")."⇒"); + generatePageElement($pagestart+$pagesize,$pagesize,$billing_view,$issue," " . htmlspecialchars( xl("Next"), ENT_NOQUOTES) . "⇒"); } diff --git a/library/globals.inc.php b/library/globals.inc.php index 804491c69..1e4fd13dd 100644 --- a/library/globals.inc.php +++ b/library/globals.inc.php @@ -202,7 +202,15 @@ $GLOBALS_METADATA = array( 'encounter_page_size' => array( xl('Encounter Page Size'), - 'num', + array( + '0' => xl('Show All'), + '5' => '5', + '10' => '10', + '15' => '15', + '20' => '20', + '25' => '25', + '50' => '50', + ), '20', xl('Number of encounters to display per page.') ) -- 2.11.4.GIT