Version 4.3.0

This commit is contained in:
Neo committed 2025-12-19 05:47:12 -08:00
1 parent 96997ddd8e
commit fe1acf984a
1349 files changed
+116159 -67711

No files matched your search

+11 -2
View File
@@ -46,7 +46,16 @@ class _Application extends \IPS\Application
switch ( $rule['archive_field'] )
{
case 'lastpost':
$clause = array( 'last_post' . $rule['archive_value'] . '?', \IPS\DateTime::create()->sub( new \DateInterval( 'P' . $rule['archive_text'] . mb_strtoupper( $rule['archive_unit'] ) ) )->getTimestamp() );
/* If the data is bad, log and don't throw an error, but don't allow anything to be archived. */
if( !$rule['archive_text'] OR !$rule['archive_unit'] )
{
\IPS\Log::log( 'Forum archiving missing time period or archive unit', 'forum_archive' );
$clause = array( '0=?', '1' );
}
else
{
$clause = array( '(last_post > 0 AND last_post' . $rule['archive_value'] . ' ?)', \IPS\DateTime::create()->sub( new \DateInterval( 'P' . trim( $rule['archive_text'] ) . mb_strtoupper( $rule['archive_unit'] ) ) )->getTimestamp() );
}
break;
case 'forum':
@@ -70,7 +79,7 @@ class _Application extends \IPS\Application
}
else
{
$clause = array( 'poll_state=0 or poll_state IS NULL' );
$clause = array( '(poll_state=0 or poll_state IS NULL)' );
}
break;