]> 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
index 99d22f3d2aa1bad0904b86040086d01daa451b78..57024b3c3b6f2127a20074849f1c8593cbddf251 100644 (file)
@@ -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,13 +32,13 @@ 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())
        );
 
-       notice( t('Tag removed') . EOL );
+       info( t('Tag removed') . EOL );
        goaway($a->get_baseurl() . '/' . $_SESSION['photo_return']);
        
        // NOTREACHED
@@ -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']);
@@ -96,4 +96,4 @@ function tagrm_content(&$a) {
 
        return $o;
        
-}
\ No newline at end of file
+}