From e0110e944397eccc3d3ef4d5abff61f72ea41a9f Mon Sep 17 00:00:00 2001 From: Peter Rotich <peter@osticket.com> Date: Sat, 28 Jul 2012 23:47:03 -0400 Subject: [PATCH] Remove unused index var - to make Jared happy (j/k) --- api/pipe.php | 2 +- include/class.faq.php | 4 ++-- include/class.ticket.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/pipe.php b/api/pipe.php index 2c43e5681..d7d4b33be 100644 --- a/api/pipe.php +++ b/api/pipe.php @@ -117,7 +117,7 @@ if(!$ticket){ //New tickets... } //Ticket created...save attachments if enabled. if($cfg->allowEmailAttachments() && ($attachments=$parser->getAttachments())) { - foreach($attachments as $k=>$attachment) { + foreach($attachments as $attachment) { if($attachment['filename'] && $ost->isFileTypeAllowed($attachment['filename'])) $ticket->saveAttachment(array('name' => $attachment['filename'], 'data' => $attachment['body']), $msgid, 'M'); } diff --git a/include/class.faq.php b/include/class.faq.php index 06be15904..2197bbac1 100644 --- a/include/class.faq.php +++ b/include/class.faq.php @@ -135,7 +135,7 @@ class FAQ { if($ids) { $topics = $this->getHelpTopicsIds(); - foreach($ids as $k=>$id) { + foreach($ids as $id) { if($topics && in_array($id,$topics)) continue; $sql='INSERT IGNORE INTO '.FAQ_TOPIC_TABLE .' SET faq_id='.db_input($this->getId()) @@ -163,7 +163,7 @@ class FAQ { //Delete removed attachments. $keepers = $vars['files']?$vars['files']:array(); if(($attachments = $this->getAttachments())) { - foreach($attachments as $k=>$file) { + foreach($attachments as $file) { if($file['id'] && !in_array($file['id'], $keepers)) $this->deleteAttachment($file['id']); } diff --git a/include/class.ticket.php b/include/class.ticket.php index 5ea192c36..935436904 100644 --- a/include/class.ticket.php +++ b/include/class.ticket.php @@ -1408,7 +1408,7 @@ class Ticket{ //Canned attachments... if($vars['cannedattachments'] && is_array($vars['cannedattachments'])) { - foreach($vars['cannedattachments'] as $k =>$fileId) + foreach($vars['cannedattachments'] as $fileId) if($fileId && $this->saveAttachment($fileId, $respId, 'R')) $attachments[] = $fileId; } -- GitLab