mirror of https://github.com/sualko/cloud_bbb
refactor: update to latest nc code style
parent
b63d54cde9
commit
bfe2c5a078
|
@ -233,17 +233,17 @@ class API {
|
||||||
*/
|
*/
|
||||||
private function recordToArray(Record $record): array {
|
private function recordToArray(Record $record): array {
|
||||||
return [
|
return [
|
||||||
'id' => $record->getRecordId(),
|
'id' => $record->getRecordId(),
|
||||||
'meetingId' => $record->getMeetingId(),
|
'meetingId' => $record->getMeetingId(),
|
||||||
'name' => $record->getName(),
|
'name' => $record->getName(),
|
||||||
'published' => $record->isPublished(),
|
'published' => $record->isPublished(),
|
||||||
'state' => $record->getState(),
|
'state' => $record->getState(),
|
||||||
'startTime' => $record->getStartTime(),
|
'startTime' => $record->getStartTime(),
|
||||||
'participants' => $record->getParticipantCount(),
|
'participants' => $record->getParticipantCount(),
|
||||||
'type' => $record->getPlaybackType(),
|
'type' => $record->getPlaybackType(),
|
||||||
'length' => $record->getPlaybackLength(),
|
'length' => $record->getPlaybackLength(),
|
||||||
'url' => $record->getPlaybackUrl(),
|
'url' => $record->getPlaybackUrl(),
|
||||||
'metas' => $record->getMetas(),
|
'metas' => $record->getMetas(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -107,11 +107,11 @@ class JoinController extends Controller {
|
||||||
return new RedirectResponse($this->getLoginUrl());
|
return new RedirectResponse($this->getLoginUrl());
|
||||||
} elseif (empty($displayname) || strlen($displayname) < 3 || ($room->access === Room::ACCESS_PASSWORD && $password !== $room->password)) {
|
} elseif (empty($displayname) || strlen($displayname) < 3 || ($room->access === Room::ACCESS_PASSWORD && $password !== $room->password)) {
|
||||||
$response = new TemplateResponse($this->appName, 'join', [
|
$response = new TemplateResponse($this->appName, 'join', [
|
||||||
'room' => $room->name,
|
'room' => $room->name,
|
||||||
'wrongdisplayname' => !empty($displayname) && strlen($displayname) < 3,
|
'wrongdisplayname' => !empty($displayname) && strlen($displayname) < 3,
|
||||||
'passwordRequired' => $room->access === Room::ACCESS_PASSWORD,
|
'passwordRequired' => $room->access === Room::ACCESS_PASSWORD,
|
||||||
'wrongPassword' => $password !== $room->password && $password !== '',
|
'wrongPassword' => $password !== $room->password && $password !== '',
|
||||||
'loginUrl' => $this->getLoginUrl(),
|
'loginUrl' => $this->getLoginUrl(),
|
||||||
], 'guest');
|
], 'guest');
|
||||||
|
|
||||||
return $response;
|
return $response;
|
||||||
|
@ -133,7 +133,7 @@ class JoinController extends Controller {
|
||||||
|
|
||||||
return new TemplateResponse($this->appName, 'forward', [
|
return new TemplateResponse($this->appName, 'forward', [
|
||||||
'room' => $room->name,
|
'room' => $room->name,
|
||||||
'url' => $joinUrl,
|
'url' => $joinUrl,
|
||||||
], 'guest');
|
], 'guest');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,12 +34,12 @@ class Restriction extends Entity implements JsonSerializable {
|
||||||
|
|
||||||
public function jsonSerialize(): array {
|
public function jsonSerialize(): array {
|
||||||
return [
|
return [
|
||||||
'id' => $this->id,
|
'id' => $this->id,
|
||||||
'groupId' => $this->groupId,
|
'groupId' => $this->groupId,
|
||||||
'maxRooms' => (int) $this->maxRooms,
|
'maxRooms' => (int) $this->maxRooms,
|
||||||
'roomTypes' => \json_decode($this->roomTypes),
|
'roomTypes' => \json_decode($this->roomTypes),
|
||||||
'maxParticipants' => (int) $this->maxParticipants,
|
'maxParticipants' => (int) $this->maxParticipants,
|
||||||
'allowRecording' => boolval($this->allowRecording),
|
'allowRecording' => boolval($this->allowRecording),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,22 +81,22 @@ class Room extends Entity implements JsonSerializable {
|
||||||
|
|
||||||
public function jsonSerialize(): array {
|
public function jsonSerialize(): array {
|
||||||
return [
|
return [
|
||||||
'id' => $this->id,
|
'id' => $this->id,
|
||||||
'uid' => $this->uid,
|
'uid' => $this->uid,
|
||||||
'userId' => $this->userId,
|
'userId' => $this->userId,
|
||||||
'name' => $this->name,
|
'name' => $this->name,
|
||||||
'welcome' => $this->welcome,
|
'welcome' => $this->welcome,
|
||||||
'maxParticipants' => (int) $this->maxParticipants,
|
'maxParticipants' => (int) $this->maxParticipants,
|
||||||
'record' => boolval($this->record),
|
'record' => boolval($this->record),
|
||||||
'access' => $this->access,
|
'access' => $this->access,
|
||||||
'password' => $this->password,
|
'password' => $this->password,
|
||||||
'everyoneIsModerator' => boolval($this->everyoneIsModerator),
|
'everyoneIsModerator' => boolval($this->everyoneIsModerator),
|
||||||
'requireModerator' => boolval($this->requireModerator),
|
'requireModerator' => boolval($this->requireModerator),
|
||||||
'shared' => boolval($this->shared),
|
'shared' => boolval($this->shared),
|
||||||
'moderatorToken' => $this->moderatorToken,
|
'moderatorToken' => $this->moderatorToken,
|
||||||
'listenOnly' => boolval($this->listenOnly),
|
'listenOnly' => boolval($this->listenOnly),
|
||||||
'mediaCheck' => boolval($this->mediaCheck),
|
'mediaCheck' => boolval($this->mediaCheck),
|
||||||
'cleanLayout' => boolval($this->cleanLayout),
|
'cleanLayout' => boolval($this->cleanLayout),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,12 +43,12 @@ class RoomShare extends Entity implements JsonSerializable {
|
||||||
|
|
||||||
public function jsonSerialize(): array {
|
public function jsonSerialize(): array {
|
||||||
return [
|
return [
|
||||||
'id' => $this->id,
|
'id' => $this->id,
|
||||||
'roomId' => $this->roomId,
|
'roomId' => $this->roomId,
|
||||||
'shareType' => $this->shareType,
|
'shareType' => $this->shareType,
|
||||||
'shareWith' => $this->shareWith,
|
'shareWith' => $this->shareWith,
|
||||||
'shareWithDisplayName' => $this->shareWithDisplayName,
|
'shareWithDisplayName' => $this->shareWithDisplayName,
|
||||||
'permission' => $this->permission,
|
'permission' => $this->permission,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,27 +25,27 @@ class Version000000Date20200416124731 extends SimpleMigrationStep {
|
||||||
$table = $schema->createTable('bbb_rooms');
|
$table = $schema->createTable('bbb_rooms');
|
||||||
$table->addColumn('id', 'integer', [
|
$table->addColumn('id', 'integer', [
|
||||||
'autoincrement' => true,
|
'autoincrement' => true,
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('uid', 'string', [
|
$table->addColumn('uid', 'string', [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 64
|
'length' => 64
|
||||||
]);
|
]);
|
||||||
$table->addColumn('user_id', 'string', [
|
$table->addColumn('user_id', 'string', [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 200,
|
'length' => 200,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('name', 'string', [
|
$table->addColumn('name', 'string', [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 200
|
'length' => 200
|
||||||
]);
|
]);
|
||||||
$table->addColumn('attendee_password', 'string', [
|
$table->addColumn('attendee_password', 'string', [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 32
|
'length' => 32
|
||||||
]);
|
]);
|
||||||
$table->addColumn('moderator_password', 'string', [
|
$table->addColumn('moderator_password', 'string', [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 32
|
'length' => 32
|
||||||
]);
|
]);
|
||||||
$table->addColumn('welcome', 'string', [
|
$table->addColumn('welcome', 'string', [
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
|
|
|
@ -36,7 +36,7 @@ class Version000000Date20200604130935 extends SimpleMigrationStep {
|
||||||
|
|
||||||
if (!$table->hasColumn('password')) {
|
if (!$table->hasColumn('password')) {
|
||||||
$table->addColumn('password', 'string', [
|
$table->addColumn('password', 'string', [
|
||||||
'length' => 64,
|
'length' => 64,
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,14 +25,14 @@ class Version000000Date20200613111242 extends SimpleMigrationStep {
|
||||||
$table = $schema->createTable('bbb_room_shares');
|
$table = $schema->createTable('bbb_room_shares');
|
||||||
$table->addColumn('id', 'integer', [
|
$table->addColumn('id', 'integer', [
|
||||||
'autoincrement' => true,
|
'autoincrement' => true,
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('room_id', 'integer', [
|
$table->addColumn('room_id', 'integer', [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('share_with', 'string', [
|
$table->addColumn('share_with', 'string', [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 200,
|
'length' => 200,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('share_type', 'integer', [
|
$table->addColumn('share_type', 'integer', [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
|
|
|
@ -28,11 +28,11 @@ class Version000000Date20200826100844 extends SimpleMigrationStep {
|
||||||
$table = $schema->createTable('bbb_restrictions');
|
$table = $schema->createTable('bbb_restrictions');
|
||||||
$table->addColumn('id', 'integer', [
|
$table->addColumn('id', 'integer', [
|
||||||
'autoincrement' => true,
|
'autoincrement' => true,
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('group_id', 'string', [
|
$table->addColumn('group_id', 'string', [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'length' => 200,
|
'length' => 200,
|
||||||
]);
|
]);
|
||||||
$table->addColumn('max_rooms', 'integer', [
|
$table->addColumn('max_rooms', 'integer', [
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
|
|
|
@ -29,7 +29,7 @@ class Version000000Date20210122164501 extends SimpleMigrationStep {
|
||||||
if (!$table->hasColumn('moderator_token')) {
|
if (!$table->hasColumn('moderator_token')) {
|
||||||
$table->addColumn('moderator_token', 'string', [
|
$table->addColumn('moderator_token', 'string', [
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
'length' => 64
|
'length' => 64
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ class Admin implements ISettings {
|
||||||
*/
|
*/
|
||||||
public function getForm() {
|
public function getForm() {
|
||||||
$parameters = [
|
$parameters = [
|
||||||
'api.url' => $this->config->getAppValue('bbb', 'api.url'),
|
'api.url' => $this->config->getAppValue('bbb', 'api.url'),
|
||||||
'api.secret' => $this->config->getAppValue('bbb', 'api.secret'),
|
'api.secret' => $this->config->getAppValue('bbb', 'api.secret'),
|
||||||
'app.navigation' => $this->config->getAppValue('bbb', 'app.navigation') === 'true' ? 'checked' : '',
|
'app.navigation' => $this->config->getAppValue('bbb', 'app.navigation') === 'true' ? 'checked' : '',
|
||||||
'join.theme' => $this->config->getAppValue('bbb', 'join.theme') === 'true' ? 'checked' : '',
|
'join.theme' => $this->config->getAppValue('bbb', 'join.theme') === 'true' ? 'checked' : '',
|
||||||
|
|
Loading…
Reference in New Issue