-
- $r = q("INSERT INTO `photo` ( `uid`, `resource-id`, `created`, `edited`, `filename`,
- `height`, `width`, `data`, `scale` )
- VALUES ( %d, '%s', '%s', '%s', '%s', %d, %d, '%s', 1 )",
- intval($_SESSION['uid']),
- dbesc($hash),
- datetime_convert(),
- datetime_convert(),
- dbesc(basename($filename)),
- intval($ph->getHeight()),
- intval($ph->getWidth()),
- dbesc($ph->imageString())
- );
- if($r === false)
- notice("Image size reduction (640) failed." . EOL );
- else
+ $r = $ph->store($page_owner_uid, $visitor, $hash, $filename, t('Wall Photos'), 1, 0, '<0>');
+ if($r)