Version 4.7.6

This commit is contained in:
Neo committed 2025-12-19 16:05:19 -08:00
1 parent 8ba7d43898
commit 7b7404e741
1085 files changed
+30590 -7837

No files matched your search

+25
View File
@@ -227,6 +227,8 @@ class _cleanup extends \IPS\Task
\IPS\Db::i()->delete( 'core_members_known_devices', array( 'last_seen < ?', \IPS\DateTime::create()->sub( new \DateInterval( 'P' . \IPS\Settings::i()->prune_known_devices . 'D' ) )->getTimestamp() ) );
}
\IPS\Db::i()->delete( 'core_item_member_map', array( 'map_latest_date < ?', \IPS\DateTime::create()->sub( new \DateInterval( 'P9M' ) )->getTimestamp() ) );
/* Delete moved links */
if ( \IPS\Settings::i()->topic_redirect_prune )
{
@@ -304,6 +306,29 @@ class _cleanup extends \IPS\Task
/* Delete alerts */
\IPS\Db::i()->delete( 'core_alerts', array( 'alert_end > 0 and alert_end < ?', time() ) );
/* Trigger queue item to prune old PMs with no replies in x days */
if( \IPS\Settings::i()->prune_pms )
{
/* Get count */
$rows = new \IPS\Patterns\ActiveRecordIterator( \IPS\Db::i()->select( '*', 'core_message_topics', array( 'mt_last_post_time < ?', \IPS\DateTime::create()->sub( new \DateInterval( 'P' . \IPS\Settings::i()->prune_pms . 'D' ) )->getTimestamp() ) ), '\IPS\core\Messenger\Conversation');
$count = $rows->count();
if( $count > 5 )
{
/* Queue */
\IPS\Task::queue( 'core', 'PrunePms', array(), 2 );
}
else
{
/* Loop and delete now */
foreach ( $rows as $conversation )
{
$conversation->delete();
}
}
}
/* Truncate the output caches table */
\IPS\Output\Cache::i()->deleteExpired( TRUE );
+3 -2
View File
@@ -60,11 +60,12 @@ class _webhooks extends \IPS\Task
->setHeaders(
[
'User-Agent' => "InvisionCommunity/" . \IPS\Application::load('core')->long_version ,
'Webhook-Event' => $fire['event']
'Webhook-Event' => $fire['event'],
'Content-Type' => $webhooks[ $fire['webhook'] ]['content_type']
]
)
->login( $webhooks[ $fire['webhook'] ]['api_key'], '' )->post( $fire['data'] );
if ( \IPS\Settings::i()->webhook_logs_success )
{
\IPS\Db::i()->update( 'core_api_webhook_fires', [