Restrict search on visible private fields

Search on private fields is only supported on bare text search right now (TextNode).
This also fix and issue on databox::get_collection_unique_ids() returning the
value from the first call over and over.
This commit is contained in:
Mathieu Darse
2015-07-03 14:33:48 +02:00
parent 6e52421437
commit e4aafaac10
5 changed files with 131 additions and 19 deletions

View File

@@ -232,10 +232,10 @@ class databox extends base
public function get_collection_unique_ids()
{
static $base_ids;
static $base_ids_cache = [];
if (isset($base_ids)) {
return $base_ids;
if (isset($base_ids_cache[$this->id])) {
return $base_ids_cache[$this->id];
}
$conn = $this->get_appbox()->get_connection();
@@ -250,7 +250,7 @@ class databox extends base
$base_ids[] = (int) $row['base_id'];
}
return $base_ids;
return $base_ids_cache[$this->id] = $base_ids;
}
protected function get_available_collections()