-
- $r = q("INSERT INTO `photo` ( `uid`, `resource-id`, `created`, `edited`, `filename`, `album`,
- `height`, `width`, `data`, `scale` )
- VALUES ( %d, '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', 1 )",
- intval($_SESSION['uid']),
- dbesc($hash),
- datetime_convert(),
- datetime_convert(),
- dbesc(basename($filename)),
- dbesc( t('Wall Photos') ),
- intval($ph->getHeight()),
- intval($ph->getWidth()),
- dbesc($ph->imageString())
- );
+ $r = $ph->store($page_owner_uid, $visitor, $hash, $filename, t('Wall Photos'), 1, 0, $defperm);