From 82cdf08b36887852af2bf3e5ba68b1c18a210530 Mon Sep 17 00:00:00 2001 From: Sean Burke Date: Mon, 17 Feb 2014 01:59:44 -0500 Subject: [PATCH] fixed loading of scans and barcodes to stop freezing --- admin.php | 2 +- barcodes.php | 2 ++ error_log | 5 +++++ javascript/escan.js | 6 ++++-- scan.php | 2 +- ticker.php | 2 ++ 6 files changed, 15 insertions(+), 4 deletions(-) diff --git a/admin.php b/admin.php index c45504e..fa4f050 100644 --- a/admin.php +++ b/admin.php @@ -598,7 +598,7 @@ //set javascript after page is ready $page->setJSInitial(' $("#barcode").focus(); - loadBarcodes(); + loadBarcodes() '); $ticker_content .= ' diff --git a/barcodes.php b/barcodes.php index 494346b..cc51c0c 100644 --- a/barcodes.php +++ b/barcodes.php @@ -8,6 +8,8 @@ $scan[$key] = trim(strip_tags($value)); } +$limit = ($_GET['view'] == 'all') ? '':'LIMIT 5'; + $sql = 'SELECT barcodes.*, users.name, users.ucinetid, users.major, users.level FROM barcodes LEFT JOIN users ON barcodes.ucinetid = users.ucinetid diff --git a/error_log b/error_log index 9c06f9d..32b4da2 100644 --- a/error_log +++ b/error_log @@ -218,3 +218,8 @@ [06-Feb-2014 22:55:42] PHP Stack trace: [06-Feb-2014 22:55:42] PHP 1. {main}() /var/lib/stickshift/52e920f45973cab77b0003aa/app-root/data/730921/statistics.php:0 [10-Feb-2014 04:55:28] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/soap.so' - /usr/lib64/php/modules/soap.so: undefined symbol: php_libxml_disable_entity_loader in Unknown on line 0 +[17-Feb-2014 01:19:43] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/soap.so' - /usr/lib64/php/modules/soap.so: undefined symbol: php_libxml_disable_entity_loader in Unknown on line 0 +[17-Feb-2014 01:34:33] PHP Parse error: syntax error, unexpected ';' in /var/lib/stickshift/52e920f45973cab77b0003aa/app-root/data/730921/admin.php on line 601 +[17-Feb-2014 01:34:48] PHP Parse error: syntax error, unexpected ';' in /var/lib/stickshift/52e920f45973cab77b0003aa/app-root/data/730921/admin.php on line 601 +[17-Feb-2014 01:34:51] PHP Parse error: syntax error, unexpected ';' in /var/lib/stickshift/52e920f45973cab77b0003aa/app-root/data/730921/admin.php on line 601 +[17-Feb-2014 01:35:08] PHP Parse error: syntax error, unexpected ';' in /var/lib/stickshift/52e920f45973cab77b0003aa/app-root/data/730921/scan.php on line 164 diff --git a/javascript/escan.js b/javascript/escan.js index 4732200..017cb65 100644 --- a/javascript/escan.js +++ b/javascript/escan.js @@ -36,7 +36,8 @@ function loadBarcodes(){ if(data.scans.length > 0) { - for(var i=0;i=0; i--) { appendBarcode(data.scans[i]); }; @@ -72,7 +73,8 @@ function loadTicker(eid){ if(data.scans.length > 0) { - for(var i=0;i=0; i--) { appendBarcode(data.scans[i]); }; diff --git a/scan.php b/scan.php index f4e0cdf..1436c5a 100644 --- a/scan.php +++ b/scan.php @@ -161,7 +161,7 @@ //set javascript after page is ready $page->setJSInitial(' $("#barcode").focus(); - loadTicker('.$scan['eid'].'); + loadTicker('.$scan['eid'].') '); $ticker_content .= ' diff --git a/ticker.php b/ticker.php index b21b197..dad609a 100644 --- a/ticker.php +++ b/ticker.php @@ -8,6 +8,8 @@ $scan[$key] = trim(strip_tags($value)); } +$limit = ($_GET['view'] == 'all') ? '':'LIMIT 5'; + if($scan['eid']) { $sql = 'SELECT barcodes.barcode, scans.*, users.name, users.ucinetid, users.major, users.level