プロジェクト

全般

プロフィール

Bug(バグ) #696 » 696_new.diff

Shinichi Urabe, 2010-02-24 16:12

差分を表示:

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');
}
(2-2/2)