bugfix/issue475-orm #476
6 changed files with 19 additions and 7 deletions
|
|
@ -1,5 +1,12 @@
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## 5.2.1
|
||||||
|
### Added
|
||||||
|
- chore: set side_menu as package name
|
||||||
|
### Fixed
|
||||||
|
- fix(LangRepository): check orm capabilities to query entities
|
||||||
|
- fix(admin/\*SaveButton): cast settings to string
|
||||||
|
|
||||||
## 5.2.0
|
## 5.2.0
|
||||||
### Added
|
### Added
|
||||||
* add compatibility with NC33
|
* add compatibility with NC33
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ Notice
|
||||||
Because I believe in a free and decentralized Internet, [Gitnet](https://gitnet.fr) is **self-hosted at home**.
|
Because I believe in a free and decentralized Internet, [Gitnet](https://gitnet.fr) is **self-hosted at home**.
|
||||||
In case of downtime, you can download **Custom Menu** from [here](https://kim.deblan.fr/~side_menu/).
|
In case of downtime, you can download **Custom Menu** from [here](https://kim.deblan.fr/~side_menu/).
|
||||||
]]></description>
|
]]></description>
|
||||||
<version>5.2.0</version>
|
<version>5.2.1</version>
|
||||||
<licence>agpl</licence>
|
<licence>agpl</licence>
|
||||||
<author mail="contact@deblan.fr" homepage="https://www.deblan.fr/">Simon Vieille</author>
|
<author mail="contact@deblan.fr" homepage="https://www.deblan.fr/">Simon Vieille</author>
|
||||||
<namespace>SideMenu</namespace>
|
<namespace>SideMenu</namespace>
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,12 @@ class LangRepository
|
||||||
->from('preferences')
|
->from('preferences')
|
||||||
;
|
;
|
||||||
|
|
||||||
$stmt = $qb->execute();
|
// Nextcloud >=33+
|
||||||
|
if (method_exists($qb, 'executeQuery')) {
|
||||||
|
$stmt = $qb->executeQuery();
|
||||||
|
} else {
|
||||||
|
$stmt = $qb->execute();
|
||||||
|
}
|
||||||
|
|
||||||
$langs = ['en'];
|
$langs = ['en'];
|
||||||
|
|
||||||
|
|
|
||||||
2
package-lock.json
generated
2
package-lock.json
generated
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "src",
|
"name": "side_menu",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
|
|
|
||||||
|
|
@ -73,10 +73,10 @@ const save = async () => {
|
||||||
if (Array.isArray(value) || typeof value === 'object') {
|
if (Array.isArray(value) || typeof value === 'object') {
|
||||||
value = JSON.stringify(value)
|
value = JSON.stringify(value)
|
||||||
} else if (typeof value === 'boolean') {
|
} else if (typeof value === 'boolean') {
|
||||||
value = value ? 1 : 0
|
value = value ? '1' : '0'
|
||||||
}
|
}
|
||||||
|
|
||||||
OCP.AppConfig.setValue('side_menu', key, value, {
|
OCP.AppConfig.setValue('side_menu', key, value.toString(), {
|
||||||
success() {
|
success() {
|
||||||
update()
|
update()
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -69,11 +69,11 @@ const save = async () => {
|
||||||
if (Array.isArray(value) || typeof value === 'object') {
|
if (Array.isArray(value) || typeof value === 'object') {
|
||||||
value = JSON.stringify(value)
|
value = JSON.stringify(value)
|
||||||
} else if (typeof value === 'boolean') {
|
} else if (typeof value === 'boolean') {
|
||||||
value = value ? 1 : 0
|
value = value ? '1' : '0'
|
||||||
}
|
}
|
||||||
|
|
||||||
formData.push('name=' + encodeURIComponent(key))
|
formData.push('name=' + encodeURIComponent(key))
|
||||||
formData.push('value=' + encodeURIComponent(value))
|
formData.push('value=' + encodeURIComponent(value.toString()))
|
||||||
|
|
||||||
fetch(url, {
|
fetch(url, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue