Version 4.7.13
This commit is contained in:
1 parent
fd22d99e69
commit
7124a02564
954 files changed
+29277
-59308
No files matched your search
@@ -102,8 +102,13 @@ class _solvedNotifications extends \IPS\Task
|
||||
|
||||
if ( $topic->canView( $topic->author() ) )
|
||||
{
|
||||
$replies = $topic->comments( 4, 0, 'date', 'asc' );
|
||||
$firstPost = array_shift( $replies );
|
||||
$firstPost = $topic->comments( 1, 0, 'date', 'asc' );
|
||||
$replies = $topic->comments( 3, 0, 'date', 'asc', NULL, NULL, NULL, array( 'author_id !=?', $topic->author()->member_id ) );
|
||||
|
||||
if( !count( $replies ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
\IPS\Email::buildFromTemplate( 'core', 'solved_reengagement', array($topic, $firstPost, $replies), \IPS\Email::TYPE_TRANSACTIONAL )->send( $topic->author() );
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ class _solvedStatsAggregation extends \IPS\Task
|
||||
|
||||
$total = \IPS\Db::i()->select( 'COUNT(*)', 'forums_topics', $where )->first();
|
||||
$solved = \IPS\Db::i()->select( 'COUNT(*)', 'forums_topics', array_merge( $where, [ [ 'core_solved_index.id IS NOT NULL' ] ] ) )->join( 'core_solved_index', "core_solved_index.app='forums' AND core_solved_index.item_id=forums_topics.tid")->first();
|
||||
$avg = \IPS\Db::i()->select( 'AVG(core_solved_index.solved_date-forums_topics.start_date)', 'forums_topics', array_merge( $where, [ [ 'core_solved_index.id IS NOT NULL' ] ] ) )->join( 'core_solved_index', "core_solved_index.app='forums' AND core_solved_index.item_id=forums_topics.tid")->first();
|
||||
$avg = \IPS\Db::i()->select( 'AVG(CAST(core_solved_index.solved_date AS SIGNED)-forums_topics.start_date)', 'forums_topics', array_merge( $where, [ [ 'core_solved_index.id IS NOT NULL' ] ] ) )->join( 'core_solved_index', "core_solved_index.app='forums' AND core_solved_index.item_id=forums_topics.tid")->first();
|
||||
|
||||
\IPS\Db::i()->delete( 'core_statistics', [ 'type=? and time=? and value_1=?', 'solved', $end->getTimestamp(), $forum['id'] ] );
|
||||
\IPS\Db::i()->insert( 'core_statistics', [
|
||||
|
||||
Reference in new issue
Block a user