Skip to content

Commit

Permalink
fixed loading of scans and barcodes to stop freezing
Browse files Browse the repository at this point in the history
  • Loading branch information
seantomburke committed Feb 17, 2014
1 parent d24ca12 commit 82cdf08
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@
//set javascript after page is ready
$page->setJSInitial('
$("#barcode").focus();
loadBarcodes();
loadBarcodes()
');

$ticker_content .= '
Expand Down
2 changes: 2 additions & 0 deletions barcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions error_log
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 4 additions & 2 deletions javascript/escan.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ function loadBarcodes(){

if(data.scans.length > 0)
{
for(var i=0;i<data.scans.length; i++)
//reverse order
for(var i=data.scans.length-1;i>=0; i--)
{
appendBarcode(data.scans[i]);
};
Expand Down Expand Up @@ -72,7 +73,8 @@ function loadTicker(eid){

if(data.scans.length > 0)
{
for(var i=0;i<data.scans.length; i++)
//reverse order
for(var i=data.scans.length-1;i>=0; i--)
{
appendBarcode(data.scans[i]);
};
Expand Down
2 changes: 1 addition & 1 deletion scan.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
//set javascript after page is ready
$page->setJSInitial('
$("#barcode").focus();
loadTicker('.$scan['eid'].');
loadTicker('.$scan['eid'].')
');

$ticker_content .= '
Expand Down
2 changes: 2 additions & 0 deletions ticker.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 82cdf08

Please sign in to comment.