X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fnetwork.php;h=2a3db597e838a5d118adecd337860bbb2b4ae38c;hb=0c24784f5e92e0c8269f255e962312574871f2f0;hp=e05791614da51eb8995b55e14ffb39d8daa474db;hpb=73564df4d8e3dc42b9a1b179fb7c2ac8bc4b98b1;p=friendica.git diff --git a/mod/network.php b/mod/network.php index e05791614d..2a3db597e8 100644 --- a/mod/network.php +++ b/mod/network.php @@ -68,17 +68,16 @@ function saved_searches($search) { $o = ''; - $r = q("select `term` from `search` WHERE `uid` = %d", + $r = q("select `id`,`term` from `search` WHERE `uid` = %d", intval(local_user()) ); $saved = array(); - - if(count($r)) { foreach($r as $rr) { $saved[] = array( + 'id' => $rr['id'], 'term' => $rr['term'], 'encodedterm' => urlencode($rr['term']), 'delete' => t('Remove term'), @@ -374,9 +373,11 @@ function network_content(&$a, $update = 0) { $myurl = $a->get_baseurl() . '/profile/'. $a->user['nickname']; $myurl = substr($myurl,strpos($myurl,'://')+3); $myurl = str_replace(array('www.','.'),array('','\\.'),$myurl); - $sql_extra .= sprintf(" AND `item`.`parent` IN (SELECT distinct(`parent`) from item where ( `author-link` regexp '%s' or `tag` regexp '%s' )) ", + $diasp_url = str_replace('/profile/','/u/',$myurl); + $sql_extra .= sprintf(" AND `item`.`parent` IN (SELECT distinct(`parent`) from item where ( `author-link` regexp '%s' or `tag` regexp '%s' or tag regexp '%s' )) ", dbesc($myurl . '$'), - dbesc($myurl . '\\]') + dbesc($myurl . '\\]'), + dbesc($diasp_url . '\\]') ); }