Bug(バグ) #696 » 696_new.diff
lib/model/doctrine/PluginDeletedMessageTable.class.php (作業コピー) | ||
---|---|---|
* @param int $message_id
|
||
* @return boolean
|
||
*/
|
||
public function restoreMessage($message_id)
|
||
public function restoreMessage($message_id, $member_id = null)
|
||
{
|
||
$deleted_message = $this->find($message_id);
|
||
$member_id = $member_id ? $member_id : sfContext::getInstance()->getUser()->getMemberId();
|
||
$deleted_message = $this->findOneByIdAndMemberId($message_id, $member_id);
|
||
if (!$deleted_message) {
|
||
return false;
|
||
}
|
lib/action/opMessagePluginMessageActions.class.php (作業コピー) | ||
---|---|---|
}
|
||
$this->forward404Unless(
|
||
Doctrine::getTable('DeletedMessage')->deleteMessage(
|
||
sfContext::getInstance()->getUser()->getMemberId(),
|
||
$this->getUser()->getMemberId(),
|
||
$request->getParameter('id'),
|
||
$objectName
|
||
)
|
||
... | ... | |
{
|
||
$request->checkCSRFProtection();
|
||
Doctrine::getTable('DeletedMessage')->restoreMessage($request->getParameter('id'));
|
||
$this->forward404Unless(Doctrine::getTable('DeletedMessage')->restoreMessage($request->getParameter('id')));
|
||
$this->redirect('@dustList');
|
||
}
|
||
|