source/Core/UtilsPic.php
protected function _deletePicture($sPicName, $sAbsDynImageDir)
    {
        $blDeleted = false;
        $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();

        if (!$myConfig->isDemoShop() && (strpos($sPicName, 'nopic.jpg') === false ||
                                         strpos($sPicName, 'nopic_ico.jpg') === false)
        ) {
            $sFile = "$sAbsDynImageDir/$sPicName";

            if (file_exists($sFile) && is_file($sFile)) {
                $blDeleted = unlink($sFile);
            }

            if (!$myConfig->getConfigParam('sAltImageUrl')) {
                // deleting various size generated images
                $sGenPath = str_replace('/master/', '/generated/', $sAbsDynImageDir);
                $aFiles = glob("{$sGenPath}*/{$sPicName}");
                if (is_array($aFiles)) {
                    foreach ($aFiles as $sFile) {
                        $blDeleted = unlink($sFile);
                    }
                }
            }
        }

        return $blDeleted;
    }
protected function _deletePicture($sPicName, $sAbsDynImageDir)
    {
        $blDeleted = false;
        $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();

        if (!$myConfig->isDemoShop() && (strpos($sPicName, 'nopic.jpg') === false ||
                                         strpos($sPicName, 'nopic_ico.jpg') === false)
        ) {
            $sFile = "$sAbsDynImageDir/$sPicName";

            if (file_exists($sFile) && is_file($sFile)) {
                $blDeleted = unlink($sFile);
            }

            if (!$myConfig->getConfigParam('sAltImageUrl')) {
                // deleting various size generated images
                $sGenPath = str_replace('/master/', '/generated/', $sAbsDynImageDir);
                $aFiles = glob("{$sGenPath}*/{$sPicName}");
                if (is_array($aFiles)) {
                    foreach ($aFiles as $sFile) {
                        $blDeleted = unlink($sFile);
                    }
                }
            }
        }

        return $blDeleted;
    }
protected function _deletePicture ( $ sPicName , $ sAbsDynImageDir ) { $ blDeleted = false ; $ myConfig = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) ; if ( ! $ myConfig -> isDemoShop ( ) && ( strpos ( $ sPicName , 'nopic.jpg' ) === false || strpos ( $ sPicName , 'nopic_ico.jpg' ) === false ) ) { $ sFile = "$sAbsDynImageDir/$sPicName" ; if ( file_exists ( $ sFile ) && is_file ( $ sFile ) ) { $ blDeleted = unlink ( $ sFile ) ; } if ( ! $ myConfig -> getConfigParam ( 'sAltImageUrl' ) ) { // deleting various size generated images $ sGenPath = str_replace ( '/master/' , '/generated/' , $ sAbsDynImageDir ) ; $ aFiles = glob ( "{$sGenPath}*/{$sPicName}" ) ; if ( is_array ( $ aFiles ) ) { foreach ( $ aFiles as $ sFile ) { $ blDeleted = unlink ( $ sFile ) ; } } } } return $ blDeleted ; }
Removes picture file from disk.

@param string $sPicName        name of picture
@param string $sAbsDynImageDir the absolute image diectory, where to delete the given image ($myConfig->getPictureDir(false))

@return null
Removes picture file from disk .