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
02dca1cd
Commit
02dca1cd
authored
9 years ago
by
Peter Rotich
Browse files
Options
Downloads
Plain Diff
Merge branch 'issue/autoresp' into issue/v1.10-fixes
parents
7a23bb03
783c0991
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
include/class.thread.php
+2
-0
2 additions, 0 deletions
include/class.thread.php
include/class.ticket.php
+14
-21
14 additions, 21 deletions
include/class.ticket.php
with
16 additions
and
21 deletions
include/class.thread.php
+
2
−
0
View file @
02dca1cd
...
@@ -604,6 +604,8 @@ implements TemplateVariable {
...
@@ -604,6 +604,8 @@ implements TemplateVariable {
var
$_headers
;
var
$_headers
;
var
$_thread
;
var
$_thread
;
var
$_actions
;
var
$_actions
;
var
$is_autoreply
;
var
$is_bounce
;
static
protected
$perms
=
array
(
static
protected
$perms
=
array
(
self
::
PERM_EDIT
=>
array
(
self
::
PERM_EDIT
=>
array
(
...
...
This diff is collapsed.
Click to expand it.
include/class.ticket.php
+
14
−
21
View file @
02dca1cd
...
@@ -1542,6 +1542,9 @@ implements RestrictedAccess, Threadable {
...
@@ -1542,6 +1542,9 @@ implements RestrictedAccess, Threadable {
$this
->
setStaffId
(
0
);
// Clear assignment
$this
->
setStaffId
(
0
);
// Clear assignment
}
}
if
(
!
$autorespond
)
return
;
// Figure out the user
// Figure out the user
if
(
$this
->
getOwnerId
()
==
$message
->
getUserId
())
if
(
$this
->
getOwnerId
()
==
$message
->
getUserId
())
$user
=
new
TicketOwner
(
$user
=
new
TicketOwner
(
...
@@ -1553,11 +1556,11 @@ implements RestrictedAccess, Threadable {
...
@@ -1553,11 +1556,11 @@ implements RestrictedAccess, Threadable {
/********** double check auto-response ************/
/********** double check auto-response ************/
if
(
!
$user
)
if
(
!
$user
)
$autorespond
=
false
;
$autorespond
=
false
;
elseif
(
$autorespond
&&
(
Email
::
getIdByEmail
(
$user
->
getEmail
())))
elseif
((
Email
::
getIdByEmail
(
$user
->
getEmail
())))
$autorespond
=
false
;
$autorespond
=
false
;
elseif
(
$autorespond
&&
(
$dept
=
$this
->
getDept
()))
elseif
((
$dept
=
$this
->
getDept
()))
$autorespond
=
$dept
->
autoRespONNewMessage
();
$autorespond
=
$dept
->
autoRespONNewMessage
();
if
(
!
$autorespond
if
(
!
$autorespond
||
!
$cfg
->
autoRespONNewMessage
()
||
!
$cfg
->
autoRespONNewMessage
()
...
@@ -2293,28 +2296,18 @@ implements RestrictedAccess, Threadable {
...
@@ -2293,28 +2296,18 @@ implements RestrictedAccess, Threadable {
}
}
// Do not auto-respond to bounces and other auto-replies
// Do not auto-respond to bounces and other auto-replies
if
(
$alerts
)
$autorespond
=
isset
(
$vars
[
'mailflags'
])
$alerts
=
isset
(
$vars
[
'mailflags'
])
?
!
$vars
[
'mailflags'
][
'bounce'
]
&&
!
$vars
[
'mailflags'
][
'auto-reply'
]
?
!
$vars
[
'mailflags'
][
'bounce'
]
&&
!
$vars
[
'mailflags'
][
'auto-reply'
]
:
true
;
:
true
;
if
(
$alerts
&&
$message
->
isBounceOrAutoReply
())
if
(
$autorespond
&&
$message
->
isBounceOrAutoReply
())
$alerts
=
false
;
$autorespond
=
false
;
if
(
$alerts
&&
$this
->
getThread
()
->
getLastEmailMessage
(
array
(
'user_id'
=>
$message
->
user_id
,
'id__lt'
=>
$message
->
id
,
'created__gt'
=>
SqlFunction
::
NOW
()
->
minus
(
SqlInterval
::
MINUTE
(
5
)),
)))
{
// One message already from this user in the last five minutes
$alerts
=
false
;
}
$this
->
onMessage
(
$message
,
$a
lerts
);
//must be called b4 sending alerts to staff.
$this
->
onMessage
(
$message
,
$a
utorespond
);
//must be called b4 sending alerts to staff.
if
(
$a
lerts
&&
$cfg
&&
$cfg
->
notifyCollabsONNewMessage
())
if
(
$a
utorespond
&&
$cfg
&&
$cfg
->
notifyCollabsONNewMessage
())
$this
->
notifyCollaborators
(
$message
,
array
(
'signature'
=>
''
));
$this
->
notifyCollaborators
(
$message
,
array
(
'signature'
=>
''
));
if
(
!
$alerts
)
if
(
!
(
$alerts
&&
$autorespond
)
)
return
$message
;
//Our work is done...
return
$message
;
//Our work is done...
$dept
=
$this
->
getDept
();
$dept
=
$this
->
getDept
();
...
...
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