diff options
Diffstat (limited to 'mod/photo.php')
-rw-r--r-- | mod/photo.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mod/photo.php b/mod/photo.php index aff4dc895..fffc15e53 100644 --- a/mod/photo.php +++ b/mod/photo.php @@ -1,7 +1,7 @@ <?php require_once('include/security.php'); -require_once('include/Photo.php'); +require_once('include/photo/photo_driver.php'); function photo_init(&$a) { @@ -118,7 +118,10 @@ function photo_init(&$a) { intval($resolution) ); if($r) { - $data = file_get_contents('images/nosign.jpg'); + logger('mod_photo: forbidden. ' . $a->query_string()); + $observer = $a->get_observer(); + logger('mod_photo: observer = ' . (($observer) ? $observer['xchan_addr'] : '(not authenticated)')); + $data = file_get_contents('images/nosign.png'); $mimetype = 'image/jpeg'; $prvcachecontrol = true; } @@ -151,7 +154,7 @@ function photo_init(&$a) { } if(isset($res) && intval($res) && $res < 500) { - $ph = new Photo($data, $mimetype); + $ph = photo_factory($data, $mimetype); if($ph->is_valid()) { $ph->scaleImageSquare($res); $data = $ph->imageString(); |