Exemplo n.º 1
0
 /**
  * Set trash object from std object
  * @param TrashVO $oTrashVO
  * @param object $stdObject
  * @return void
  */
 function _setTrashObject(&$oTrashVO, $stdObject)
 {
     $oTrashVO->setTrashSrl($stdObject->trash_srl);
     $oTrashVO->setTitle($stdObject->title);
     $oTrashVO->setOriginModule($stdObject->origin_module);
     $oTrashVO->setSerializedObject($stdObject->serialized_object);
     $oTrashVO->setDescription($stdObject->description);
     $oTrashVO->setIpaddress($stdObject->ipaddress);
     $oTrashVO->setRemoverSrl($stdObject->remover_srl);
     $oTrashVO->setUserId($stdObject->user_id);
     $oTrashVO->setNickName($stdObject->nick_name);
     $oTrashVO->setRegdate($stdObject->regdate);
 }
Exemplo n.º 2
0
 /**
  * object insert to trash
  * @param TrashVO $obj
  * @return Object
  */
 function insertTrash($obj)
 {
     $logged_info = Context::get('logged_info');
     $oTrashVO = new TrashVO();
     $oTrashVO =& $obj;
     if (!$oTrashVO->getTrashSrl()) {
         $oTrashVO->setTrashSrl(getNextSequence());
     }
     if (!is_string($oTrashVO->getSerializedObject())) {
         $oTrashVO->setSerializedObject(serialize($oTrashVO->getSerializedObject()));
     }
     $oTrashVO->setIpaddress($_SERVER['REMOTE_ADDR']);
     $oTrashVO->setRemoverSrl($logged_info->member_srl);
     $oTrashVO->setRegdate(date('YmdHis'));
     return executeQuery('trash.insertTrash', $oTrashVO);
 }