diff --git a/scripts/fix-dimensions b/scripts/fix-dimensions new file mode 100755 index 00000000..e4645d01 --- /dev/null +++ b/scripts/fix-dimensions @@ -0,0 +1,35 @@ +#!/usr/bin/php +findById($postId); +if (!$post) +{ + echo "Post with this ID was not found in the database."; + return; +} + +$image = $imageConverter->createImageFromBuffer($post->getContent()); +$post->setImageWidth($imageManipulator->getImageWidth($image)); +$post->setImageHeight($imageManipulator->getImageHeight($image)); +$postDao->save($post);