dbjson : the keys are the _id (no more N² searches)

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2649 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2016-03-05 16:10:40 +00:00
parent 29007c5afa
commit 089707e88f
2 changed files with 64 additions and 56 deletions

View File

@@ -243,7 +243,7 @@ class dbjson
if (count ($keys) === 0)
return 0;
reset ($keys);
$key = key ($keys);
$key = reset ($keys);
unset ($this->db[$collection]["content"][$key]);
$this->writeDB ();
$this->lockUN ();