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