• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed XenForo_ControllerAdmin_Notice

R

ragtek

Guest
#1
There are several "problems" in the class.

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)
        );
$noticeid is only available on editing.


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'));
;) $this->_deleteData
 
R

ragtek

Guest
#2
In XenForo_ControllerAdmin_Language actionSave is the lasthash also false/missing;)

PHP:
        if ($languageId)
        {
            $writer->setExistingData($languageId);
        }
 
        $writer->bulkSet($input);
        $writer->save();
 
        return XenForo_CacheRebuilder_Abstract::getRebuilderResponse(
            $this, $writer->getExtraData(XenForo_DataWriter_Language::DATA_REBUILD_CACHES),
                XenForo_Link::buildAdminLink('languages') . $this->getLastHash($languageId)
        );