partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

commit 01ccda027bb9e2a0192e1567c4585700aa4ad4a8
parent f7859ae1bb1c5499945c6b147516127163dc2e5e
Author: Felicitus <privat@timohummel.com>
Date:   Thu,  9 Jun 2011 21:12:22 +0200

Flush more often during setup, fixed jslint warning

Diffstat:
Mfrontend/js/Components/Part/PartEditorWindow.js | 5++---
Mtesting/SetupDatabase.php | 11++++++++++-
2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/frontend/js/Components/Part/PartEditorWindow.js b/frontend/js/Components/Part/PartEditorWindow.js @@ -39,6 +39,6 @@ Ext.define('PartDB2.PartEditorWindow', { this.editor.partDistributorGrid.getStore().loadData(r.distributors); this.editor.partManufacturerGrid.getStore().loadData(r.manufacturers); - this.editor.partParameterGrid.getStore().loadData(r.parameters) + this.editor.partParameterGrid.getStore().loadData(r.parameters); } -});- \ No newline at end of file +}); diff --git a/testing/SetupDatabase.php b/testing/SetupDatabase.php @@ -243,6 +243,9 @@ PartDB2::getEM()->flush(); $r = mysql_query("SELECT * FROM parts"); $aRandomUnitNames = array("Spannung", "Strom", "Leitfähigkeit", "Viskosität", "Nessis"); + +$fc=0; + while ($part = mysql_fetch_assoc($r)) { $oPart = new Part(); $oPart->setName(convertText($part["name"])); @@ -292,7 +295,13 @@ while ($part = mysql_fetch_assoc($r)) { $oPartParameter->setValue($val); PartDB2::getEM()->persist($oPartParameter); } - + + $fc++; + + if ($fc>100) { + PartDB2::getEM()->flush(); + $fc=0; + } }