mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-30 15:52:17 +09:00
Clean up trash handling logic
This commit is contained in:
parent
10123a86a8
commit
565cfad15f
4 changed files with 25 additions and 61 deletions
|
|
@ -24,8 +24,8 @@ class TrashVO
|
|||
}
|
||||
function getTitle()
|
||||
{
|
||||
if(empty($this->title)) return $lang->untitle;
|
||||
return htmlspecialchars($this->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
|
||||
if(empty($this->title)) return lang('untitle');
|
||||
return escape($this->title, false);
|
||||
}
|
||||
function setTitle($title)
|
||||
{
|
||||
|
|
@ -90,7 +90,7 @@ class TrashVO
|
|||
}
|
||||
function getNickName()
|
||||
{
|
||||
return htmlspecialchars($this->nickName, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
|
||||
return escape($this->nickName, false);
|
||||
}
|
||||
function setNickName($nickName)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -12,16 +12,13 @@ class trashAdminController extends trash
|
|||
{
|
||||
/**
|
||||
* object insert to trash
|
||||
* @param TrashVO $obj
|
||||
* @param TrashVO $oTrashVO
|
||||
* @return Object
|
||||
*/
|
||||
function insertTrash($obj)
|
||||
function insertTrash($oTrashVO)
|
||||
{
|
||||
$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(\RX_CLIENT_IP);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue