source/Core/UtilsPic.php
public function overwritePic($oObject, $sPicTable, $sPicField, $sPicType, $sPicDir, $aParams, $sAbsDynImageDir)
    {
        $sPic = $sPicTable . '__' . $sPicField;
        if (isset($oObject->{$sPic}) &&
            ($_FILES['myfile']['size'][$sPicType . '@' . $sPic] > 0 || $aParams[$sPic] != $oObject->{$sPic}->value)
        ) {
            $sImgDir = $sAbsDynImageDir . \OxidEsales\Eshop\Core\Registry::getUtilsFile()->getImageDirByType($sPicType);
            return $this->safePictureDelete($oObject->{$sPic}->value, $sImgDir, $sPicTable, $sPicField);
        }

        return false;
    }
public function overwritePic($oObject, $sPicTable, $sPicField, $sPicType, $sPicDir, $aParams, $sAbsDynImageDir)
    {
        $sPic = $sPicTable . '__' . $sPicField;
        if (isset($oObject->{$sPic}) &&
            ($_FILES['myfile']['size'][$sPicType . '@' . $sPic] > 0 || $aParams[$sPic] != $oObject->{$sPic}->value)
        ) {
            $sImgDir = $sAbsDynImageDir . \OxidEsales\Eshop\Core\Registry::getUtilsFile()->getImageDirByType($sPicType);
            return $this->safePictureDelete($oObject->{$sPic}->value, $sImgDir, $sPicTable, $sPicField);
        }

        return false;
    }
public function overwritePic ( $ oObject , $ sPicTable , $ sPicField , $ sPicType , $ sPicDir , $ aParams , $ sAbsDynImageDir ) { $ sPic = $ sPicTable . '__' . $ sPicField ; if ( isset ( $ oObject -> { $ sPic } ) && ( $ _FILES [ 'myfile' ] [ 'size' ] [ $ sPicType . '@' . $ sPic ] > 0 || $ aParams [ $ sPic ] != $ oObject -> { $ sPic } -> value ) ) { $ sImgDir = $ sAbsDynImageDir . \ OxidEsales \ Eshop \ Core \ Registry :: getUtilsFile ( ) -> getImageDirByType ( $ sPicType ) ; return $ this -> safePictureDelete ( $ oObject -> { $ sPic } -> value , $ sImgDir , $ sPicTable , $ sPicField ) ; } return false ; }
Deletes picture if new is uploaded or changed

@param object $oObject         in whitch obejct search for old values
@param string $sPicTable       pictures table
@param string $sPicField       where picture are stored
@param string $sPicType        how does it call in $_FILE array
@param string $sPicDir         directory of pic
@param array  $aParams         new input text array
@param string $sAbsDynImageDir the absolute image diectory, where to delete the given image ($myConfig->getPictureDir(false))

@return null
Deletes picture if new is uploaded or changed