Skip to content

Commit

Permalink
Merge pull request #969 from CatoTH/v4-bugfix-reset-logo
Browse files Browse the repository at this point in the history
V4 bugfix reset logo
  • Loading branch information
CatoTH authored Nov 2, 2024
2 parents de2093c + 04b6619 commit dfe681e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions History.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
- Bugfix: When using "previous / next motion" links for pagination, motions and resolutions were not properly separated.
- Bugfix: Some Youtube-Videos could not be embedded.
- Bugfix: When copying a consultation with motion types whose permissions were restricted to a specific user group, these permissions where not properly copied.
- Bugfix: If an uploaded logo was deleted, the dhown logo was broken instead of falling back to the default logo.

### Version 4.14.2 (2024-09-08)

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"phpoffice/phpspreadsheet": "^3.3",
"predis/predis": "^2.2",
"s1syphos/php-simple-captcha": "^2.3",
"scssphp/scssphp": "^1.11",
"scssphp/scssphp": "^1.13.0",
"setasign/fpdi": "^2.3.7",
"spomky-labs/otphp": "^11.3",
"symfony/amazon-mailer": "^5.4.23",
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions controllers/admin/IndexController.php
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,13 @@ public function actionFiles(): HtmlResponse
'id' => $this->getHttpRequest()->post('id'),
]);
if ($file) {
$settings = $this->consultation->getSettings();
if ($settings->logoUrl === $file->getUrl()) {
$settings->logoUrl = null;
$this->consultation->setSettings($settings);
$this->consultation->save();
}

$file->delete();
}

Expand Down
5 changes: 2 additions & 3 deletions tests/Acceptance/proposedprocedure/EditAmendmentCept.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,10 @@
$I->submitForm('#motionConfirmedForm', []);
$I->see('A really small replacement');

$I->see('A8', 'h1');
$I->see('Testing proposed changes', 'h1');
$I->see('Version 2', '.motionDataTable .historyOpener .currVersion');
$I->clickJS('.motionDataTable .btnHistoryOpener');
$I->see('Version 1', '.motionDataTable .motionHistory a');
$I->see('Umwelt', '.motionDataTable');
$I->gotoConsultationHome();
$I->see('A8', '.motionLink' . (AcceptanceTester::FIRST_FREE_MOTION_ID + 1));
$I->dontSeeElement('.motionRow118');
$I->see('Testing proposed changes', '.sectionResolutions .motionLink' . (AcceptanceTester::FIRST_FREE_MOTION_ID + 1));

0 comments on commit dfe681e

Please sign in to comment.