Version 5.0.6

This commit is contained in:
Neo committed 2025-12-19 18:55:49 -08:00
1 parent a3a4a9ccbd
commit b89858b2ff
1214 files changed
+92828 -14859

No files matched your search

+10 -4
View File
@@ -119,8 +119,14 @@ class Index extends SearchIndex
$resetLastComment = TRUE;
}
else if ( $indexData['index_is_last_comment'] and $indexData['index_item_id'] )
else if ( $indexData['index_hidden'] !== 0 or ( $indexData['index_is_last_comment'] and $indexData['index_item_id'] ) )
{
if ( $indexData['index_hidden'] !== 0 )
{
/* We've hidden a comment, so we need to reset the last comment flag */
$resetLastComment = true;
}
$classes = array( $class );
/* If this is the latest comment, unflag what was set before on both item and comment */
@@ -248,9 +254,9 @@ class Index extends SearchIndex
* Retrieve the search ID for an item
*
* @param Content $object Item to add
* @return mixed
* @return string
*/
public function getIndexId( Content $object ): mixed
public function getIndexId( Content $object ): string
{
$databaseColumnId = $object::$databaseColumnId;
return Db::i()->select( 'index_id', 'core_search_index', array( 'index_class=? AND index_object_id=?', get_class( $object ),$object->$databaseColumnId ) )->first();
@@ -598,7 +604,7 @@ class Index extends SearchIndex
Db::i()->update( 'core_search_index', array( 'index_is_last_comment' => 0 ), array( Db::i()->in( 'index_class', $classes ) . ' AND index_item_id=? AND index_is_last_comment=1', $indexItemId ) );
try
{
$latest = Db::i()->select( 'index_object_id, index_date_updated, index_class', 'core_search_index', array( Db::i()->in( 'index_class', $classes ) . ' AND index_item_id=? and index_hidden=0', $indexItemId ), 'index_date_created DESC', array( 0, 1 ) )->first();
$latest = Db::i()->select( 'index_object_id, index_date_updated, index_class, index_date_commented', 'core_search_index', array( Db::i()->in( 'index_class', $classes ) . ' AND index_item_id=? and index_hidden=0', $indexItemId ), 'index_date_created DESC', array( 0, 1 ) )->first();
}
catch( Exception )
{