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

Fixed Duplicate Code (Not really a bug)

Discussion in 'Resolved Bug Reports' started by ragtek, Aug 13, 2011.

  1. ragtek

    ragtek Guest

    In class XenForo_ControllerAdmin_AddOn you define the datawriter 2 times in method actionDelete

    XenForo_ControllerAdmin_AddOn::actionDelete (line 110):
    PHP:
    $dw XenForo_DataWriter::create('XenForo_DataWriter_AddOn');
            
    $dw->setExistingData($addOnId);

            if (
    $this->isConfirmedPost()) // delete add-on
            
    {
                
    $dw XenForo_DataWriter::create('XenForo_DataWriter_AddOn');
                
    $dw->setExistingData($addOnId);
                
    $dw->delete();
     
    Cezz likes this.
  2. Mike

    Mike XenForo Developer Staff Member

    Might as well clean that up :)
     
    Cezz likes this.

Share This Page