Bug(バグ) #3036 » diary_comment_history_self_comment2.patch
lib/model/doctrine/PluginDiaryComment.class.php | ||
---|---|---|
if ($this->member_id !== $this->Diary->member_id)
|
||
{
|
||
Doctrine::getTable('DiaryCommentUnread')->register($this->Diary);
|
||
Doctrine::getTable('DiaryCommentUpdate')->update($this->Diary, $this->Member);
|
||
}
|
||
Doctrine::getTable('DiaryCommentUpdate')->update($this->Diary, $this->Member);
|
||
}
|
||
public function isDeletable($memberId)
|
lib/model/doctrine/PluginDiaryCommentUpdateTable.class.php | ||
---|---|---|
{
|
||
public function update(Diary $diary, Member $member)
|
||
{
|
||
$object = $this->find(array($diary->id, $member->id));
|
||
$now = date('Y-m-d H:i:s');
|
||
if (!$object)
|
||
if ($diary->member_id !== $member->id)
|
||
{
|
||
$object = new DiaryCommentUpdate();
|
||
$object->setDiary($diary);
|
||
$object->setMember($member);
|
||
}
|
||
$object = $this->find(array($diary->id, $member->id));
|
||
$now = date('Y-m-d H:i:s');
|
||
if (!$object)
|
||
{
|
||
$object = new DiaryCommentUpdate();
|
||
$object->setDiary($diary);
|
||
$object->setMember($member);
|
||
}
|
||
$object->setMyLastCommentTime($now);
|
||
$object->setLastCommentTime($now);
|
||
$object->save();
|
||
$object->setMyLastCommentTime($now);
|
||
$object->setLastCommentTime($now);
|
||
$object->save();
|
||
}
|
||
$this->createQuery()->update()
|
||
->set('last_comment_time', '?', $now)
|