1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-10-31 14:10:08 +00:00

Save time and issuer of suspensions

This commit is contained in:
Tim Düsterhus 2013-06-08 16:28:40 +02:00
parent c6ffaf4fd7
commit c839d528cc
5 changed files with 15 additions and 4 deletions

View File

@ -30,7 +30,9 @@ public function executeAction() {
'userID' => $this->user->userID,
'roomID' => WCF::getUser()->chatRoomID,
'type' => suspension\Suspension::TYPE_BAN,
'expires' => $this->expires
'expires' => $this->expires,
'time' => TIME_NOW,
'issuer' => WCF::getUser()->userID
)
));
$this->suspensionAction->executeAction();

View File

@ -32,7 +32,9 @@ public function executeAction() {
'userID' => $this->user->userID,
'roomID' => null,
'type' => suspension\Suspension::TYPE_BAN,
'expires' => $this->expires
'expires' => $this->expires,
'time' => TIME_NOW,
'issuer' => WCF::getUser()->userID
)
));
$this->suspensionAction->executeAction();

View File

@ -32,7 +32,9 @@ public function executeAction() {
'userID' => $this->user->userID,
'roomID' => null,
'type' => suspension\Suspension::TYPE_MUTE,
'expires' => $this->expires
'expires' => $this->expires,
'time' => TIME_NOW,
'issuer' => WCF::getUser()->userID
)
));
$this->suspensionAction->executeAction();

View File

@ -62,7 +62,9 @@ public function executeAction() {
'userID' => $this->user->userID,
'roomID' => WCF::getUser()->chatRoomID,
'type' => suspension\Suspension::TYPE_MUTE,
'expires' => $this->expires
'expires' => $this->expires,
'time' => TIME_NOW,
'issuer' => WCF::getUser()->userID
)
));
$this->suspensionAction->executeAction();

View File

@ -48,6 +48,8 @@ CREATE TABLE chat1_suspension (
roomID INT(10) DEFAULT NULL,
type TINYINT(3) NOT NULL,
expires INT(10) NOT NULL,
time INT(10) NOT NULL,
issuer INT(10) DEFAULT NULL,
UNIQUE KEY suspension (userID, roomID, type),
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 (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;