bug and media fixes

This commit is contained in:
Dennis Eichhorn 2021-10-29 14:49:55 +02:00
parent e68f379d37
commit ddc6f84d74
5 changed files with 7 additions and 6 deletions

View File

@ -178,7 +178,8 @@ final class ApiController extends Controller
$old = clone $profile;
$uploaded = $this->app->moduleManager->get('Media')->uploadFiles(
[$request->getData('name') ?? ''],
$request->getDataList('names') ?? [],
$request->getDataList('filenames') ?? [],
$uploadedFiles,
$request->header->account,
__DIR__ . '/../../../Modules/Media/Files/Accounts/' . $profile->account->getId() . ' ' . $profile->account->login,

View File

@ -24,7 +24,7 @@ namespace Modules\Profile\Models;
*/
final class NullContact extends Contact
{
/**
/**
* Constructor
*
* @param int $id Model id

View File

@ -281,8 +281,8 @@ echo $this->getData('nav')->render();
<tr><td colspan="2"><label><?= $this->getHtml('Currencyformat'); ?></label>
<tr><td colspan="2">
<select form="fLocalization" name="settings_currencyformat">
<option value="0"<?= $this->printHtml('0' === $l11n->getCurrencyFormat() ? ' selected' : ''); ?>><?= $this->getHtml('Amount') , ' ' , $this->printHtml($l11n->getCurrency()); ?>
<option value="1"<?= $this->printHtml('1' === $l11n->getCurrencyFormat() ? ' selected' : ''); ?>><?= $this->printHtml($l11n->getCurrency()) , ' ' , $this->getHtml('Amount'); ?>
<option value="0"<?= $this->printHtml($l11n->getCurrencyFormat() === '0' ? ' selected' : ''); ?>><?= $this->getHtml('Amount') , ' ' , $this->printHtml($l11n->getCurrency()); ?>
<option value="1"<?= $this->printHtml($l11n->getCurrencyFormat() === '1' ? ' selected' : ''); ?>><?= $this->printHtml($l11n->getCurrency()) , ' ' , $this->getHtml('Amount'); ?>
</select>
<tr><td colspan="2"><h2><?= $this->getHtml('Numberformat'); ?></h2>
<tr><td><label for="iDecimalPoint"><?= $this->getHtml('DecimalPoint'); ?></label>

View File

@ -392,4 +392,4 @@ function phpServe() : void
});
}
phpServe();
\phpServe();

View File

@ -132,7 +132,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
$request = new HttpRequest(new HttpUri(''));
$request->header->account = 1;
$request->setData('name', 'Profile Logo');
$request->setData('names', 'Profile Logo');
$request->setData('id', 1);
TestUtils::setMember($request, 'files', [