зеркало из https://github.com/nextcloud/forms.git
CS fix
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
Родитель
a4c63633b8
Коммит
cadf30a662
|
@ -358,9 +358,9 @@ class Version010200Date20200323141300 extends SimpleMigrationStep {
|
|||
/* Due to the unconventional storing fo vote_option_ids, the vote_option_id needs to get mapped onto old question-id and from there to new question-id.
|
||||
* vote_option_ids count from 1 to x for the questions of a form. So the question at point [$vote[vote_option_id] - 1] within the id-structure is the corresponding question.
|
||||
*/
|
||||
$oldQuestionId = $event_structure[$vote['form_id']]['questions'][$vote['vote_option_id']-1]['id'];
|
||||
$oldQuestionId = $event_structure[$vote['form_id']]['questions'][$vote['vote_option_id'] - 1]['id'];
|
||||
//Just throw an Error, if aboves QuestionId-Mapping went wrong. Double-Checked by Question-Text.
|
||||
if ($event_structure[$vote['form_id']]['questions'][$vote['vote_option_id']-1]['form_question_text'] != $vote['vote_option_text']) {
|
||||
if ($event_structure[$vote['form_id']]['questions'][$vote['vote_option_id'] - 1]['form_question_text'] != $vote['vote_option_text']) {
|
||||
$output->warning("Some Question-Mapping went wrong within Submission-Mapping to new Database. On 'vote_id': " . $vote['id'] . " - 'vote_option_text': '" . $vote['vote_option_text'] . "'");
|
||||
}
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ class FormsService {
|
|||
foreach ($questionEntities as $questionEntity) {
|
||||
$question = $questionEntity->read();
|
||||
$question['options'] = $this->getOptions($question['id']);
|
||||
$questionList[] = $question;
|
||||
$questionList[] = $question;
|
||||
}
|
||||
} catch (DoesNotExistException $e) {
|
||||
//handle silently
|
||||
|
@ -248,7 +248,7 @@ class FormsService {
|
|||
* @return array
|
||||
*/
|
||||
private function formatUsers(string $userId): array {
|
||||
$user = $this->userManager->get($userId);
|
||||
$user = $this->userManager->get($userId);
|
||||
if ($user instanceof IUser) {
|
||||
return [
|
||||
'shareWith' => $userId,
|
||||
|
@ -266,7 +266,7 @@ class FormsService {
|
|||
* @return array
|
||||
*/
|
||||
private function formatGroups(string $groupId): array {
|
||||
$group = $this->groupManager->get($groupId);
|
||||
$group = $this->groupManager->get($groupId);
|
||||
if ($group instanceof IGroup) {
|
||||
return [
|
||||
'shareWith' => $groupId,
|
||||
|
|
|
@ -287,7 +287,7 @@ With help from many libraries and frameworks including:
|
|||
chdir($buildDir);
|
||||
}
|
||||
$timestampChanges = explode(PHP_EOL, $out);
|
||||
$timestampChanges = array_slice($timestampChanges, 0, count($timestampChanges)-1);
|
||||
$timestampChanges = array_slice($timestampChanges, 0, count($timestampChanges) - 1);
|
||||
foreach ($timestampChanges as $timestamp) {
|
||||
if ((int)$timestamp < $deadlineTimestamp) {
|
||||
return;
|
||||
|
@ -356,7 +356,7 @@ With help from many libraries and frameworks including:
|
|||
if (strpos($entry, '> ') === false) {
|
||||
$this->mailMap[$entry] = $entry;
|
||||
} else {
|
||||
list($use, $actual) = explode('> ', $entry);
|
||||
[$use, $actual] = explode('> ', $entry);
|
||||
$this->mailMap[$actual] = $use . '>';
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче