mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 05:23:21 +00:00
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:
@@ -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()
|
||||
|
Reference in New Issue
Block a user