]> git.mxchange.org Git - friendica.git/commitdiff
Merge branch 'master' of github.com:annando/friendica
authorMichael <icarus@dabo.de>
Sat, 26 May 2012 10:06:19 +0000 (12:06 +0200)
committerMichael <icarus@dabo.de>
Sat, 26 May 2012 10:06:19 +0000 (12:06 +0200)
Conflicts:
mod/network.php

1  2 
mod/network.php

diff --cc mod/network.php
index fbfe2de4fd1775008adc2bc6506eef0db4b32b52,6b4fa9a5b3e899852fe3df0e1450d4dd4644f184..a94272a4290fac21307bb6a720ae402db89d3d4e
@@@ -414,15 -426,24 +426,23 @@@ function network_content(&$a, $update 
        if($conv) {
                $myurl = $a->get_baseurl() . '/profile/'. $a->user['nickname'];
                $myurl = substr($myurl,strpos($myurl,'://')+3);
 -              $myurl = str_replace(array('www.','.'),array('','\\.'),$myurl);
 +              $myurl = str_replace('www.','',$myurl);
                $diasp_url = str_replace('/profile/','/u/',$myurl);
-               $sql_extra .= sprintf(" AND `item`.`parent` IN (SELECT distinct(`parent`) from item where ( `author-link` like '%s' or `tag` like '%s' or tag like '%s' )) ",
-                       dbesc(protect_sprintf('%' . $myurl)),
-                       dbesc(protect_sprintf('%' . $myurl . ']%')),
-                       dbesc(protect_sprintf('%' . $diasp_url . ']%'))
-               );
+               if (get_config('system','use_fulltext_engine'))
+                       $sql_extra .= sprintf(" AND `item`.`parent` IN (SELECT distinct(`parent`) from item where (MATCH(`author-link`) AGAINST ('".'"%s"'."' in boolean mode) or MATCH(`tag`) AGAINST ('".'"%s"'."' in boolean mode) or MATCH(tag) AGAINST ('".'"%s"'."' in boolean mode))) ",
+                               dbesc(protect_sprintf($myurl)),
+                               dbesc(protect_sprintf($myurl)),
+                               dbesc(protect_sprintf($diasp_url))
+                       );
+               else
+                       $sql_extra .= sprintf(" AND `item`.`parent` IN (SELECT distinct(`parent`) from item where ( `author-link` like '%s' or `tag` like '%s' or tag like '%s' )) ",
+                               dbesc(protect_sprintf('%' . $myurl)),
+                               dbesc(protect_sprintf('%' . $myurl . '\\]%')),
+                               dbesc(protect_sprintf('%' . $diasp_url . '\\]%'))
+                       );
        }
  
 -
        if($update) {
  
                // only setup pagination on initial page view