issue #89 - rotating photos does not work

This commit is contained in:
redmatrix 2015-10-15 13:23:40 -07:00
parent 391b98f72c
commit d9753989bf

View File

@ -236,7 +236,8 @@ function photos_post(&$a) {
intval($page_owner_uid)
);
if(count($r)) {
$ph = photo_factory(dbunescbin($r[0]['data']), $r[0]['type']);
$d = (($r[0]['os_storage']) ? @file_get_contents($r[0]['data']) : dbunescbin($r[0]['data']));
$ph = photo_factory($d, $r[0]['type']);
if($ph->is_valid()) {
$rotate_deg = ( (intval($_POST['rotate']) == 1) ? 270 : 90 );
$ph->rotate($rotate_deg);