Version 4.7.0

This commit is contained in:
Neo committed 2025-12-19 16:00:35 -08:00
1 parent 517a5e1f70
commit 8ba7d43898
1933 files changed
+65613 -11332

No files matched your search

@@ -96,7 +96,7 @@ class _Subscription extends \IPS\core\Achievements\Actions\AbstractAchievementAc
{
if ( isset( $filters['subscriptions'] ) )
{
if ( !\in_array( $extra->_id, $filters['subscriptions'] ) )
if ( !\in_array( $extra->package_id, $filters['subscriptions'] ) )
{
return FALSE;
}
@@ -108,44 +108,21 @@ class _Subscription extends \IPS\core\Achievements\Actions\AbstractAchievementAc
{
try
{
$package = \IPS\nexus\Subscription\Package::load( $id );
\IPS\nexus\Subscription::loadByMemberAndPackage( $subject, $package, TRUE );
}
catch ( \OutOfRangeException $e ) {
return FALSE;
\IPS\nexus\Subscription::loadByMemberAndPackage( $subject, \IPS\nexus\Subscription\Package::load( $id ), TRUE );
/* Still here? */
return TRUE;
}
catch ( \OutOfRangeException $e ) { }
}
/* No active matches */
return FALSE;
}
return TRUE;
}
/**
* Get the labels for the people this action might give awards to
*
* @return array
*/
// You don't need to implement this if your action only gives points to the subject
// public function awardOptions(): array
// {
// return [
// 'subject' => 'achievement_filter_Subscription_receiver',
// 'other' => 'achievement_filter_Subscription_giver'
// ];
// }
/**
* Get the "other" people we need to award =stuff to
*
* @param mixed $extra Any additional information about what is happening (e.g. if a post is being made: the post object)
* @return array
*/
// You don't need to implement this if your action only gives points to the subject
// public function awardOther( $extra = NULL ): array
// {
// return [ \IPS\Member::loggedIn() ];
// }
/**
* Get identifier to prevent the member being awarded points for the same action twice
* Must be unique within within of this domain, must not exceed 32 chars.
@@ -251,7 +228,7 @@ class _Subscription extends \IPS\core\Achievements\Actions\AbstractAchievementAc
'table' => 'nexus_member_subscriptions',
'pkey' => 'sub_id',
'date' => 'sub_start',
'where' => [ ['sub_active=?', 1 ] ],
'where' => [],
] ];
}
@@ -264,7 +241,7 @@ class _Subscription extends \IPS\core\Achievements\Actions\AbstractAchievementAc
*/
public static function rebuildRow( $row, $data )
{
\IPS\Member::load( $row['member_id'] )->achievementAction( 'nexus', 'Subscription', \IPS\nexus\Subscription::load( $row['sub_id'] ) );
\IPS\Member::load( $row['sub_member_id'] )->achievementAction( 'nexus', 'Subscription', \IPS\nexus\Subscription::load( $row['sub_id'] ) );
}
}