Version 3.2.3
This commit is contained in:
1 parent
ae5c01cc78
commit
78706903a2
2641 files changed
+228363
-201264
No files matched your search
@@ -3,19 +3,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Member stats functions
|
||||
* Last Updated: $Date: 2010-10-18 17:06:14 -0400 (Mon, 18 Oct 2010) $
|
||||
* Last Updated: $Date: 2011-05-12 17:45:20 -0400 (Thu, 12 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @link http://hatynka.in
|
||||
* @since 20th February 2002
|
||||
* @version $Revision: 6991 $
|
||||
* @version $Revision: 8752 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -45,7 +45,7 @@ class public_forums_extras_stats extends ipsCommand
|
||||
* Class entry point
|
||||
*
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen/redirects]
|
||||
* @return @e void [Outputs to screen/redirects]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
@@ -108,12 +108,14 @@ class public_forums_extras_stats extends ipsCommand
|
||||
|
||||
/* Ok, so the group by causes a temp table then filesort which can be slow but alternative is to loop over all
|
||||
posts and sort in PHP which could be slower when hundreds of replies so we get a bit smart about it */
|
||||
|
||||
|
||||
$_queued = $this->registry->class_forums->fetchPostHiddenQuery( array( 'visible' ), '' );
|
||||
|
||||
if ( $topic['posts'] >= 100 )
|
||||
{
|
||||
$this->DB->build( array( 'select' => 'COUNT(pid) as pcount, author_id',
|
||||
'from' => 'posts',
|
||||
'where' => "topic_id={$tid} AND queued=0",
|
||||
'where' => "topic_id={$tid} AND " . $_queued,
|
||||
'group' => 'author_id',
|
||||
'order' => 'pcount DESC' ) );
|
||||
|
||||
@@ -137,10 +139,10 @@ class public_forums_extras_stats extends ipsCommand
|
||||
{
|
||||
$_tmp = array();
|
||||
$_tmp2 = array();
|
||||
|
||||
|
||||
$this->DB->build( array( 'select' => 'author_id',
|
||||
'from' => 'posts',
|
||||
'where' => "topic_id={$tid} AND queued=0" ) );
|
||||
'where' => "topic_id={$tid} AND " . $_queued ) );
|
||||
|
||||
$this->DB->execute();
|
||||
|
||||
@@ -202,7 +204,7 @@ class public_forums_extras_stats extends ipsCommand
|
||||
// Guests
|
||||
//-----------------------------------------
|
||||
|
||||
$guests = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as guest_posts', 'from' => 'posts', 'where' => "topic_id={$tid} AND queued=0 AND author_id=0" ) );
|
||||
$guests = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as guest_posts', 'from' => 'posts', 'where' => "topic_id={$tid} AND {$_queued} AND author_id=0" ) );
|
||||
|
||||
if( $guests['guest_posts'] )
|
||||
{
|
||||
@@ -235,7 +237,7 @@ class public_forums_extras_stats extends ipsCommand
|
||||
*
|
||||
* @param integer Topic id
|
||||
* @param boolean Return on error instead of printing
|
||||
* @return void [Prints error if you cannot access]
|
||||
* @return @e void [Prints error if you cannot access]
|
||||
*/
|
||||
protected function _checkAccess( $tid, $returnOnError=false )
|
||||
{
|
||||
@@ -277,7 +279,7 @@ class public_forums_extras_stats extends ipsCommand
|
||||
/**
|
||||
* Show the forum leaders
|
||||
*
|
||||
* @return void [Outputs to screen]
|
||||
* @return @e void [Outputs to screen]
|
||||
*/
|
||||
protected function _showLeaders()
|
||||
{
|
||||
@@ -319,7 +321,7 @@ class public_forums_extras_stats extends ipsCommand
|
||||
{
|
||||
$group_ids[ $i['group_id'] ] = $i['group_id'];
|
||||
}
|
||||
else
|
||||
else if( $i['member_id'] )
|
||||
{
|
||||
$member_ids[ $i['member_id'] ] = $i['member_id'];
|
||||
}
|
||||
@@ -509,7 +511,7 @@ class public_forums_extras_stats extends ipsCommand
|
||||
}
|
||||
}
|
||||
}
|
||||
else if( array_key_exists( $member['member_id'], $moderators ) && ( ($data['is_group'] and $data['group_id'] == $member['member_group_id']) || $data['member_id'] == $member['member_id'] ) )
|
||||
else if( isset( $moderators[ $member['member_id'] ] ) && ( ($data['is_group'] and $data['group_id'] == $member['member_group_id']) || $data['member_id'] == $member['member_id'] ) )
|
||||
{
|
||||
$moderators[ $member['member_id'] ]['forums'][ $data['forum_id'] ] = $data['forum_id'];
|
||||
}
|
||||
@@ -555,7 +557,7 @@ class public_forums_extras_stats extends ipsCommand
|
||||
* Critical function to show the database queries
|
||||
* ...or is it...
|
||||
*
|
||||
* @return void [Outputs image to screen]
|
||||
* @return @e void [Outputs image to screen]
|
||||
*/
|
||||
private function _showQueries()
|
||||
{
|
||||
@@ -584,7 +586,7 @@ class public_forums_extras_stats extends ipsCommand
|
||||
/**
|
||||
* Show today's top posters
|
||||
*
|
||||
* @return void [Outputs to screen]
|
||||
* @return @e void [Outputs to screen]
|
||||
*/
|
||||
protected function _showTodaysPosters()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user