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 _members 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 );
|
||||
|
||||
/* Block title */
|
||||
$form->add( new \IPS\Helpers\Form\Text( 'widget_member_title', isset( $this->configuration['widget_member_title'] ) ? $this->configuration['widget_member_title'] : \IPS\Member::loggedIn()->language()->addToStack( 'widget_member_title_default' ) ) );
|
||||
@@ -120,7 +118,7 @@ class _members extends \IPS\Widget\StaticCache
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
$where = array( array( '(name<>? and email<>?)', '', '' ) );
|
||||
$where = array( array( 'completed=?', true ) );
|
||||
$joins = array();
|
||||
|
||||
if ( ! empty( $this->configuration['widget_member_groups'] ) AND $this->configuration['widget_member_groups'] !== '*' )
|
||||
@@ -145,7 +143,7 @@ class _members extends \IPS\Widget\StaticCache
|
||||
$where[] = array( 'pp_reputation_points >= ?', $this->configuration['widget_member_rep'] );
|
||||
}
|
||||
|
||||
if ( ! empty( $this->configuration['widget_member_online'] ) )
|
||||
if ( ! empty( $this->configuration['widget_member_online'] ) OR !isset( $this->configuration['widget_member_online'] ) )
|
||||
{
|
||||
$where[] = array( 'last_activity > ?', \IPS\DateTime::create()->sub( new \DateInterval( 'PT30M' ) )->getTimeStamp() );
|
||||
}
|
||||
@@ -221,7 +219,7 @@ class _members extends \IPS\Widget\StaticCache
|
||||
( isset( $this->configuration['widget_member_show'] ) and $this->configuration['widget_member_show'] !== -1 ) ? array( 0, $this->configuration['widget_member_show'] ) : 100
|
||||
);
|
||||
|
||||
if ( count( $joins ) )
|
||||
if ( \count( $joins ) )
|
||||
{
|
||||
foreach( $joins as $join )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user