Skip to content
Snippets Groups Projects
Commit 17b91aac authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #93 from greezybacon/issue/93

Looks good.

Reviewed By: Peter 06/18/12
parents 1b23e22c 46e09790
No related branches found
No related tags found
No related merge requests found
......@@ -77,7 +77,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
if($canned && ($files=$canned->getAttachments())) {
echo '<div id="canned_attachments"><span class="faded">Uncheck to delete the attachment on submit</span><br>';
foreach($files as $file) {
$hash=$file['hash'].md5($file['id'].session_id());
$hash=$file['hash'].md5($file['id'].session_id().$file['hash']);
echo sprintf('<label><input type="checkbox" name="files[]" id="f%d" value="%d" checked="checked">
<a href="file.php?h=%s">%s</a>&nbsp;&nbsp;</label>&nbsp;',
$file['id'], $file['id'], $hash, $file['name']);
......
......@@ -54,7 +54,7 @@ if($_POST && $thisstaff->canManageCannedResponses()) {
}
break;
case 'create':
if(($id=Canned::create($_POST, $_FILES['attachments'], $errors))) {
if(($id=Canned::create($_POST, $errors))) {
$msg='Canned response added successfully';
$_REQUEST['a']=null;
//Upload attachments
......
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