Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dematpayslip
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nextcloud extension
dematpayslip
Commits
d03eea08
Commit
d03eea08
authored
4 years ago
by
VESSILLER
Browse files
Options
Downloads
Patches
Plain Diff
FIX Pastell config flow is NULL
parent
7f3cb224
Branches
master
preprod
Branches containing commit
Tags
v2.0.1
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/Controller/PageController.php
+10
-0
10 additions, 0 deletions
lib/Controller/PageController.php
lib/Settings/AdminSettings.php
+10
-0
10 additions, 0 deletions
lib/Settings/AdminSettings.php
with
20 additions
and
0 deletions
lib/Controller/PageController.php
+
10
−
0
View file @
d03eea08
...
@@ -1001,6 +1001,16 @@ class PageController extends Controller {
...
@@ -1001,6 +1001,16 @@ class PageController extends Controller {
if
(
empty
(
$this
->
_dematpayslipConfigList
[
'payslip_dir'
])
||
empty
(
$this
->
_dematpayslipConfigList
[
'user_id'
]))
{
if
(
empty
(
$this
->
_dematpayslipConfigList
[
'payslip_dir'
])
||
empty
(
$this
->
_dematpayslipConfigList
[
'user_id'
]))
{
$this
->
_msgList
[
'error'
][]
=
$this
->
l
->
t
(
'Veuillez vérifier la configuration de cette application.'
);
$this
->
_msgList
[
'error'
][]
=
$this
->
l
->
t
(
'Veuillez vérifier la configuration de cette application.'
);
}
}
$pastellUse
=
OC
::
$server
->
getConfig
()
->
getAppValue
(
$this
->
appName
,
'pastell_use'
,
''
);
if
(
!
empty
(
$pastellUse
))
{
// check Pastell API config
$pastellConfigFlow1Id
=
OC
::
$server
->
getConfig
()
->
getAppValue
(
$this
->
appName
,
'pastell_config_f1_id'
,
''
);
$pastellConfigFlow2Id
=
OC
::
$server
->
getConfig
()
->
getAppValue
(
$this
->
appName
,
'pastell_config_f2_id'
,
''
);
if
(
!
(
$pastellConfigFlow1Id
>
0
)
||
!
(
$pastellConfigFlow2Id
>
0
))
{
$this
->
_msgList
[
'error'
][]
=
$this
->
l
->
t
(
'Veuillez vérifier la configuration de cette application.'
);
}
}
}
}
/**
/**
...
...
This diff is collapsed.
Click to expand it.
lib/Settings/AdminSettings.php
+
10
−
0
View file @
d03eea08
...
@@ -276,6 +276,16 @@ class AdminSettings implements ISettings {
...
@@ -276,6 +276,16 @@ class AdminSettings implements ISettings {
}
}
if
(
count
(
$this
->
_msgList
[
'error'
])
<=
0
)
{
if
(
count
(
$this
->
_msgList
[
'error'
])
<=
0
)
{
$pastellConfigF1Id
=
$this
->
config
->
getAppValue
(
$this
->
appName
,
'pastell_config_f1_id'
);
// FIX -- Pastell config flow is NULL
if
(
empty
(
$pastellConfigF1Id
))
{
$this
->
config
->
deleteAppValue
(
$this
->
appName
,
'pastell_config_f1_id'
);
}
$pastellConfigF2Id
=
$this
->
config
->
getAppValue
(
$this
->
appName
,
'pastell_config_f2_id'
);
// FIX -- Pastell config flow is NULL
if
(
empty
(
$pastellConfigF2Id
))
{
$this
->
config
->
deleteAppValue
(
$this
->
appName
,
'pastell_config_f2_id'
);
}
$this
->
config
->
setAppValue
(
$this
->
appName
,
'pastell_config_f1_id'
,
$pastellConfigFlow1Id
);
$this
->
config
->
setAppValue
(
$this
->
appName
,
'pastell_config_f1_id'
,
$pastellConfigFlow1Id
);
$this
->
config
->
setAppValue
(
$this
->
appName
,
'pastell_config_f2_id'
,
$pastellConfigFlow2Id
);
$this
->
config
->
setAppValue
(
$this
->
appName
,
'pastell_config_f2_id'
,
$pastellConfigFlow2Id
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment