From a9d7acda279ebb7f2b3cd61a91a5e1d8b590dcf2 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Wed, 1 Jun 2016 21:48:54 -0700 Subject: the rest of the schema updates - WARNING: some third party plugins may fail; e.g. embedphotos and chess. $item['object'] is now $item['obj'] and $photo['type'] is $photo['mimetype'], $photo['scale'] is $photo['imgscale'] and $photo['data'] is now $photo['content']. There are a number of other changes, but these are the ones noted to cause issues with third-party plugins. The project plugins have been updated. Please note any new issues as this effort touched a lot of code in a lot of files. --- Zotlabs/Module/Oep.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Zotlabs/Module/Oep.php') diff --git a/Zotlabs/Module/Oep.php b/Zotlabs/Module/Oep.php index 89824fc7e..dc0547a42 100644 --- a/Zotlabs/Module/Oep.php +++ b/Zotlabs/Module/Oep.php @@ -249,7 +249,7 @@ class Oep extends \Zotlabs\Web\Controller { $sql_extra = permissions_sql($c[0]['channel_id']); - $p = q("select resource_id from photo where album = '%s' and uid = %d and scale = 0 $sql_extra order by created desc limit 1", + $p = q("select resource_id from photo where album = '%s' and uid = %d and imgscale = 0 $sql_extra order by created desc limit 1", dbesc($res), intval($c[0]['channel_id']) ); @@ -258,7 +258,7 @@ class Oep extends \Zotlabs\Web\Controller { $res = $p[0]['resource_id']; - $r = q("select height, width, scale, resource_id from photo where uid = %d and resource_id = '%s' $sql_extra order by scale asc", + $r = q("select height, width, imgscale, resource_id from photo where uid = %d and resource_id = '%s' $sql_extra order by imgscale asc", intval($c[0]['channel_id']), dbesc($res) ); @@ -276,7 +276,7 @@ class Oep extends \Zotlabs\Web\Controller { if($foundres) { $ret['type'] = 'link'; - $ret['thumbnail_url'] = z_root() . '/photo/' . '/' . $rr['resource_id'] . '-' . $rr['scale']; + $ret['thumbnail_url'] = z_root() . '/photo/' . '/' . $rr['resource_id'] . '-' . $rr['imgscale']; $ret['thumbnail_width'] = $rr['width']; $ret['thumbnail_height'] = $rr['height']; } @@ -310,7 +310,7 @@ class Oep extends \Zotlabs\Web\Controller { $sql_extra = permissions_sql($c[0]['channel_id']); - $p = q("select resource_id from photo where uid = %d and scale = 0 $sql_extra order by created desc limit 1", + $p = q("select resource_id from photo where uid = %d and imgscale = 0 $sql_extra order by created desc limit 1", intval($c[0]['channel_id']) ); if(! $p) @@ -318,7 +318,7 @@ class Oep extends \Zotlabs\Web\Controller { $res = $p[0]['resource_id']; - $r = q("select height, width, scale, resource_id from photo where uid = %d and resource_id = '%s' $sql_extra order by scale asc", + $r = q("select height, width, imgscale, resource_id from photo where uid = %d and resource_id = '%s' $sql_extra order by imgscale asc", intval($c[0]['channel_id']), dbesc($res) ); @@ -336,7 +336,7 @@ class Oep extends \Zotlabs\Web\Controller { if($foundres) { $ret['type'] = 'link'; - $ret['thumbnail_url'] = z_root() . '/photo/' . '/' . $rr['resource_id'] . '-' . $rr['scale']; + $ret['thumbnail_url'] = z_root() . '/photo/' . '/' . $rr['resource_id'] . '-' . $rr['imgscale']; $ret['thumbnail_width'] = $rr['width']; $ret['thumbnail_height'] = $rr['height']; } @@ -372,7 +372,7 @@ class Oep extends \Zotlabs\Web\Controller { $sql_extra = permissions_sql($c[0]['channel_id']); - $r = q("select height, width, scale, resource_id from photo where uid = %d and resource_id = '%s' $sql_extra order by scale asc", + $r = q("select height, width, imgscale, resource_id from photo where uid = %d and resource_id = '%s' $sql_extra order by imgscale asc", intval($c[0]['channel_id']), dbesc($res) ); @@ -390,7 +390,7 @@ class Oep extends \Zotlabs\Web\Controller { if($foundres) { $ret['type'] = 'link'; - $ret['thumbnail_url'] = z_root() . '/photo/' . '/' . $rr['resource_id'] . '-' . $rr['scale']; + $ret['thumbnail_url'] = z_root() . '/photo/' . '/' . $rr['resource_id'] . '-' . $rr['imgscale']; $ret['thumbnail_width'] = $rr['width']; $ret['thumbnail_height'] = $rr['height']; } -- cgit v1.2.3