Commit 2ef9f50b authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Elasticsearch: Respect "deleted" flags on elasticsearch indexed data"

parents ed0397b3 203f3473
......@@ -71,7 +71,7 @@ class ElasticsearchType_group extends ElasticsearchType
public static function getRecordById($type, $id){
$record = parent::getRecordById($type, $id);
if (!$record) {
if (!$record || $record->deleted) {
return false;
}
$record->sort = strtolower(strip_tags($record->name));
......
......@@ -85,7 +85,7 @@ class ElasticsearchType_interaction_forum_post extends ElasticsearchType
WHERE p.id = ?';
$record = get_record_sql($sql, array($id));
if (!$record) {
if (!$record || $record->deleted) {
return false;
}
......@@ -109,7 +109,7 @@ class ElasticsearchType_interaction_forum_post extends ElasticsearchType
WHERE p1.id = ?';
$record = get_record_sql($sql, array($id));
if (!$record) {
if (!$record || $record->deleted) {
return false;
}
......
......@@ -83,7 +83,7 @@ class ElasticsearchType_interaction_instance extends ElasticsearchType
public static function getRecordById($type, $id){
$record = parent::getRecordById($type, $id);
if (!$record) {
if (!$record || $record->deleted) {
return false;
}
......@@ -94,4 +94,13 @@ class ElasticsearchType_interaction_instance extends ElasticsearchType
$record->sort = strtolower(strip_tags($record->title));
return $record;
}
public static function getRecordDataById($type, $id) {
$record = parent::getRecordDataById($type, $id);
if (!$record || $record->deleted) {
return false;
}
return $record;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment