diff options
author | zotlabs <mike@macgirvin.com> | 2018-04-17 22:23:28 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-04-17 22:23:28 -0700 |
commit | fc7d9c235cf845e687095d4f30d32eca4c12bc4a (patch) | |
tree | f9dfba3974b8790d232d25d19316317cb87ad308 /include/taxonomy.php | |
parent | 0f5ae5cac8770e27e815ac6558862a0fd321446d (diff) | |
download | volse-hubzilla-fc7d9c235cf845e687095d4f30d32eca4c12bc4a.tar.gz volse-hubzilla-fc7d9c235cf845e687095d4f30d32eca4c12bc4a.tar.bz2 volse-hubzilla-fc7d9c235cf845e687095d4f30d32eca4c12bc4a.zip |
minor code optimisation
Diffstat (limited to 'include/taxonomy.php')
-rw-r--r-- | include/taxonomy.php | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/include/taxonomy.php b/include/taxonomy.php index c46f60e46..f65cdd941 100644 --- a/include/taxonomy.php +++ b/include/taxonomy.php @@ -174,8 +174,7 @@ function tagadelic($uid, $count = 0, $authors = '', $owner = '', $flags = 0, $re if(! is_array($authors)) $authors = array($authors); - stringify_array_elms($authors,true); - $sql_options .= " and author_xchan in (" . implode(',',$authors) . ") "; + $sql_options .= " and author_xchan in (" . stringify_array($authors,true) . ") "; } if($owner) { @@ -227,8 +226,7 @@ function card_tagadelic($uid, $count = 0, $authors = '', $owner = '', $flags = 0 if(! is_array($authors)) $authors = array($authors); - stringify_array_elms($authors,true); - $sql_options .= " and author_xchan in (" . implode(',',$authors) . ") "; + $sql_options .= " and author_xchan in (" . stringify_array($authors,true) . ") "; } if($owner) { @@ -280,8 +278,7 @@ function article_tagadelic($uid, $count = 0, $authors = '', $owner = '', $flags if(! is_array($authors)) $authors = array($authors); - stringify_array_elms($authors,true); - $sql_options .= " and author_xchan in (" . implode(',',$authors) . ") "; + $sql_options .= " and author_xchan in (" . stringify_array($authors,true) . ") "; } if($owner) { @@ -351,8 +348,7 @@ function pub_tagadelic($net,$site,$limit,$recent,$safemode,$type) { if($safemode) { $unsafetags = get_config('system','unsafepubtags', [ 'boobs', 'bot', 'rss', 'girl','girls', 'nsfw', 'sexy', 'nude' ]); if($unsafetags) { - stringify_array_elms($unsafetags,true); - $sql_extra .= " and not term.term in ( " . implode(",",$unsafetags) . ") "; + $sql_extra .= " and not term.term in ( " . stringify_array($unsafetags,true) . ") "; } } @@ -621,9 +617,8 @@ function get_things($profile_hash,$uid) { if(! in_array($rr['obj_obj'],$profile_hashes)) $profile_hashes[] = $rr['obj_obj']; } - stringify_array_elms($profile_hashes); if(! $profile_hash) { - $exp = explode(',',$profile_hashes); + $exp = stringify_array($profile_hashes,true); $p = q("select profile_guid as hash, profile_name as name from profile where profile_guid in ( $exp ) "); if($p) { foreach($r as $rr) { |