Ejemplo n.º 1
0
 /**
  * Setup the attachments
  * Unfortunately there is not much of a good way of doing this besides
  * 	requiring extra calls to the message class (which I do not want to do)
  */
 protected function setup_attachments()
 {
     // We set it up already...
     if ($this->uploader->get_object_type() !== null) {
         return;
     }
     $for_edit = $this->post_object->generate_text_for_edit();
     if ($this->auth['attachments'] && isset($for_edit['object_type'])) {
         $this->posting_panels['attach-panel'] = 'ATTACHMENTS';
         $this->uploader->configure($for_edit['object_type'], $for_edit['object_id'], true)->get_operator()->load();
         $this->uploader->handle_form_action();
         $this->error = array_merge($this->error, $this->uploader->get_errors());
         $this->uploader->clear_errors();
         // Empty the error array to prevent showing duplicates
     }
 }