aboutsummaryrefslogtreecommitdiffstats
path: root/include/photo/photo_driver.php
diff options
context:
space:
mode:
authorredmatrix <mike@macgirvin.com>2016-09-22 17:08:16 -0700
committerredmatrix <mike@macgirvin.com>2016-09-22 17:08:16 -0700
commit7b90b0dfd937c17eac61d6a1ca0f0619a3f4cdfd (patch)
tree38289a352a9c41a1990e1c2fa72806f70f0fee5b /include/photo/photo_driver.php
parent24ddc8e026472368eb57cfa0abc522eb4a568e71 (diff)
downloadvolse-hubzilla-7b90b0dfd937c17eac61d6a1ca0f0619a3f4cdfd.tar.gz
volse-hubzilla-7b90b0dfd937c17eac61d6a1ca0f0619a3f4cdfd.tar.bz2
volse-hubzilla-7b90b0dfd937c17eac61d6a1ca0f0619a3f4cdfd.zip
issue #526
Diffstat (limited to 'include/photo/photo_driver.php')
-rw-r--r--include/photo/photo_driver.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/photo/photo_driver.php b/include/photo/photo_driver.php
index 35cf77707..9b6d38cc1 100644
--- a/include/photo/photo_driver.php
+++ b/include/photo/photo_driver.php
@@ -328,6 +328,7 @@ abstract class photo_driver {
$p['photo_usage'] = intval($arr['photo_usage']);
$p['os_storage'] = intval($arr['os_storage']);
$p['os_path'] = $arr['os_path'];
+ $p['display_path'] = (($arr['display_path']) ? $arr['display_path'] : '');
if(! intval($p['imgscale']))
logger('save: ' . print_r($arr,true), LOGGER_DATA);
@@ -359,6 +360,7 @@ abstract class photo_driver {
`title` = '%s',
`description` = '%s',
`os_path` = '%s',
+ `display_path` = '%s',
`allow_cid` = '%s',
`allow_gid` = '%s',
`deny_cid` = '%s',
@@ -384,6 +386,7 @@ abstract class photo_driver {
dbesc($p['title']),
dbesc($p['description']),
dbesc($p['os_path']),
+ dbesc($p['display_path']),
dbesc($p['allow_cid']),
dbesc($p['allow_gid']),
dbesc($p['deny_cid']),
@@ -393,8 +396,8 @@ abstract class photo_driver {
}
else {
$r = q("INSERT INTO `photo`
- ( `aid`, `uid`, `xchan`, `resource_id`, `created`, `edited`, `filename`, mimetype, `album`, `height`, `width`, `content`, `os_storage`, `filesize`, `imgscale`, `photo_usage`, `title`, `description`, `os_path`, `allow_cid`, `allow_gid`, `deny_cid`, `deny_gid` )
- VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', %d, %d, %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s' )",
+ ( `aid`, `uid`, `xchan`, `resource_id`, `created`, `edited`, `filename`, mimetype, `album`, `height`, `width`, `content`, `os_storage`, `filesize`, `imgscale`, `photo_usage`, `title`, `description`, `os_path`, `display_path`, `allow_cid`, `allow_gid`, `deny_cid`, `deny_gid` )
+ VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', %d, %d, %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' )",
intval($p['aid']),
intval($p['uid']),
dbesc($p['xchan']),
@@ -414,6 +417,7 @@ abstract class photo_driver {
dbesc($p['title']),
dbesc($p['description']),
dbesc($p['os_path']),
+ dbesc($p['display_path']),
dbesc($p['allow_cid']),
dbesc($p['allow_gid']),
dbesc($p['deny_cid']),
@@ -423,6 +427,9 @@ abstract class photo_driver {
return $r;
}
+
+ // should be obsolete now
+
public function store($aid, $uid, $xchan, $rid, $filename, $album, $scale, $usage = PHOTO_NORMAL, $allow_cid = '', $allow_gid = '', $deny_cid = '', $deny_gid = '') {
$x = q("select id from photo where `resource_id` = '%s' and uid = %d and `xchan` = '%s' and `imgscale` = %d limit 1",