Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
osticket
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
docker
osticket
Commits
3ddd9521
Commit
3ddd9521
authored
9 years ago
by
Jared Hancock
Browse files
Options
Downloads
Patches
Plain Diff
search: Fix incorrect basic ticket search results
parent
5234b466
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/staff/tickets.inc.php
+4
-2
4 additions, 2 deletions
include/staff/tickets.inc.php
scp/js/scp.js
+3
-1
3 additions, 1 deletion
scp/js/scp.js
with
7 additions
and
3 deletions
include/staff/tickets.inc.php
+
4
−
2
View file @
3ddd9521
...
...
@@ -77,7 +77,7 @@ case 'search':
if
(
$_REQUEST
[
'query'
])
{
$results_type
=
__
(
'Search Results'
);
// Use an index if possible
if
(
Validator
::
is_email
(
$_REQUEST
[
'query'
])
)
{
if
(
$_REQUEST
[
'search-type'
]
==
'email'
)
{
$tickets
=
$tickets
->
filter
(
array
(
'user__emails__address'
=>
$_REQUEST
[
'query'
],
));
...
...
@@ -314,7 +314,9 @@ return false;">
<tr>
<td><input
type=
"search"
id=
"basic-ticket-search"
name=
"query"
autofocus
size=
"30"
value=
"
<?php
echo
Format
::
htmlchars
(
$_REQUEST
[
'query'
],
true
);
?>
"
autocomplete=
"off"
autocorrect=
"off"
autocapitalize=
"off"
></td>
autocomplete=
"off"
autocorrect=
"off"
autocapitalize=
"off"
>
<input
type=
"hidden"
name=
"search-type"
value=
""
/>
</td>
<td><input
type=
"submit"
class=
"button"
value=
"
<?php
echo
__
(
'Search'
);
?>
"
></td>
<td>
<a
href=
"#"
onclick=
"javascript:
$.dialog('ajax.php/tickets/search', 201);"
...
...
This diff is collapsed.
Click to expand it.
scp/js/scp.js
+
3
−
1
View file @
3ddd9521
...
...
@@ -260,8 +260,10 @@ var scp_prep = function() {
});
},
onselect
:
function
(
obj
)
{
var
form
=
$
(
'
#basic-ticket-search
'
).
closest
(
'
form
'
);
form
.
find
(
'
input[name=search-type]
'
).
val
(
'
email
'
);
$
(
'
#basic-ticket-search
'
).
val
(
obj
.
value
);
$
(
'
#basic-ticket-search
'
).
closest
(
'
form
'
)
.
submit
();
form
.
submit
();
},
property
:
"
matches
"
});
...
...
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