X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fphotos.php;h=d4b2a3b19f9169c7af633540aa4e86f07ecf1bc2;hb=c99247ddabe7e8383aa86f94d4ffae73e382a710;hp=5b402746a95a06fc65264a99c67459eae0d9690f;hpb=dac1dbd3e963be0606d8bc29ad6b3085f1c83105;p=friendica.git diff --git a/mod/photos.php b/mod/photos.php index 5b402746a9..d4b2a3b19f 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -10,7 +10,7 @@ require_once('include/tags.php'); require_once('include/threads.php'); require_once('include/Probe.php'); -function photos_init(&$a) { +function photos_init(App &$a) { if ($a->argc > 1) auto_redir($a, $a->argv[1]); @@ -112,7 +112,7 @@ function photos_init(&$a) { -function photos_post(&$a) { +function photos_post(App &$a) { logger('mod-photos: photos_post: begin' , LOGGER_DEBUG); @@ -255,7 +255,7 @@ function photos_post(&$a) { ); } if (dbm::is_result($r)) { - foreach($r as $rr) { + foreach ($r as $rr) { $res[] = "'" . dbesc($rr['rid']) . "'" ; } } else { @@ -277,7 +277,7 @@ function photos_post(&$a) { intval($page_owner_uid) ); if (dbm::is_result($r)) { - foreach($r as $rr) { + foreach ($r as $rr) { q("UPDATE `item` SET `deleted` = 1, `changed` = '%s' WHERE `parent-uri` = '%s' AND `uid` = %d", dbesc(datetime_convert()), dbesc($rr['parent-uri']), @@ -346,7 +346,7 @@ function photos_post(&$a) { dbesc($r[0]['resource-id']), intval($page_owner_uid) ); - if (count($i)) { + if (dbm::is_result($i)) { q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s' WHERE `parent-uri` = '%s' AND `uid` = %d", dbesc(datetime_convert()), dbesc(datetime_convert()), @@ -681,7 +681,7 @@ function photos_post(&$a) { $arr['visible'] = 1; $arr['verb'] = ACTIVITY_TAG; $arr['object-type'] = ACTIVITY_OBJ_PERSON; - $arr['target-type'] = ACTIVITY_OBJ_PHOTO; + $arr['target-type'] = ACTIVITY_OBJ_IMAGE; $arr['tag'] = $tagged[4]; $arr['inform'] = $tagged[2]; $arr['origin'] = 1; @@ -694,7 +694,7 @@ function photos_post(&$a) { $arr['object'] .= xmlify('' . "\n"); $arr['object'] .= '' . "\n"; - $arr['target'] = '' . ACTIVITY_OBJ_PHOTO . '' . $p[0]['desc'] . '' + $arr['target'] = '' . ACTIVITY_OBJ_IMAGE . '' . $p[0]['desc'] . '' . App::get_baseurl() . '/photos/' . $owner_record['nickname'] . '/image/' . $p[0]['resource-id'] . ''; $arr['target'] .= '' . xmlify('' . "\n" . '') . ''; @@ -928,7 +928,7 @@ function photos_post(&$a) { -function photos_content(&$a) { +function photos_content(App &$a) { // URLs: // photos/name