From 001cc7168aa1a7e9b8290b9c29566c586ac8b511 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Thu, 3 Nov 2016 18:01:25 +0100 Subject: Cleanup --- src/Wallabag/CoreBundle/Controller/ConfigController.php | 2 -- src/Wallabag/CoreBundle/Event/Subscriber/TablePrefixSubscriber.php | 2 +- src/Wallabag/CoreBundle/Helper/DownloadImages.php | 6 +++--- 3 files changed, 4 insertions(+), 6 deletions(-) (limited to 'src/Wallabag/CoreBundle') diff --git a/src/Wallabag/CoreBundle/Controller/ConfigController.php b/src/Wallabag/CoreBundle/Controller/ConfigController.php index d40efcd7..fe817711 100644 --- a/src/Wallabag/CoreBundle/Controller/ConfigController.php +++ b/src/Wallabag/CoreBundle/Controller/ConfigController.php @@ -234,8 +234,6 @@ class ConfigController extends Controller */ public function resetAction($type) { - $em = $this->getDoctrine()->getManager(); - switch ($type) { case 'annotations': $this->getDoctrine() diff --git a/src/Wallabag/CoreBundle/Event/Subscriber/TablePrefixSubscriber.php b/src/Wallabag/CoreBundle/Event/Subscriber/TablePrefixSubscriber.php index 9013328f..711c3bf8 100644 --- a/src/Wallabag/CoreBundle/Event/Subscriber/TablePrefixSubscriber.php +++ b/src/Wallabag/CoreBundle/Event/Subscriber/TablePrefixSubscriber.php @@ -39,7 +39,7 @@ class TablePrefixSubscriber implements EventSubscriber return; } - $classMetadata->setTableName($this->prefix.$classMetadata->getTableName()); + $classMetadata->setPrimaryTable(['name' => $this->prefix.$classMetadata->getTableName()]); foreach ($classMetadata->getAssociationMappings() as $fieldName => $mapping) { if ($mapping['type'] === ClassMetadataInfo::MANY_TO_MANY && isset($classMetadata->associationMappings[$fieldName]['joinTable']['name'])) { diff --git a/src/Wallabag/CoreBundle/Helper/DownloadImages.php b/src/Wallabag/CoreBundle/Helper/DownloadImages.php index c5298236..264bc6a3 100644 --- a/src/Wallabag/CoreBundle/Helper/DownloadImages.php +++ b/src/Wallabag/CoreBundle/Helper/DownloadImages.php @@ -135,16 +135,16 @@ class DownloadImages switch ($ext) { case 'gif': - $result = imagegif($im, $localPath); + imagegif($im, $localPath); $this->logger->debug('DownloadImages: Re-creating gif'); break; case 'jpeg': case 'jpg': - $result = imagejpeg($im, $localPath, self::REGENERATE_PICTURES_QUALITY); + imagejpeg($im, $localPath, self::REGENERATE_PICTURES_QUALITY); $this->logger->debug('DownloadImages: Re-creating jpg'); break; case 'png': - $result = imagepng($im, $localPath, ceil(self::REGENERATE_PICTURES_QUALITY / 100 * 9)); + imagepng($im, $localPath, ceil(self::REGENERATE_PICTURES_QUALITY / 100 * 9)); $this->logger->debug('DownloadImages: Re-creating png'); } -- cgit v1.2.3