Conflicts:
	include/api.php
This commit is contained in:
redmatrix 2015-08-19 16:54:12 -07:00
commit 8d66fbccfa
2 changed files with 72 additions and 50 deletions

View File

@ -7,6 +7,7 @@ We need much more than this, but here are areas where developers can help. Pleas
[li](done) forum widget with unread counts (requires the DB schema changes from v3/hubzilla to be viable)[/li]
[li]Create bug tracker module[/li]
[li]translation plugins - moses or apertium[/li]
[li]plugins - provide 'disable' which is softer than 'uninstall' for those plugins which create additional DB tables[/li]
[li]Infinite scroll improvements (i.e. embedded page links) see http://scrollsample.appspot.com/items [/li]
[li]Finish the anti-spam bayesian engine[/li]
[li]implement an email permission denied bounce message from the sys channel[/li]

View File

@ -631,6 +631,27 @@ require_once('include/items.php');
}
api_register_func('api/red/photos','api_photos', true);
function api_photo_detail(&$a,$type) {
if (api_user()===false) return false;
if(! $_REQUEST['photo_id']) return false;
$scale = ((array_key_exists('scale',$_REQUEST)) ? intval($_REQUEST['scale']) : 0);
$r = q("select * from photo where uid = %d and resource_id = '%s' and scale = %d limit 1",
intval(local_channel()),
dbesc($_REQUEST['photo_id']),
intval($scale)
);
if($r) {
$data = dbunescbin($r[0]['data']);
if(array_key_exists('os_storage',$r[0]) && intval($r[0]['os_storage']))
$data = file_get_contents($data);
$r[0]['data'] = base64_encode($data);
json_return_and_die($r[0]);
}
killme();
}
api_register_func('api/red/photo', 'api_photo_detail', true);
function api_group_members(&$a,$type) {
if(api_user() === false)