Skip to content

Commit

Permalink
It works on mine mate, Links to the ticket printer are like:
Browse files Browse the repository at this point in the history
`tickets.php?id={TICKETNUMBER}&a=print&notes={1|0}` etc.

Hmm.. actually, that might be triggering it, but as there is zero HTML,
it shouldn't work in the DOMDocument, and therefore should "should"
return the original code.. however, better to avoid that in future.

Added an additional filter to the URL checker to prevent it anyway.
  • Loading branch information
Aaron Were committed Oct 11, 2017
1 parent 95a2899 commit 9b5d0a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions class.AttachmentPreviewPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -948,8 +948,8 @@ public static function isTicketsView() {
// If something has been POST'd to osTicket, assume we're not Viewing a ticket
$tickets_view = FALSE;
}
elseif (strpos($url, 'a=edit')) {
// URL contains a=edit, which we don't want to change yet
elseif (strpos($url, 'a=edit') || strpos($url, 'a=print')) {
// URL contains a=edit or a=print, so assume we aren't needed here!
$tickets_view = FALSE;
}
elseif (strpos($url, 'index.php') !== FALSE ||
Expand Down

0 comments on commit 9b5d0a6

Please sign in to comment.