diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-10-01 17:28:03 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-10-01 17:28:03 -0700 |
commit | 63eb0e3a38c2e1d0548c1beb3260613f3e5503a6 (patch) | |
tree | f3cee4f97e01fe07c0146ef71f60049bbda47bc4 /include/zot.php | |
parent | de4b5978c325012f225b50e69a1997c4a361ff9b (diff) | |
download | volse-hubzilla-63eb0e3a38c2e1d0548c1beb3260613f3e5503a6.tar.gz volse-hubzilla-63eb0e3a38c2e1d0548c1beb3260613f3e5503a6.tar.bz2 volse-hubzilla-63eb0e3a38c2e1d0548c1beb3260613f3e5503a6.zip |
allow additional uses for xtags
Diffstat (limited to 'include/zot.php')
-rw-r--r-- | include/zot.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/zot.php b/include/zot.php index fe51d1a7c..31fd4dbdd 100644 --- a/include/zot.php +++ b/include/zot.php @@ -918,7 +918,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) ); } @@ -2585,7 +2585,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) ); @@ -2603,14 +2603,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) ); |