Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MaarchCourrier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
MaarchCourrier
Commits
50a51e6f
Verified
Commit
50a51e6f
authored
7 years ago
by
Damien
Browse files
Options
Downloads
Patches
Plain Diff
FEAT
#61
History for parameters
parent
130da1ce
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/app/parameter/controllers/ParameterController.php
+26
-1
26 additions, 1 deletion
src/app/parameter/controllers/ParameterController.php
src/core/lang/lang-en.php
+3
-0
3 additions, 0 deletions
src/core/lang/lang-en.php
src/core/lang/lang-fr.php
+3
-0
3 additions, 0 deletions
src/core/lang/lang-fr.php
with
32 additions
and
1 deletion
src/app/parameter/controllers/ParameterController.php
+
26
−
1
View file @
50a51e6f
...
...
@@ -18,6 +18,7 @@
namespace
Parameter\controllers
;
use
Core\Models\ServiceModel
;
use
History\controllers\HistoryController
;
use
Parameter\models\ParameterModel
;
use
Respect\Validation\Validator
;
use
Slim\Http\Request
;
...
...
@@ -67,6 +68,14 @@ class ParameterController
}
ParameterModel
::
create
(
$data
);
HistoryController
::
add
([
'tableName'
=>
'parameters'
,
'recordId'
=>
$data
[
'id'
],
'eventType'
=>
'ADD'
,
'info'
=>
_PARAMETER_CREATION
.
" :
{
$data
[
'id'
]
}
"
,
'moduleId'
=>
'parameter'
,
'eventId'
=>
'parameterCreation'
,
]);
return
$response
->
withJson
([
'success'
=>
'success'
]);
}
...
...
@@ -83,9 +92,17 @@ class ParameterController
}
$data
=
$request
->
getParams
();
$data
[
'id'
]
=
$aArgs
[
'id'
];
$data
[
'id'
]
=
$aArgs
[
'id'
];
ParameterModel
::
update
(
$data
);
HistoryController
::
add
([
'tableName'
=>
'parameters'
,
'recordId'
=>
$aArgs
[
'id'
],
'eventType'
=>
'UP'
,
'info'
=>
_PARAMETER_MODIFICATION
.
" :
{
$aArgs
[
'id'
]
}
"
,
'moduleId'
=>
'parameter'
,
'eventId'
=>
'parameterModification'
,
]);
return
$response
->
withJson
([
'success'
=>
'success'
]);
}
...
...
@@ -97,6 +114,14 @@ class ParameterController
}
ParameterModel
::
delete
([
'id'
=>
$aArgs
[
'id'
]]);
HistoryController
::
add
([
'tableName'
=>
'parameters'
,
'recordId'
=>
$aArgs
[
'id'
],
'eventType'
=>
'DEL'
,
'info'
=>
_PARAMETER_SUPPRESSION
.
" :
{
$aArgs
[
'id'
]
}
"
,
'moduleId'
=>
'parameter'
,
'eventId'
=>
'parameterSuppression'
,
]);
$parameters
=
ParameterModel
::
get
();
foreach
(
$parameters
as
$key
=>
$parameter
)
{
...
...
This diff is collapsed.
Click to expand it.
src/core/lang/lang-en.php
+
3
−
0
View file @
50a51e6f
...
...
@@ -20,6 +20,9 @@ define('_ENTITY_CREATION', 'Entity creation');
define
(
'_ENTITY_MODIFICATION'
,
'Entity modification'
);
define
(
'_ENTITY_SUPPRESSION'
,
'Entity suppression'
);
define
(
'_INVALID_CLAUSE'
,
'Clause is not valid'
);
define
(
'_PARAMETER_CREATION'
,
'Parameter creation'
);
define
(
'_PARAMETER_MODIFICATION'
,
'Parameter modification'
);
define
(
'_PARAMETER_SUPPRESSION'
,
'Parameter suppression'
);
define
(
'_PRIORITY_CREATION'
,
'Priority creation'
);
define
(
'_PRIORITY_MODIFICATION'
,
'Priority modification'
);
define
(
'_PRIORITY_SUPPRESSION'
,
'Priority suppression'
);
...
...
This diff is collapsed.
Click to expand it.
src/core/lang/lang-fr.php
+
3
−
0
View file @
50a51e6f
...
...
@@ -20,6 +20,9 @@ define('_ENTITY_CREATION', 'Création entité');
define
(
'_ENTITY_MODIFICATION'
,
'Modification entité'
);
define
(
'_ENTITY_SUPPRESSION'
,
'Suppression entité'
);
define
(
'_INVALID_CLAUSE'
,
'Clause non valide'
);
define
(
'_PARAMETER_CREATION'
,
'Création paramètre'
);
define
(
'_PARAMETER_MODIFICATION'
,
'Modification paramètre'
);
define
(
'_PARAMETER_SUPPRESSION'
,
'Suppression paramètre'
);
define
(
'_PRIORITY_CREATION'
,
'Création priorité'
);
define
(
'_PRIORITY_MODIFICATION'
,
'Modification priorité'
);
define
(
'_PRIORITY_SUPPRESSION'
,
'Suppression priorité'
);
...
...
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