aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-10-01 17:30:15 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-10-01 17:30:15 -0700
commitdd45e7b4eb67bb65d2d90634c4e03d70a4605e30 (patch)
tree63c8e7545bbca6344f84d7681edeaa707f6d1281 /include
parentf472071f6f77e13715d6bd3ac44e6311d2438142 (diff)
parent63eb0e3a38c2e1d0548c1beb3260613f3e5503a6 (diff)
downloadvolse-hubzilla-dd45e7b4eb67bb65d2d90634c4e03d70a4605e30.tar.gz
volse-hubzilla-dd45e7b4eb67bb65d2d90634c4e03d70a4605e30.tar.bz2
volse-hubzilla-dd45e7b4eb67bb65d2d90634c4e03d70a4605e30.zip
Merge https://github.com/redmatrix/redmatrix into pending_merge
Diffstat (limited to 'include')
-rw-r--r--include/taxonomy.php2
-rw-r--r--include/zot.php8
2 files changed, 5 insertions, 5 deletions
diff --git a/include/taxonomy.php b/include/taxonomy.php
index a82cf94f7..e68b9659f 100644
--- a/include/taxonomy.php
+++ b/include/taxonomy.php
@@ -185,7 +185,7 @@ function dir_tagadelic($count = 0) {
$count = intval($count);
// Fetch tags
- $r = q("select xtag_term, count(xtag_term) as total from xtag
+ $r = q("select xtag_term, count(xtag_term) as total from xtag where xtag_flags = 0
group by xtag_term order by total desc %s",
((intval($count)) ? "limit $count" : '')
);
diff --git a/include/zot.php b/include/zot.php
index 942490551..dd9222bf3 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -902,7 +902,7 @@ function import_xchan($arr,$ud_flags = UPDATE_FLAGS_UPDATED, $ud_arr = null) {
$r = q("delete from xprof where xprof_hash = '%s'",
dbesc($xchan_hash)
);
- $r = q("delete from xtag where xtag_hash = '%s'",
+ $r = q("delete from xtag where xtag_hash = '%s' and xtag_flags = 0",
dbesc($xchan_hash)
);
}
@@ -2600,7 +2600,7 @@ function import_directory_profile($hash, $profile, $addr, $ud_flags = UPDATE_FLA
function import_directory_keywords($hash, $keywords) {
$existing = array();
- $r = q("select * from xtag where xtag_hash = '%s'",
+ $r = q("select * from xtag where xtag_hash = '%s' and xtag_flags = 0",
dbesc($hash)
);
@@ -2618,14 +2618,14 @@ function import_directory_keywords($hash, $keywords) {
foreach($existing as $x) {
if(! in_array($x, $clean))
- $r = q("delete from xtag where xtag_hash = '%s' and xtag_term = '%s'",
+ $r = q("delete from xtag where xtag_hash = '%s' and xtag_term = '%s' and xtag_flags = 0",
dbesc($hash),
dbesc($x)
);
}
foreach($clean as $x) {
if(! in_array($x, $existing)) {
- $r = q("insert into xtag ( xtag_hash, xtag_term) values ( '%s' ,'%s' )",
+ $r = q("insert into xtag ( xtag_hash, xtag_term, xtag_flags) values ( '%s' ,'%s', 0 )",
dbesc($hash),
dbesc($x)
);