R
ragtek
Guest
There are several "problems" in the class.
1. once again => no lastHash after creating a new notice
$noticeid is only available on editing.
now the minimal unnecessary things
2.
$this->_deleteData
1. once again => no lastHash after creating a new notice
PHP:
if ($noticeId)
{
$dw->setExistingData($noticeId);
}
$dw->bulkSet($data);
$dw->save();
return $this->responseRedirect(
XenForo_ControllerResponse_Redirect::SUCCESS,
XenForo_Link::buildAdminLink('notices') . $this->getLastHash($noticeId)
);
now the minimal unnecessary things
2.
PHP:
$dw = XenForo_DataWriter::create('XenForo_DataWriter_Notice');
$dw->setExistingData($noticeId);
$dw->delete();
return $this->responseRedirect(XenForo_ControllerResponse_Redirect::SUCCESS,
XenForo_Link::buildAdminLink('notices'));