$this->issue->updated = $CS->id;
$this->issue->update($old);
+
+
+
+ if (!empty($_FILES['attachments'])) {
+ foreach ($_FILES['attachments']['name'] as $fileid => $name) {
+ $i = DB_DataObject::factory('Images');
+ MTrackAttachment::add("ticket:{$this->issue->tid}",
+ $_FILES['attachments']['tmp_name'][$fileid],
+ $_FILES['attachments']['name'][$fileid],
+ $CS
+ );
+ }
+ }
+ }
+ /*
+ if (!count($this->error) && $this->id != 'new') {
+ require_once 'MTrack/Attachment.php';
+ MTrackAttachment::process_delete("ticket:{$this->issue->tid}", $CS);
+ }
+ */
+
+
+
+
+
$notify_query = "
(ontable='mtrack_ticket' and onid = {$this->issue->id})
OR
// if the owner has changed.. then we should add them to the watch list...
// MTrackWatch::watch_object('ticket', $this->issue->tid, $this->issue->owner);
- /*
- if (!count($this->error)) {
- if (!empty($_FILES['attachments'])) {
- require_once 'MTrack/Attachment.php';
- foreach ($_FILES['attachments']['name'] as $fileid => $name) {
-
- MTrackAttachment::add("ticket:{$this->issue->tid}",
- $_FILES['attachments']['tmp_name'][$fileid],
- $_FILES['attachments']['name'][$fileid],
- $CS
- );
- }
- }
- }
- if (!count($this->error) && $this->id != 'new') {
- require_once 'MTrack/Attachment.php';
- MTrackAttachment::process_delete("ticket:{$this->issue->tid}", $CS);
- }
- */
+
$this->jok("OK");
}