Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
osticket
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
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
ecc699d2
Commit
ecc699d2
authored
11 years ago
by
Peter Rotich
Browse files
Options
Downloads
Patches
Plain Diff
Change from function specific static var to class var
Rename routines to make it a little clear on what they do
parent
fe29843b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/class.filter.php
+3
-3
3 additions, 3 deletions
include/class.filter.php
include/class.thread.php
+12
-12
12 additions, 12 deletions
include/class.thread.php
include/class.ticket.php
+3
-3
3 additions, 3 deletions
include/class.ticket.php
with
18 additions
and
18 deletions
include/class.filter.php
+
3
−
3
View file @
ecc699d2
...
...
@@ -818,7 +818,7 @@ class TicketFilter {
* http://msdn.microsoft.com/en-us/library/ee219609(v=exchg.80).aspx
*/
/* static */
function
isAutoRe
sponse
(
$headers
)
{
function
isAutoRe
ply
(
$headers
)
{
if
(
$headers
&&
!
is_array
(
$headers
))
$headers
=
Mail_Parse
::
splitHeaders
(
$headers
);
...
...
@@ -852,13 +852,13 @@ class TicketFilter {
}
# Bounces also counts as auto-responses.
if
(
self
::
is
Auto
Bounce
(
$headers
))
if
(
self
::
isBounce
(
$headers
))
return
true
;
return
false
;
}
function
is
Auto
Bounce
(
$headers
)
{
function
isBounce
(
$headers
)
{
if
(
$headers
&&
!
is_array
(
$headers
))
$headers
=
Mail_Parse
::
splitHeaders
(
$headers
);
...
...
This diff is collapsed.
Click to expand it.
include/class.thread.php
+
12
−
12
View file @
ecc699d2
...
...
@@ -376,26 +376,26 @@ Class ThreadEntry {
return
$this
->
ht
[
'headers'
];
}
function
isAutoResponse
()
{
static
$autoresp
;
function
isAutoReply
()
{
if
(
!
isset
(
$autoresp
))
$autoresp
=
$this
->
getEmailHeader
()
?
TicketFilter
::
isAutoResponse
(
$this
->
getEmailHeader
())
:
false
;
if
(
!
isset
(
$this
->
is_autoreply
))
$this
->
is_autoreply
=
$this
->
getEmailHeader
()
?
TicketFilter
::
isAutoReply
(
$this
->
getEmailHeader
())
:
false
;
return
$autore
s
p
;
return
$
this
->
is_
autorep
ly
;
}
function
isAutoBounce
()
{
static
$autobounce
;
function
isBounce
()
{
if
(
!
isset
(
$autobounce
))
$autobounce
=
$this
->
getEmailHeader
()
?
TicketFilter
::
isAutoBounce
(
$this
->
getEmailHeader
())
:
false
;
if
(
!
isset
(
$this
->
is_bounce
))
$this
->
is_bounce
=
$this
->
getEmailHeader
()
?
TicketFilter
::
isBounce
(
$this
->
getEmailHeader
())
:
false
;
return
$
auto
bounce
;
return
$
this
->
is_
bounce
;
}
function
isAutoReply
()
{
return
(
$this
->
isAutoRe
sponse
()
||
$this
->
is
Auto
Bounce
());
function
is
BounceOr
AutoReply
()
{
return
(
$this
->
isAutoRe
ply
()
||
$this
->
isBounce
());
}
//Web uploads - caller is expected to format, validate and set any errors.
...
...
This diff is collapsed.
Click to expand it.
include/class.ticket.php
+
3
−
3
View file @
ecc699d2
...
...
@@ -783,7 +783,7 @@ class Ticket {
$recipients
=
$sentlist
=
array
();
//Exclude the auto responding email just incase it's from staff member.
if
(
$message
->
isAutoRe
sponse
())
if
(
$message
->
isAutoRe
ply
())
$sentlist
[]
=
$this
->
getEmail
();
//Alert admin??
...
...
@@ -1375,7 +1375,7 @@ class Ticket {
if
(
!
$alerts
)
return
$message
;
//Our work is done...
$autorespond
=
true
;
if
(
$autorespond
&&
$message
->
isAutoReply
())
if
(
$autorespond
&&
$message
->
is
BounceOr
AutoReply
())
$autorespond
=
false
;
$this
->
onMessage
(
$autorespond
,
$message
);
//must be called b4 sending alerts to staff.
...
...
@@ -2172,7 +2172,7 @@ class Ticket {
//Don't send alerts to staff when the message is a bounce
// this is necessary to avoid possible loop (especially on new ticket)
if
(
$alertstaff
&&
$message
->
is
Auto
Bounce
())
if
(
$alertstaff
&&
$message
->
isBounce
())
$alertstaff
=
false
;
/***** See if we need to send some alerts ****/
...
...
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