1
0
mirror of https://github.com/typemill/typemill.git synced 2025-01-16 21:08:20 +01:00

Version 1.5.3.3: Fix language files and editable file upload size

This commit is contained in:
trendschau 2022-06-12 22:34:06 +02:00
parent 9688011d98
commit 2fb6dd6d47
13 changed files with 54 additions and 40 deletions

56
composer.lock generated
View File

@ -1130,16 +1130,16 @@
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.25.0",
"version": "v1.26.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "30885182c981ab175d4d034db0f6f469898070ab"
"reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab",
"reference": "30885182c981ab175d4d034db0f6f469898070ab",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4",
"reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4",
"shasum": ""
},
"require": {
@ -1154,7 +1154,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.23-dev"
"dev-main": "1.26-dev"
},
"thanks": {
"name": "symfony/polyfill",
@ -1192,7 +1192,7 @@
"portable"
],
"support": {
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0"
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0"
},
"funding": [
{
@ -1208,20 +1208,20 @@
"type": "tidelift"
}
],
"time": "2021-10-20T20:35:02+00:00"
"time": "2022-05-24T11:49:31+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.25.0",
"version": "v1.26.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825"
"reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825",
"reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
"reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
"shasum": ""
},
"require": {
@ -1236,7 +1236,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.23-dev"
"dev-main": "1.26-dev"
},
"thanks": {
"name": "symfony/polyfill",
@ -1275,7 +1275,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0"
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0"
},
"funding": [
{
@ -1291,20 +1291,20 @@
"type": "tidelift"
}
],
"time": "2021-11-30T18:21:41+00:00"
"time": "2022-05-24T11:49:31+00:00"
},
{
"name": "symfony/polyfill-php72",
"version": "v1.25.0",
"version": "v1.26.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php72.git",
"reference": "9a142215a36a3888e30d0a9eeea9766764e96976"
"reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976",
"reference": "9a142215a36a3888e30d0a9eeea9766764e96976",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/bf44a9fd41feaac72b074de600314a93e2ae78e2",
"reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2",
"shasum": ""
},
"require": {
@ -1313,7 +1313,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.23-dev"
"dev-main": "1.26-dev"
},
"thanks": {
"name": "symfony/polyfill",
@ -1351,7 +1351,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php72/tree/v1.25.0"
"source": "https://github.com/symfony/polyfill-php72/tree/v1.26.0"
},
"funding": [
{
@ -1367,20 +1367,20 @@
"type": "tidelift"
}
],
"time": "2021-05-27T09:17:38+00:00"
"time": "2022-05-24T11:49:31+00:00"
},
{
"name": "symfony/polyfill-php80",
"version": "v1.25.0",
"version": "v1.26.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
"reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c"
"reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4407588e0d3f1f52efb65fbe92babe41f37fe50c",
"reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace",
"reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace",
"shasum": ""
},
"require": {
@ -1389,7 +1389,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.23-dev"
"dev-main": "1.26-dev"
},
"thanks": {
"name": "symfony/polyfill",
@ -1434,7 +1434,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php80/tree/v1.25.0"
"source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0"
},
"funding": [
{
@ -1450,7 +1450,7 @@
"type": "tidelift"
}
],
"time": "2022-03-04T08:16:47+00:00"
"time": "2022-05-10T07:21:04+00:00"
},
{
"name": "symfony/yaml",

View File

@ -237,10 +237,12 @@ class ControllerAuthorMediaApi extends ControllerAuthor
return $response->withJson(['errors' => 'File is empty.'],422);
}
$maxUploadSize = (isset($this->settings['maxuploadsize']) && is_numeric($this->settings['maxuploadsize']) ) ? ( $this->settings['maxuploadsize'] * 1024 * 1024) : 20971520;
# 20 MB (1 byte * 1024 * 1024 * 20 (for 20 MB))
if ($size > 20971520)
if ($size > $maxUploadSize)
{
return $response->withJson(['errors' => 'File is bigger than 20MB.'],422);
return $response->withJson(['errors' => 'File is bigger than '. ($maxUploadSize / 1024 / 1024) .'MB.'],422);
}
# check extension first

View File

@ -121,6 +121,7 @@ class ControllerSettings extends ControllerShared
'oldslug' => isset($newSettings['oldslug']) ? true : null,
'refreshcache' => isset($newSettings['refreshcache']) ? true : null,
'pingsitemap' => isset($newSettings['pingsitemap']) ? true : null,
'maxuploadsize' => $newSettings['maxuploadsize'],
);
# https://www.slimframework.com/docs/v3/cookbook/uploading-files.html;

View File

@ -87,6 +87,7 @@ class Settings
'version' => '1.5.3.2',
'setup' => true,
'welcome' => true,
'maxuploadsize' => 20,
'images' => ['live' => ['width' => 820], 'thumbs' => ['width' => 250, 'height' => 150]],
];
}
@ -194,6 +195,7 @@ class Settings
'oldslug' => true,
'refreshcache' => true,
'pingsitemap' => true,
'maxuploadsize' => true,
];
# cleanup the existing usersettings

View File

@ -2002,7 +2002,7 @@ const fileComponent = Vue.component('file-component', {
'</div></div>',
data: function(){
return {
maxsize: 20, // megabyte
maxsize: maxuploadsize, // megabyte
showmedialib: false,
load: false,
filemeta: false,
@ -2015,7 +2015,6 @@ const fileComponent = Vue.component('file-component', {
}
},
mounted: function(){
this.$refs.markdown.focus();
if(this.compmarkdown)

View File

@ -708,7 +708,7 @@ Vue.component('component-file', {
'</div>',
data: function(){
return {
maxsize: 20, // megabyte
maxsize: maxuploadsize, // megabyte
showmedialib: false,
fileid: '',
load: false,

View File

@ -249,7 +249,7 @@ WEBSITE_RESTRICTION: Restriction sur le site
WRAP_THE_RESTRICTION_NOTICE_ABOVE_INTO_A_NOTICE_4_ELEMENT_(WHICH_CAN_BE_DESIGNED_AS_SPECIAL_BOX): Insérer l'avis de restriction ci-dessus dans un élément notice-4 (qui peut être conçu comme special box)
ACTIVATE_CACHE_FOR_TWIG_TEMPLATES: Activer le cache pour les templates Twig
ADD_MORE_URL_SCHEMES_FOR_EXTERNAL_LINKS_E_G__LIKE_DICT://_(COMMA_SEPARATED_LIST): Ajouter d'autres schémas d'url pour les liens externes. ex: dict:// (liste séparée par des virgules)
ADD_MORE_URL_SCHEMES_FOR_EXTERNAL_LINKS_E_G__LIKE_DICT://_(COMMA_SEPARATED_LIST): "Ajouter d'autres schémas d'url pour les liens externes. ex: dict:// (liste séparée par des virgules)"
CLEAR_CACHE: Vider le cache
DELETE_ALL_CACHE_FILES: Vider tous les fichiers de cache
DEVELOPER: Développeur

View File

@ -133,7 +133,7 @@ NO_SETTINGS: Nessuna impostazione
NUMBERED_LIST: Elenco numerato
OLIST: Elenchi ordinati
ONLINE: in linea
ONLY_THE_FOLLOWING_SPECIAL_CHARACTERS_ARE_ALLOWED: Sono ammessi solo i seguenti caratteri speciali:
ONLY_THE_FOLLOWING_SPECIAL_CHARACTERS_ARE_ALLOWED: "Sono ammessi solo i seguenti caratteri speciali:"
OWNER_(USERNAME): owner (username)
PARAGRAPH: Paragrafo
PASSWORD: Parola d'ordine
@ -239,7 +239,7 @@ IF_YOU_ADD_A_VALUE_FOR_THE_HEIGHT__THEN_THE_IMAGE_WILL_BE_CROPPED_: Se aggiungi
PROXY: Proxy
STANDARD_HEIGHT_FOR_IMAGES: Altezza standard per le immagini
STANDARD_WIDTH_FOR_IMAGES: Larghezza standard per le immagini
THE_FOLLOWING_OPTIONS_ARE_ONLY_FOR_DEVELOPERS: Le seguenti opzioni sono solo per sviluppatori e amministratori esperti. Cambia le opzioni solo se le capisci davvero. Ad esempio: non attivare mai la segnalazione degli errori per un sito Web live, utilizzare questa opzione solo per la correzione dei bug.
THE_FOLLOWING_OPTIONS_ARE_ONLY_FOR_DEVELOPERS: "Le seguenti opzioni sono solo per sviluppatori e amministratori esperti. Cambia le opzioni solo se le capisci davvero. Ad esempio: non attivare mai la segnalazione degli errori per un sito Web live, utilizzare questa opzione solo per la correzione dei bug."
THIS_APPLIES_ONLY_FOR_FUTURE_IMAGES_IN_THE_CONTENT_AREA_: Questo vale solo per le immagini future nell'area del contenuto.
TRUSTED_IPS_FOR_PROXY_(COMMA_SEPARATED): IP affidabili per proxy (separati da virgole)
TWIG_CACHE: Twig Cache

View File

@ -133,7 +133,7 @@ NO_SETTINGS: Geen instellingen
NUMBERED_LIST: Genummerde lijst
OLIST: olist
ONLINE: online
ONLY_THE_FOLLOWING_SPECIAL_CHARACTERS_ARE_ALLOWED: alleen de volgende speciale tekens zijn toegestaan:
ONLY_THE_FOLLOWING_SPECIAL_CHARACTERS_ARE_ALLOWED: "alleen de volgende speciale tekens zijn toegestaan:"
OWNER_(USERNAME): owner (username)
PARAGRAPH: Paragraaf
PASSWORD: Wachtwoord
@ -261,7 +261,7 @@ IF_YOU_ADD_A_VALUE_FOR_THE_HEIGHT__THEN_THE_IMAGE_WILL_BE_CROPPED_: Als u een wa
PROXY: Proxy
STANDARD_HEIGHT_FOR_IMAGES: Standaard hoogte voor afbeeldingen
STANDARD_WIDTH_FOR_IMAGES: Standaardbreedte voor afbeeldingen
THE_FOLLOWING_OPTIONS_ARE_ONLY_FOR_DEVELOPERS: De volgende opties zijn alleen voor ontwikkelaars en ervaren beheerders. Wijzig de opties alleen als u ze echt begrijpt. Bijvoorbeeld: Activeer nooit de foutrapportage voor een live website, gebruik deze optie alleen voor het oplossen van fouten.
THE_FOLLOWING_OPTIONS_ARE_ONLY_FOR_DEVELOPERS: "De volgende opties zijn alleen voor ontwikkelaars en ervaren beheerders. Wijzig de opties alleen als u ze echt begrijpt. Bijvoorbeeld: Activeer nooit de foutrapportage voor een live website, gebruik deze optie alleen voor het oplossen van fouten."
THIS_APPLIES_ONLY_FOR_FUTURE_IMAGES_IN_THE_CONTENT_AREA_: Dit geldt alleen voor toekomstige afbeeldingen in het inhoudsgebied.
TRUSTED_IPS_FOR_PROXY_(COMMA_SEPARATED): Vertrouwde IP's voor proxy (gescheiden door komma's)
TWIG_CACHE: Twig Cache

View File

@ -261,7 +261,7 @@ IF_YOU_ADD_A_VALUE_FOR_THE_HEIGHT__THEN_THE_IMAGE_WILL_BE_CROPPED_: Если в
PROXY: Прокси
STANDARD_HEIGHT_FOR_IMAGES: Стандартная высота для изображений
STANDARD_WIDTH_FOR_IMAGES: Стандартная ширина для изображений
THE_FOLLOWING_OPTIONS_ARE_ONLY_FOR_DEVELOPERS: Следующие параметры предназначены только для разработчиков и опытных администраторов. Изменяйте параметры только в том случае, если вы действительно их понимаете. Например: никогда не активируйте отчет об ошибках для действующего сайта, используйте эту опцию только для исправления ошибок.
THE_FOLLOWING_OPTIONS_ARE_ONLY_FOR_DEVELOPERS: "Следующие параметры предназначены только для разработчиков и опытных администраторов. Изменяйте параметры только в том случае, если вы действительно их понимаете. Например: никогда не активируйте отчет об ошибках для действующего сайта, используйте эту опцию только для исправления ошибок."
THIS_APPLIES_ONLY_FOR_FUTURE_IMAGES_IN_THE_CONTENT_AREA_: Это относится только к будущим изображениям в области содержимого.
TRUSTED_IPS_FOR_PROXY_(COMMA_SEPARATED): Список надежных IP-адресов для прокси (список, разделенный запятыми)
TWIG_CACHE: Twig кэш

View File

@ -48,6 +48,7 @@
<script src="{{ base_url }}/system/author/js/vue.min.js?v={{ settings.version }}"></script>
<script>
const FormBus = new Vue();
let maxuploadsize = {{ settings.maxuploadsize }};
</script>
<script src="{{ base_url }}/system/author/js/vue-shared.js?v={{ settings.version }}"></script>
<script src="{{ base_url }}/system/author/js/author.js?v={{ settings.version }}"></script>

View File

@ -57,6 +57,7 @@
<script src="{{ base_url }}/system/author/js/vue-blox-config.js?v={{ settings.version }}"></script>
<script>
let formatConfig = {{ settings.formats|json_encode() }};
let maxuploadsize = {{ settings.maxuploadsize }};
let language = {{ settings.language|json_encode() }};
let labels = {{ translations|json_encode() }};
let navigation = {{ navigation|json_encode() }};

View File

@ -127,7 +127,7 @@
{% if errors.settings.images.live.height %}
<span class="error">{{ errors.settings.images.live.height | first }}</span>
{% endif %}
</div>
</div>
<div class="large{{ errors.settings.svg ? ' error' : '' }}">
<label for="settings[svg]">{{ __('Upload svg images') }}</label>
<label class="control-group">{{ __('Allow upload of svg images (on your own risk, has security implications)') }}
@ -135,6 +135,14 @@
<span class="checkmark"></span>
</label>
</div>
<div class="medium{{ errors.settings.maxuploadsize ? ' error' : '' }}">
<label for="maxuploadsize">{{ __('Maximum size for file-uploads in MB') }}</label>
<input type="text" name="settings[maxuploadsize]" id="maxuploadsize" value="{{ old.settings.maxuploadsize ? old.settings.maxuploadsize : settings.maxuploadsize }}" title="{{ __('Use a valid number') }}" />
<div class="description">{{ __('The maximum file size might be limited by your server settings.') }}</div>
{% if errors.settings.maxuploadsize %}
<span class="error">{{ errors.settings.maxuploadsize | first }}</span>
{% endif %}
</div>
<hr>
<header class="headline">
<h2>{{ __('Writing') }}</h2>