Version 5.0.0 beta 9
This commit is contained in:
1 parent
214f649f1d
commit
56979f8ee8
202 files changed
+4403
-1123
No files matched your search
@@ -936,6 +936,9 @@ class view extends Controller
|
||||
$this->club->removeMember( $member );
|
||||
Db::i()->delete( 'core_notifications', array( '`member`=? AND notification_app=? AND notification_key=? and item_id=?', $member->member_id, 'core', 'club_invitation', $this->club->id ) );
|
||||
$member->recountNotifications();
|
||||
|
||||
/* Log to member history */
|
||||
$member->logHistory( 'core', 'club_membership', array('club_id' => $this->club->id, 'type' => $status, 'remove' => true ) );
|
||||
}
|
||||
|
||||
/* If they were previously accepted and waiting for payment, treat it as a decline */
|
||||
@@ -1332,6 +1335,8 @@ class view extends Controller
|
||||
$this->club->removeMember( Member::loggedIn() );
|
||||
$this->club->recountMembers();
|
||||
$this->club->save();
|
||||
|
||||
Member::loggedIn()->logHistory( 'core', 'club_membership', array('club_id' => $this->club->id, 'type' => Club::STATUS_LEFT ) );
|
||||
|
||||
/* Delete the invitation */
|
||||
Db::i()->delete( 'core_notifications', array( '`member`=? AND notification_app=? AND notification_key=? and item_id=?', Member::loggedIn()->member_id, 'core', 'club_invitation', $this->club->id ) );
|
||||
@@ -1356,6 +1361,8 @@ class view extends Controller
|
||||
$this->club->recountMembers();
|
||||
$this->club->save();
|
||||
|
||||
Member::loggedIn()->logHistory( 'core', 'club_membership', array('club_id' => $this->club->id, 'type' => Club::STATUS_LEFT ) );
|
||||
|
||||
/* Update notification counts */
|
||||
Db::i()->delete( 'core_notifications', array( 'notification_key=? and item_id=? and extra=?', 'club_request', $this->club->id, json_encode( array( Member::loggedIn()->member_id ) ) ) );
|
||||
foreach( $this->club->members( array( 'moderator', 'leader' ), 250, NULL, 2 ) as $member )
|
||||
@@ -1450,6 +1457,31 @@ class view extends Controller
|
||||
Output::i()->title = $this->club->name;
|
||||
Output::i()->output = $form->customTemplate( array( Theme::i()->getTemplate( 'forms', 'core' ), 'popupTemplate' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Resend a pending invitation
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function resendInvite() : void
|
||||
{
|
||||
Session::i()->csrfCheck();
|
||||
|
||||
if ( !$this->club->canInvite() )
|
||||
{
|
||||
Output::i()->error( 'no_module_permission', '2C350/5', 403, '' );
|
||||
}
|
||||
|
||||
$member = Member::load( Request::i()->member );
|
||||
$memberStatus = $this->club->memberStatus( $member );
|
||||
if( in_array( $memberStatus, [ Club::STATUS_INVITED, Club::STATUS_INVITED_BYPASSING_PAYMENT ] ) )
|
||||
{
|
||||
$this->club->sendInvitation( Member::loggedIn(), [ $member ] );
|
||||
$member->logHistory( 'core', 'club_membership', array('club_id' => $this->club->id, 'type' => $memberStatus ) );
|
||||
}
|
||||
|
||||
Output::i()->redirect( $this->club->url(), 'club_notifications_sent' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Re-invite a banned memer
|
||||
|
||||
Reference in new issue
Block a user