]> git.mxchange.org Git - friendica.git/blobdiff - mod/tagrm.php
More usage of dbm::is_result($r) instead of count($r):
[friendica.git] / mod / tagrm.php
old mode 100755 (executable)
new mode 100644 (file)
index 5041145..57024b3
@@ -1,6 +1,6 @@
 <?php
 
-require_once('bbcode.php');
+require_once('include/bbcode.php');
 
 function tagrm_post(&$a) {
 
@@ -19,7 +19,7 @@ function tagrm_post(&$a) {
                intval(local_user())
        );
 
-       if(! count($r))
+       if(! dbm::is_result($r))
                goaway($a->get_baseurl() . '/' . $_SESSION['photo_return']);
 
        $arr = explode(',', $r[0]['tag']);
@@ -32,7 +32,7 @@ function tagrm_post(&$a) {
 
        $tag_str = implode(',',$arr);
 
-       q("UPDATE `item` SET `tag` = '%s' WHERE `id` = %d AND `uid` = %d LIMIT 1",
+       q("UPDATE `item` SET `tag` = '%s' WHERE `id` = %d AND `uid` = %d",
                dbesc($tag_str),
                intval($item),
                intval(local_user())
@@ -68,7 +68,7 @@ function tagrm_content(&$a) {
                intval(local_user())
        );
 
-       if(! count($r))
+       if(! dbm::is_result($r))
                goaway($a->get_baseurl() . '/' . $_SESSION['photo_return']);
 
        $arr = explode(',', $r[0]['tag']);