public static function cleanImages($foretagsid) { Security::demand(FORETAG); $names = CustomForetagsbild::getImgUrls($foretagsid); foreach ($names as $name) { if (is_file(FORETAGS_BILD_PATH . "/" . $name)) { unlink(FORETAGS_BILD_PATH . "/" . $name); } } }