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

Fixed XenForo_ControllerAdmin_Notice

Discussion in 'Resolved Bug Reports' started by ragtek, Nov 4, 2011.

  1. ragtek

    ragtek Guest

    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
     
  2. ragtek

    ragtek Guest

    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)
            );
     
  3. Mike

    Mike XenForo Developer Staff Member

    Fixed these.
     

Share This Page