Version 4.5.0
This commit is contained in:
1 parent
1a0c7fd3c2
commit
f79dcf067a
3791 files changed
+248032
-76372
No files matched your search
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\widgets;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -40,14 +40,12 @@ class _stats extends \IPS\Widget\StaticCache
|
||||
/**
|
||||
* Specify widget configuration
|
||||
*
|
||||
* @param \IPS\Helpers\Form|NULL $form Form helper
|
||||
* @return null|\IPS\Helpers\Form
|
||||
*/
|
||||
public function configuration( &$form=null )
|
||||
{
|
||||
if ( $form === null )
|
||||
{
|
||||
$form = new \IPS\Helpers\Form;
|
||||
}
|
||||
$form = parent::configuration( $form );
|
||||
|
||||
$mostOnline = json_decode( \IPS\Settings::i()->most_online, TRUE );
|
||||
$form->add( new \IPS\Helpers\Form\Number( 'stats_most_online', $mostOnline['count'], TRUE ) );
|
||||
@@ -87,7 +85,7 @@ class _stats extends \IPS\Widget\StaticCache
|
||||
$mostOnline = json_decode( \IPS\Settings::i()->most_online, TRUE );
|
||||
|
||||
/* fetch only successful registered members ; if this needs to be changed, please review the other areas where we have the name<>? AND email<>? condition */
|
||||
$where = array( 'name<>? AND email<>?', '', '' );
|
||||
$where = array( 'completed=?', true );
|
||||
|
||||
/* Member count */
|
||||
$stats['member_count'] = \IPS\Db::i()->select( 'COUNT(*)', 'core_members', $where )->first();
|
||||
@@ -102,7 +100,7 @@ class _stats extends \IPS\Widget\StaticCache
|
||||
$stats['most_online'] = $mostOnline;
|
||||
|
||||
/* Last Registered Member */
|
||||
$where = array( array( "name IS NOT NULL AND name != '' AND temp_ban != -1 AND email != ''" ) );
|
||||
$where = array( array( "completed=1 AND temp_ban != -1" ) );
|
||||
$where[] = array( '( ! ' . \IPS\Db::i()->bitwiseWhere( \IPS\Member::$bitOptions['members_bitoptions'], 'bw_is_spammer' ) . ' )' );
|
||||
$where[] = array( 'member_id NOT IN(?)', \IPS\Db::i()->select( 'member_id', 'core_validating', array( 'new_reg=1' ) ) );
|
||||
|
||||
|
||||
Reference in new issue
Block a user