Example #1
0
    function related()
    {
        $source_id = FSS_Input::getInt('source_id');
        $dest_id = FSS_Input::getInt('dest_id');
        if ($source_id < 1) {
            return $this->cancel();
        }
        if ($dest_id < 1) {
            return $this->cancel();
        }
        $source = new SupportTicket();
        if (!$source->load($source_id)) {
            return $this->cancel();
        }
        $dest = new SupportTicket();
        if (!$dest->load($dest_id)) {
            return $this->cancel();
        }
        $source->addRelated($dest->id);
        $session = JFactory::getSession();
        $session->clear('merge');
        $session->clear('merge_ticket_id');
        ?>
<script>
window.location = '<?php 
        echo FSSRoute::_('index.php?option=com_fss&view=admin_support&layout=ticket&ticketid=' . $source_id, false);
        ?>
';
</script>
<?php 
        exit;
    }