mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 00:35:30 +00:00
typos and photo fixes
This commit is contained in:
parent
decd86fc08
commit
d55e5bbe75
3 changed files with 12 additions and 11 deletions
|
@ -406,7 +406,7 @@ class Notifier {
|
|||
|
||||
// add any linked identities
|
||||
|
||||
$l = q("select link from linkid where ident in ((" . protect_sprint(implode(',',self::$recipients)) . ") ");
|
||||
$l = q("select link from linkid where ident in ((" . protect_sprintf(implode(',',self::$recipients)) . ") ");
|
||||
if($l) {
|
||||
foreach($l as $lv) {
|
||||
if(! in_array("'" . $lv['link'] . "'", self::$recipients)) {
|
||||
|
@ -415,7 +415,7 @@ class Notifier {
|
|||
}
|
||||
}
|
||||
|
||||
$l = q("select ident from linkid where link in ((" . protect_sprint(implode(',',self::$recipients)) . ") ");
|
||||
$l = q("select ident from linkid where link in ((" . protect_sprintf(implode(',',self::$recipients)) . ") ");
|
||||
if($l) {
|
||||
foreach($l as $lv) {
|
||||
if(! in_array("'" . $lv['ident'] . "'", self::$recipients)) {
|
||||
|
|
|
@ -680,12 +680,11 @@ class Apps {
|
|||
}
|
||||
|
||||
static public function system_app_installed($uid,$app) {
|
||||
dbg(2);
|
||||
|
||||
$r = q("select id from app where app_id = '%s' and app_channel = %d limit 1",
|
||||
dbesc(hash('whirlpool',$app)),
|
||||
intval($uid)
|
||||
);
|
||||
dbg(0);
|
||||
return(($r) ? true : false);
|
||||
|
||||
}
|
||||
|
|
|
@ -278,7 +278,7 @@ function photo_upload($channel, $observer, $args) {
|
|||
|
||||
$p['imgscale'] = 1;
|
||||
$r1 = $ph->save($p);
|
||||
$link[1] = [
|
||||
$url[1] = [
|
||||
'type' => 'Link',
|
||||
'mediaType' => $type,
|
||||
'href' => z_root() . '/photo/' . $photo_hash . '-1.' . $ph->getExt(),
|
||||
|
@ -293,7 +293,7 @@ function photo_upload($channel, $observer, $args) {
|
|||
|
||||
$p['imgscale'] = 2;
|
||||
$r2 = $ph->save($p);
|
||||
$link[2] = [
|
||||
$url[2] = [
|
||||
'type' => 'Link',
|
||||
'mediaType' => $type,
|
||||
'href' => z_root() . '/photo/' . $photo_hash . '-2.' . $ph->getExt(),
|
||||
|
@ -308,7 +308,7 @@ function photo_upload($channel, $observer, $args) {
|
|||
|
||||
$p['imgscale'] = 3;
|
||||
$r3 = $ph->save($p);
|
||||
$link[3] = [
|
||||
$url[3] = [
|
||||
'type' => 'Link',
|
||||
'mediaType' => $type,
|
||||
'href' => z_root() . '/photo/' . $photo_hash . '-3.' . $ph->getExt(),
|
||||
|
@ -359,14 +359,14 @@ function photo_upload($channel, $observer, $args) {
|
|||
|
||||
if($large_photos) {
|
||||
$scale = 1;
|
||||
$width = $link[1]['width'];
|
||||
$height = $link[1]['height'];
|
||||
$width = $url[1]['width'];
|
||||
$height = $url[1]['height'];
|
||||
$tag = (($r1) ? '[zmg=' . $width . 'x' . $height . ']' : '[zmg]');
|
||||
}
|
||||
else {
|
||||
$scale = 2;
|
||||
$width = $link[2]['width'];
|
||||
$height = $link[2]['height'];
|
||||
$width = $url[2]['width'];
|
||||
$height = $url[2]['height'];
|
||||
$tag = (($r2) ? '[zmg=' . $width . 'x' . $height . ']' : '[zmg]');
|
||||
}
|
||||
|
||||
|
@ -389,6 +389,8 @@ function photo_upload($channel, $observer, $args) {
|
|||
'type' => ACTIVITY_OBJ_PHOTO,
|
||||
'name' => $title,
|
||||
'summary' => $p['description'],
|
||||
'mediaType' => $type,
|
||||
'href' => $url[1]['href'],
|
||||
'published' => datetime_convert('UTC','UTC',$p['created'],ATOM_TIME),
|
||||
'updated' => datetime_convert('UTC','UTC',$p['edited'],ATOM_TIME),
|
||||
'id' => z_root() . '/photos/' . $channel['channel_address'] . '/image/' . $photo_hash,
|
||||
|
|
Loading…
Reference in a new issue