aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-11-03 18:01:25 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-11-03 18:01:25 +0100
commit001cc7168aa1a7e9b8290b9c29566c586ac8b511 (patch)
treed1818e81c9ebcfeeecb2acc90cf758f3646865d8 /src/Wallabag/CoreBundle
parent864c1dd23a4aa9e5f412302694d9303070dca6dc (diff)
downloadwallabag-001cc7168aa1a7e9b8290b9c29566c586ac8b511.tar.gz
wallabag-001cc7168aa1a7e9b8290b9c29566c586ac8b511.tar.zst
wallabag-001cc7168aa1a7e9b8290b9c29566c586ac8b511.zip
Cleanup
Diffstat (limited to 'src/Wallabag/CoreBundle')
-rw-r--r--src/Wallabag/CoreBundle/Controller/ConfigController.php2
-rw-r--r--src/Wallabag/CoreBundle/Event/Subscriber/TablePrefixSubscriber.php2
-rw-r--r--src/Wallabag/CoreBundle/Helper/DownloadImages.php6
3 files changed, 4 insertions, 6 deletions
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
234 */ 234 */
235 public function resetAction($type) 235 public function resetAction($type)
236 { 236 {
237 $em = $this->getDoctrine()->getManager();
238
239 switch ($type) { 237 switch ($type) {
240 case 'annotations': 238 case 'annotations':
241 $this->getDoctrine() 239 $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
39 return; 39 return;
40 } 40 }
41 41
42 $classMetadata->setTableName($this->prefix.$classMetadata->getTableName()); 42 $classMetadata->setPrimaryTable(['name' => $this->prefix.$classMetadata->getTableName()]);
43 43
44 foreach ($classMetadata->getAssociationMappings() as $fieldName => $mapping) { 44 foreach ($classMetadata->getAssociationMappings() as $fieldName => $mapping) {
45 if ($mapping['type'] === ClassMetadataInfo::MANY_TO_MANY && isset($classMetadata->associationMappings[$fieldName]['joinTable']['name'])) { 45 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
135 135
136 switch ($ext) { 136 switch ($ext) {
137 case 'gif': 137 case 'gif':
138 $result = imagegif($im, $localPath); 138 imagegif($im, $localPath);
139 $this->logger->debug('DownloadImages: Re-creating gif'); 139 $this->logger->debug('DownloadImages: Re-creating gif');
140 break; 140 break;
141 case 'jpeg': 141 case 'jpeg':
142 case 'jpg': 142 case 'jpg':
143 $result = imagejpeg($im, $localPath, self::REGENERATE_PICTURES_QUALITY); 143 imagejpeg($im, $localPath, self::REGENERATE_PICTURES_QUALITY);
144 $this->logger->debug('DownloadImages: Re-creating jpg'); 144 $this->logger->debug('DownloadImages: Re-creating jpg');
145 break; 145 break;
146 case 'png': 146 case 'png':
147 $result = imagepng($im, $localPath, ceil(self::REGENERATE_PICTURES_QUALITY / 100 * 9)); 147 imagepng($im, $localPath, ceil(self::REGENERATE_PICTURES_QUALITY / 100 * 9));
148 $this->logger->debug('DownloadImages: Re-creating png'); 148 $this->logger->debug('DownloadImages: Re-creating png');
149 } 149 }
150 150