Пример #1
0
 protected function checkIfAssignedToChanged($send_to, $discussions)
 {
     if (isset($send_to['new_assigned'])) {
         $c = new DiscussionsComments();
         $c->setDescription(t::__('Assigned To') . ': ' . Users::getNameById(implode(',', $send_to['new_assigned']), ', '));
         $c->setDiscussionsId($discussions->getId());
         $c->setCreatedAt(date('Y-m-d H:i:s'));
         $c->setUsersId($this->getUser()->getAttribute('id'));
         $c->save();
         $discussions->save();
     }
     return $discussions;
 }