aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-06-04 22:52:17 -0700
committerfriendica <info@friendica.com>2013-06-04 22:52:17 -0700
commit0ef71dd4e27c9ad88d60746ca04d06529db7fe4e (patch)
tree3f3497029327a0253d3a5c994236096d4a0d7072 /include/text.php
parent8321a2e41a09ba77749b288cca003413fe6a9ebb (diff)
downloadvolse-hubzilla-0ef71dd4e27c9ad88d60746ca04d06529db7fe4e.tar.gz
volse-hubzilla-0ef71dd4e27c9ad88d60746ca04d06529db7fe4e.tar.bz2
volse-hubzilla-0ef71dd4e27c9ad88d60746ca04d06529db7fe4e.zip
This should get community tagging pretty close to working - deleting a community tag is left as a FIXME
Diffstat (limited to 'include/text.php')
-rwxr-xr-xinclude/text.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/text.php b/include/text.php
index ba2f1209c..71f2257ac 100755
--- a/include/text.php
+++ b/include/text.php
@@ -1594,7 +1594,7 @@ function store_item_tag($uid,$iid,$otype,$type,$term,$url = '') {
dbesc($term),
dbesc($url)
);
- if(count($r))
+ if($r)
return false;
$r = q("insert into term (uid, oid, otype, type, term, url)
values( %d, %d, %d, %d, '%s', '%s') ",
@@ -1646,7 +1646,7 @@ function file_tag_save_file($uid,$item,$file) {
intval($item),
intval($uid)
);
- if(count($r)) {
+ if($r) {
if(! stristr($r[0]['file'],'[' . file_tag_encode($file) . ']'))
q("update item set file = '%s' where id = %d and uid = %d limit 1",
dbesc($r[0]['file'] . '[' . file_tag_encode($file) . ']'),
@@ -1676,7 +1676,7 @@ function file_tag_unsave_file($uid,$item,$file,$cat = false) {
intval($item),
intval($uid)
);
- if(! count($r))
+ if(! $r)
return false;
q("update item set file = '%s' where id = %d and uid = %d limit 1",
@@ -1689,7 +1689,7 @@ function file_tag_unsave_file($uid,$item,$file,$cat = false) {
intval($uid)
);
- if(! count($r)) {
+ if(! $r) {
$saved = get_pconfig($uid,'system','filetags');
set_pconfig($uid,'system','filetags',str_replace($pattern,'',$saved));