/** * Makes attachments permananent * * @access private * @param string Post Key * @param int Msg ID * @param int Topic ID * @return int */ private function _makeAttachmentsPermanent($postKey, $msgID, $topicID) { //----------------------------------------- // INIT //----------------------------------------- $cnt = array('cnt' => 0); //----------------------------------------- // Attachments: Re-affirm... //----------------------------------------- require_once IPSLib::getAppDir('core') . '/sources/classes/attach/class_attach.php'; $class_attach = new class_attach($this->registry); $class_attach->type = 'msg'; $class_attach->attach_post_key = $postKey; $class_attach->attach_rel_id = $msgID; $class_attach->init(); $return = $class_attach->postProcessUpload(array('mt_id' => $topicID)); return intval($return['count']); }
/** * Convert temp uploads into permanent ones! YAY * * @access protected * @param string $post_key * @param integer $rel_id * @param string $rel_module * @param arary $args * @return void **/ protected function makeAttachmentsPermanent($post_key = "", $rel_id = 0, $rel_module = "", $args = array()) { //----------------------------------------- // INIT //----------------------------------------- $cnt = array('cnt' => 0); //----------------------------------------- // Attachments: Re-affirm... //----------------------------------------- require_once IPSLib::getAppDir('core') . '/sources/classes/attach/class_attach.php'; $class_attach = new class_attach($this->registry); $class_attach->type = $rel_module; $class_attach->attach_post_key = $post_key; $class_attach->attach_rel_id = $rel_id; $class_attach->init(); $return = $class_attach->postProcessUpload($args); return intval($return['count']); }