mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2025-01-09 00:20:08 +00:00
Save time and issuer of suspensions
This commit is contained in:
parent
c6ffaf4fd7
commit
c839d528cc
@ -30,7 +30,9 @@ public function executeAction() {
|
|||||||
'userID' => $this->user->userID,
|
'userID' => $this->user->userID,
|
||||||
'roomID' => WCF::getUser()->chatRoomID,
|
'roomID' => WCF::getUser()->chatRoomID,
|
||||||
'type' => suspension\Suspension::TYPE_BAN,
|
'type' => suspension\Suspension::TYPE_BAN,
|
||||||
'expires' => $this->expires
|
'expires' => $this->expires,
|
||||||
|
'time' => TIME_NOW,
|
||||||
|
'issuer' => WCF::getUser()->userID
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
$this->suspensionAction->executeAction();
|
$this->suspensionAction->executeAction();
|
||||||
|
@ -32,7 +32,9 @@ public function executeAction() {
|
|||||||
'userID' => $this->user->userID,
|
'userID' => $this->user->userID,
|
||||||
'roomID' => null,
|
'roomID' => null,
|
||||||
'type' => suspension\Suspension::TYPE_BAN,
|
'type' => suspension\Suspension::TYPE_BAN,
|
||||||
'expires' => $this->expires
|
'expires' => $this->expires,
|
||||||
|
'time' => TIME_NOW,
|
||||||
|
'issuer' => WCF::getUser()->userID
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
$this->suspensionAction->executeAction();
|
$this->suspensionAction->executeAction();
|
||||||
|
@ -32,7 +32,9 @@ public function executeAction() {
|
|||||||
'userID' => $this->user->userID,
|
'userID' => $this->user->userID,
|
||||||
'roomID' => null,
|
'roomID' => null,
|
||||||
'type' => suspension\Suspension::TYPE_MUTE,
|
'type' => suspension\Suspension::TYPE_MUTE,
|
||||||
'expires' => $this->expires
|
'expires' => $this->expires,
|
||||||
|
'time' => TIME_NOW,
|
||||||
|
'issuer' => WCF::getUser()->userID
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
$this->suspensionAction->executeAction();
|
$this->suspensionAction->executeAction();
|
||||||
|
@ -62,7 +62,9 @@ public function executeAction() {
|
|||||||
'userID' => $this->user->userID,
|
'userID' => $this->user->userID,
|
||||||
'roomID' => WCF::getUser()->chatRoomID,
|
'roomID' => WCF::getUser()->chatRoomID,
|
||||||
'type' => suspension\Suspension::TYPE_MUTE,
|
'type' => suspension\Suspension::TYPE_MUTE,
|
||||||
'expires' => $this->expires
|
'expires' => $this->expires,
|
||||||
|
'time' => TIME_NOW,
|
||||||
|
'issuer' => WCF::getUser()->userID
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
$this->suspensionAction->executeAction();
|
$this->suspensionAction->executeAction();
|
||||||
|
@ -48,6 +48,8 @@ CREATE TABLE chat1_suspension (
|
|||||||
roomID INT(10) DEFAULT NULL,
|
roomID INT(10) DEFAULT NULL,
|
||||||
type TINYINT(3) NOT NULL,
|
type TINYINT(3) NOT NULL,
|
||||||
expires INT(10) NOT NULL,
|
expires INT(10) NOT NULL,
|
||||||
|
time INT(10) NOT NULL,
|
||||||
|
issuer INT(10) DEFAULT NULL,
|
||||||
|
|
||||||
UNIQUE KEY suspension (userID, roomID, type),
|
UNIQUE KEY suspension (userID, roomID, type),
|
||||||
KEY (roomID),
|
KEY (roomID),
|
||||||
@ -70,6 +72,7 @@ ALTER TABLE chat1_room ADD FOREIGN KEY (owner) REFERENCES wcf1_user (userID) ON
|
|||||||
|
|
||||||
ALTER TABLE chat1_suspension ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
|
ALTER TABLE chat1_suspension ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
|
||||||
ALTER TABLE chat1_suspension ADD FOREIGN KEY (roomID) REFERENCES chat1_room (roomID) ON DELETE CASCADE;
|
ALTER TABLE chat1_suspension ADD FOREIGN KEY (roomID) REFERENCES chat1_room (roomID) ON DELETE CASCADE;
|
||||||
|
ALTER TABLE chat1_suspension ADD FOREIGN KEY (issuer) REFERENCES wcf1_user (userID) ON DELETE SET NULL;
|
||||||
|
|
||||||
ALTER TABLE wcf1_user ADD FOREIGN KEY (chatRoomID) REFERENCES chat1_room (roomID) ON DELETE SET NULL;
|
ALTER TABLE wcf1_user ADD FOREIGN KEY (chatRoomID) REFERENCES chat1_room (roomID) ON DELETE SET NULL;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user