release; } public function require_all_upgrades() { return false; } /** * * @return Array */ function concern() { return $this->concern; } function apply(base &$appbox) { $Core = \bootstrap::getCore(); $em = $Core->getEntityManager(); $repository = $em->getRepository('\Entities\BasketElement'); foreach($repository->findAll() as $basketElement) { try { $basketElement->getRecord(); } catch(\Exception $e) { $em->remove($basketElement); } } $em = $Core->getEntityManager(); $repository = $em->getRepository('\Entities\Basket'); foreach($repository->findAll() as $basket) { $htmlDesc = $basket->getDescription(); $description = trim(strip_tags(str_replace("
", "\n", $htmlDesc))); if($htmlDesc == $description) { continue; } $basket->setDescription($description); } $em->flush(); return true; } }