From 19903ea3c1eecf24d72c76970c6027362c9df89e Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Sun, 2 Dec 2018 21:59:08 +0100 Subject: Add flag to allow to save image without validation --- include/photo/photo_driver.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/photo/photo_driver.php b/include/photo/photo_driver.php index b70a13622..6ec5602f4 100644 --- a/include/photo/photo_driver.php +++ b/include/photo/photo_driver.php @@ -330,9 +330,9 @@ abstract class photo_driver { } - public function save($arr) { + public function save($arr, $skipcheck = false) { - if(! $this->is_valid()) { + if(! ($skipcheck || $this->is_valid())) { logger('attempt to store invalid photo.'); return false; } -- cgit v1.2.3