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
bfe10059
Commit
bfe10059
authored
2 years ago
by
Quentin Ribac
Browse files
Options
Downloads
Patches
Plain Diff
FIX #22110 TIME 0:15 autocomplete: split by multiple spaces; better custom_fields deletion
parent
f72b96b3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/app/contact/controllers/ContactCustomFieldController.php
+1
-1
1 addition, 1 deletion
src/app/contact/controllers/ContactCustomFieldController.php
src/core/controllers/AutoCompleteController.php
+1
-1
1 addition, 1 deletion
src/core/controllers/AutoCompleteController.php
with
2 additions
and
2 deletions
src/app/contact/controllers/ContactCustomFieldController.php
+
1
−
1
View file @
bfe10059
...
@@ -167,7 +167,7 @@ class ContactCustomFieldController
...
@@ -167,7 +167,7 @@ class ContactCustomFieldController
$field
=
ContactCustomFieldListModel
::
getById
([
'select'
=>
[
'label'
],
'id'
=>
$args
[
'id'
]]);
$field
=
ContactCustomFieldListModel
::
getById
([
'select'
=>
[
'label'
],
'id'
=>
$args
[
'id'
]]);
ContactModel
::
update
([
'postSet'
=>
[
'custom_fields'
=>
"custom_fields - '
{
$args
[
'id'
]
}
'"
],
'where'
=>
[
'
1
= ?'
],
'data'
=>
[
1
]]);
ContactModel
::
update
([
'postSet'
=>
[
'custom_fields'
=>
"custom_fields - '
{
$args
[
'id'
]
}
'"
],
'where'
=>
[
'
custom_fields !
= ?'
],
'data'
=>
[
null
]]);
ContactParameterModel
::
delete
([
'where'
=>
[
'identifier = ?'
],
'data'
=>
[
'contactCustomField_'
.
$args
[
'id'
]]]);
ContactParameterModel
::
delete
([
'where'
=>
[
'identifier = ?'
],
'data'
=>
[
'contactCustomField_'
.
$args
[
'id'
]]]);
ContactCustomFieldListModel
::
delete
([
ContactCustomFieldListModel
::
delete
([
...
...
This diff is collapsed.
Click to expand it.
src/core/controllers/AutoCompleteController.php
+
1
−
1
View file @
bfe10059
...
@@ -1131,7 +1131,7 @@ class AutoCompleteController
...
@@ -1131,7 +1131,7 @@ class AutoCompleteController
ValidatorModel
::
arrayType
(
$args
,
[
'where'
,
'data'
]);
ValidatorModel
::
arrayType
(
$args
,
[
'where'
,
'data'
]);
ValidatorModel
::
intType
(
$args
,
[
'fieldsNumber'
]);
ValidatorModel
::
intType
(
$args
,
[
'fieldsNumber'
]);
$searchItems
=
explode
(
'
'
,
$args
[
'search'
]);
$searchItems
=
preg_split
(
'/\s+/
'
,
$args
[
'search'
]);
foreach
(
$searchItems
as
$keyItem
=>
$item
)
{
foreach
(
$searchItems
as
$keyItem
=>
$item
)
{
if
(
strlen
(
$item
)
>=
2
)
{
if
(
strlen
(
$item
)
>=
2
)
{
...
...
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