public function deleteManufacturer($id) { if (is_numeric($id)) { $record = mslib_befe::getRecord($id, 'tx_multishop_manufacturers', 'manufacturers_id'); if ($record['manufacturers_image']) { $filter = array(); $filter[] = 'manufacturers_image=\'' . addslashes($record['manufacturers_image']) . '\''; $count = mslib_befe::getCount('', 'tx_multishop_manufacturers', '', $filter); if ($count < 2) { // Only delete the file is we have found 1 category using it mslib_befe::deleteManufacturersImage($record['manufacturers_image']); } } $qry = $GLOBALS['TYPO3_DB']->exec_DELETEquery('tx_multishop_manufacturers', 'manufacturers_id=' . $id); $qry = $GLOBALS['TYPO3_DB']->exec_DELETEquery('tx_multishop_manufacturers_cms', 'manufacturers_id=' . $id); $qry = $GLOBALS['TYPO3_DB']->exec_DELETEquery('tx_multishop_manufacturers_info', 'manufacturers_id=' . $id); } }