Version 4.7.8

This commit is contained in:
Neo committed 2025-12-19 16:10:42 -08:00
1 parent 7b7404e741
commit fd22d99e69
688 files changed
+19814 -10890

No files matched your search

@@ -276,6 +276,11 @@ class _category extends \IPS\cms\Databases\Controller
$table->hover = TRUE;
$table->sortBy = ( isset( \IPS\Request::i()->sortby ) ) ? \IPS\Request::i()->sortby : ( $database->field_sort ? $RecordsClass::$databaseTable . '.' . $RecordsClass::$databasePrefix . $database->field_sort : 'record_last_comment' );
$table->sortDirection = ( isset( \IPS\Request::i()->sortdirection ) ) ? \IPS\Request::i()->sortdirection : ( $database->field_direction ? $database->field_direction : 'desc' );
if ( $database->field_sort )
{
$table->defaultSortBy = $RecordsClass::$databasePrefix . $database->field_sort;
$table->defaultSortDirection = $database->field_direction;
}
$table->limit = $database->field_perpage ? $database->field_perpage : 25;
$table->title = \IPS\Member::loggedIn()->language()->addToStack( $database->use_categories ? 'x_records_in_this_category' : 'x_records' , FALSE, array( 'sprintf' => array( $category->_items, $database->recordWord( $category->_items ) ) ) );
@@ -91,13 +91,22 @@ class _record extends \IPS\Content\Controller
{
$form = new \IPS\Helpers\Form( 'update_record', 'update', $record->url()->setQueryString( array( 'd' => $record::$customDatabaseId ) ) );
$form->class = 'ipsForm_vertical';
$hasAdditionalFields = false;
foreach( $updateFields as $id => $field )
{
$form->add( $field );
if( $id != $record::database()->field_title AND $id != $record::database()->field_content )
{
$hasAdditionalFields = true;
}
}
$form->add( new \IPS\Helpers\Form\Checkbox( 'record_display_field_change', TRUE, FALSE ) );
/* The comment is only added for fields that are NOT the title/content. So don't show this checkbox if the only field available is one of those. */
if( $hasAdditionalFields AND $record->canComment() )
{
$form->add( new \IPS\Helpers\Form\Checkbox( 'record_display_field_change', TRUE, FALSE ) );
}
if ( $values = $form->values() )
{
@@ -115,7 +124,7 @@ class _record extends \IPS\Content\Controller
if ( \count( $customValues ) )
{
if ( $values['record_display_field_change'] )
if ( isset( $values['record_display_field_change'] ) AND $values['record_display_field_change'] )
{
$record->addCommentWhenFiltersChanged( $values );
}
@@ -132,7 +141,7 @@ class _record extends \IPS\Content\Controller
}
/* Send custom field update notifications */
if ( !$values['record_display_field_change'] )
if ( !isset( $values['record_display_field_change'] ) OR !$values['record_display_field_change'] )
{
$record->sendFieldQuoteAndMentionNotifications();
}