Version 5.0.0 beta 3
This commit is contained in:
1 parent
f61b0da85d
commit
e86153356a
108 files changed
+2927
-1573
No files matched your search
@@ -125,7 +125,7 @@ class Solved extends OverviewStatisticsAbstract
|
||||
$where = array( array( Db::i()->in( 'forum_id', explode( ',', Request::i()->nodes ) ) ) );
|
||||
}
|
||||
|
||||
$where[] = array( 'type=?', 'solved' );
|
||||
//$where[] = array( 'type=?', 'solved' );
|
||||
$where[] = array( Db::i()->in( 'forum_id', iterator_to_array( Db::i()->select( 'id', 'forums_forums', '(' . Db::i()->bitwiseWhere( Forum::$bitOptions['forums_bitoptions'], 'bw_enable_answers' ) . ') OR ( ' . Db::i()->bitwiseWhere( Forum::$bitOptions['forums_bitoptions'], 'bw_solved_set_by_moderator' ) . ' )' ) ) ) );
|
||||
|
||||
if( Request::i()->nodes )
|
||||
@@ -141,7 +141,12 @@ class Solved extends OverviewStatisticsAbstract
|
||||
{
|
||||
case 'percentagesolved':
|
||||
$total = Db::i()->select( 'COUNT(*)', 'forums_topics', $this->_modifyWhereClause( $where ) )->first();
|
||||
$solved = Db::i()->select( 'COUNT(*)', 'forums_topics', array_merge( $this->_modifyWhereClause( $where ), array( array( '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();
|
||||
|
||||
|
||||
$solvedWhere = $this->_modifyWhereClause( $where );
|
||||
$solvedWhere[] = [ 'core_solved_index.id is not null' ];
|
||||
$solvedWhere[] = [ 'type=?', 'solved' ];
|
||||
$solved = Db::i()->select( 'COUNT(*)', 'forums_topics', $solvedWhere )->join( 'core_solved_index', "core_solved_index.app='forums' AND core_solved_index.item_id=forums_topics.tid")->first();
|
||||
|
||||
$value = $total ? round( $solved / $total * 100, 2 ) : 0;
|
||||
|
||||
|
||||
Reference in new issue
Block a user