Skip to content
Snippets Groups Projects
Commit 2db06d35 authored by Jared Hancock's avatar Jared Hancock
Browse files

Merge remote branch 'upstream/develop' into develop-next

parents fa0d11a8 c1bec92b
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,6 @@ require_once(INCLUDE_DIR.'class.ticket.php');
require_once(INCLUDE_DIR.'class.dept.php');
require_once(INCLUDE_DIR.'class.email.php');
require_once(INCLUDE_DIR.'class.filter.php');
require_once(INCLUDE_DIR.'html2text.php');
require_once(INCLUDE_DIR.'tnef_decoder.php');
class MailFetcher {
......@@ -441,7 +440,8 @@ class MailFetcher {
array('attachment', 'inline'))) {
$filename = $this->findFilename($part->dparameters);
}
// Inline attachments without disposition.
// Inline attachments without disposition. NOTE that elseif is
// not utilized here b/c ::findFilename may return null
if (!$filename && $part->ifparameters && $part->parameters
&& $part->type > 0) {
$filename = $this->findFilename($part->parameters);
......@@ -450,6 +450,13 @@ class MailFetcher {
$content_id = ($part->ifid)
? rtrim(ltrim($part->id, '<'), '>') : false;
// Some mail clients / servers (like Lotus Notes / Domino) will
// send images without a filename. For such a case, generate a
// random filename for the image
if (!$filename && $content_id && $part->type == 5) {
$filename = 'image-'.Misc::randCode(4).'.'.strtolower($part->subtype);
}
if($filename) {
return array(
array(
......
......@@ -367,10 +367,19 @@ class Mail_Parse {
// Support attachments that do not specify a content-disposition
// but do specify a "name" parameter in the content-type header.
elseif (isset($part->ctype_parameters['name']))
$filename=$part->ctype_parameters['name'];
$filename = $part->ctype_parameters['name'];
elseif (isset($part->ctype_parameters['name*']))
$filename = Format::decodeRfc5987(
$part->ctype_parameters['name*']);
// Some mail clients / servers (like Lotus Notes / Domino) will
// send images without a filename. For such a case, generate a
// random filename for the image
elseif (isset($part->headers['content-id'])
&& $part->headers['content-id']
&& 0 === strcasecmp($part->ctype_primary, 'image'))
$filename = 'image-'.Misc::randCode(4).'.'
.strtolower($part->ctype_secondary);
else
// Not an attachment?
return false;
......
......@@ -396,8 +396,7 @@ class Staff extends AuthenticatedUser {
}
function showAssignedTickets() {
return ($this->ht['show_assigned_tickets']
&& ($this->isAdmin() || $this->isManager()));
return ($this->ht['show_assigned_tickets']);
}
function getTeams() {
......
......@@ -1047,7 +1047,7 @@ Class ThreadEntry {
// content-id will be discarded, only the unique hash-code
// will be available to retrieve the image later
if ($a['cid'] && $a['key']) {
$body = str_replace('src="cid:'.$a['cid'].'"',
$body = preg_replace('/src=("|\'|\b)cid:'.$a['cid'].'\1/i',
'src="cid:'.$a['key'].'"', $body);
}
}
......
......@@ -271,4 +271,6 @@ class Topic {
return false;
}
}
?>
// Add fields from the standard ticket form to the ticket filterable fields
Filter::addSupportedMatches('Help Topic', array('topicId' => 'Topic ID'));
......@@ -193,9 +193,6 @@ $info['id']=$staff->getId();
&nbsp;<span class="error">&nbsp;<?php echo $errors['default_paper_size']; ?></span>
</td>
</tr>
<?php
//Show an option to show assigned tickets to admins & managers.
if($staff->isAdmin() || $staff->isManager()){ ?>
<tr>
<td>Show Assigned Tickets:</td>
<td>
......@@ -203,7 +200,6 @@ $info['id']=$staff->getId();
<em>Show assigned tickets on open queue.</em>
</td>
</tr>
<?php } ?>
<tr>
<th colspan="2">
<em><strong>Password</strong>: To reset your password, provide your current password and a new password below.&nbsp;<span class="error">&nbsp;<?php echo $errors['passwd']; ?></span></em>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment