Version 4.7.23
This commit is contained in:
1 parent
7124a02564
commit
25ddeb65d6
1791 files changed
+76990
-44452
No files matched your search
@@ -578,7 +578,7 @@ class _Club extends \IPS\Patterns\ActiveRecord implements \IPS\Content\Embeddabl
|
||||
/* Update purchases for commission */
|
||||
if( \IPS\Application::appIsEnabled( 'nexus' ) and \IPS\Settings::i()->clubs_paid_on )
|
||||
{
|
||||
\IPS\Db::i()->update( 'nexus_purchases', array( 'ps_pay_to' => $this->owner ), array( "ps_pay_to IS NOT NULL and ps_app=? and ps_type=? and ps_item_id=?", 'core', 'club', $this->id ) );
|
||||
\IPS\Db::i()->update( 'nexus_purchases', array( 'ps_pay_to' => $this->owner->member_id ), array( "ps_pay_to IS NOT NULL and ps_app=? and ps_type=? and ps_item_id=?", 'core', 'club', $this->id ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1403,11 +1403,32 @@ class _Club extends \IPS\Patterns\ActiveRecord implements \IPS\Content\Embeddabl
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Make sure the class exists. This can happen in the case of Pages databases/categories */
|
||||
if( !class_exists( $row['node_class'] ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
$node = $row['node_class']::load( $row['node_id'] );
|
||||
|
||||
if ( \class_exists( '\\IPS\\cms\\Categories' ) and $node instanceof \IPS\cms\Categories and !( \class_exists( '\\IPS\\cms\\Pages\\Page' ) and \IPS\cms\Pages\Page::loadByDatabaseId( $node->database()->_id ) ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if( $node instanceof \IPS\cms\Categories )
|
||||
{
|
||||
if( !$node->canView() )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$this->cachedNodes[ $row['id'] ] = array(
|
||||
'name' => $row['name'],
|
||||
'url' => $row['node_class']::load( $row['node_id'] )->url(),
|
||||
'url' => $node->url(),
|
||||
'node_class' => $row['node_class'],
|
||||
'node_id' => $row['node_id'],
|
||||
'public' => $row['public']
|
||||
@@ -1417,10 +1438,8 @@ class _Club extends \IPS\Patterns\ActiveRecord implements \IPS\Content\Embeddabl
|
||||
{
|
||||
\IPS\Log::log( 'Missing club node ' . $row['node_class'] . ' ' . $row['node_id'] . " is being loaded.", 'club_nodes');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return $this->cachedNodes;
|
||||
}
|
||||
|
||||
@@ -2058,7 +2077,7 @@ class _Club extends \IPS\Patterns\ActiveRecord implements \IPS\Content\Embeddabl
|
||||
}
|
||||
|
||||
/* Members */
|
||||
if ( $this->show_membertab == 'member' AND \in_array( $this->memberStatus( $member ), array( \IPS\Member\Club::STATUS_MEMBER, \IPS\Member\Club::STATUS_INVITED, \IPS\Member\Club::STATUS_INVITED_BYPASSING_PAYMENT, \IPS\Member\Club::STATUS_EXPIRED, \IPS\Member\Club::STATUS_EXPIRED_MODERATOR ) ) )
|
||||
if ( $this->show_membertab == 'member' AND \in_array( $this->memberStatus( $member ), array( \IPS\Member\Club::STATUS_MEMBER, \IPS\Member\Club::STATUS_MODERATOR, \IPS\Member\Club::STATUS_INVITED, \IPS\Member\Club::STATUS_INVITED_BYPASSING_PAYMENT, \IPS\Member\Club::STATUS_EXPIRED, \IPS\Member\Club::STATUS_EXPIRED_MODERATOR ) ) )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user