]> git.mxchange.org Git - friendica.git/blobdiff - mod/photos.php
Merge pull request #3033 from annando/1612-object-type
[friendica.git] / mod / photos.php
index 6d3ab284658d0d4b1f2f4566fc7e7eefa887fa83..1ef43f423ab3f6105eb63094a114b9af8a8977b8 100644 (file)
@@ -165,7 +165,7 @@ function photos_post(&$a) {
                intval($page_owner_uid)
        );
 
-       if (! count($r)) {
+       if (! dbm::is_result($r)) {
                notice( t('Contact information unavailable') . EOL);
                logger('photos_post: unable to locate contact record for page owner. uid=' . $page_owner_uid);
                killme();
@@ -186,7 +186,7 @@ function photos_post(&$a) {
                        dbesc($album),
                        intval($page_owner_uid)
                );
-               if (! count($r)) {
+               if (! dbm::is_result($r)) {
                        notice( t('Album not found.') . EOL);
                        goaway($_SESSION['photo_return']);
                        return; // NOTREACHED
@@ -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']),
@@ -748,7 +748,7 @@ function photos_post(&$a) {
                dbesc($album),
                intval($page_owner_uid)
        );
-       if ((! count($r)) || ($album == t('Profile Photos')))
+       if ((! dbm::is_result($r)) || ($album == t('Profile Photos')))
                $visible = 1;
        else
                $visible = 0;
@@ -1573,7 +1573,7 @@ function photos_content(&$a) {
                        }
 
                        $comments = '';
-                       if (! count($r)) {
+                       if (! dbm::is_result($r)) {
                                if ($can_post || can_write_wall($a,$owner_uid)) {
                                        if ($link_item['last-child']) {
                                                $comments .= replace_macros($cmnt_tpl,array(
@@ -1809,8 +1809,6 @@ function photos_content(&$a) {
                intval($a->pager['itemspage'])
        );
 
-
-
        $photos = array();
        if (dbm::is_result($r)) {
                $twist = 'rotright';