aboutsummaryrefslogtreecommitdiffstats
path: root/mod/search.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-03-21 18:25:41 -0700
committerfriendica <info@friendica.com>2013-03-21 18:25:41 -0700
commitddf5bf8968a12501939cd37898d303967b748600 (patch)
tree9ec457948c7fadae811b1af676257c43bab93d4c /mod/search.php
parentb3c699d49a5ef2023fcbdaa8226be95fce9589a7 (diff)
downloadvolse-hubzilla-ddf5bf8968a12501939cd37898d303967b748600.tar.gz
volse-hubzilla-ddf5bf8968a12501939cd37898d303967b748600.tar.bz2
volse-hubzilla-ddf5bf8968a12501939cd37898d303967b748600.zip
rename 'uri' (and parent_uri) to 'mid' (and parent_mid) since these no longer remotely resemble uri's and are actually message_id's. This change is potentially destabilising because it touches a lot of code and structure. But it has to get done and there's no better time than the present.
Diffstat (limited to 'mod/search.php')
-rw-r--r--mod/search.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/mod/search.php b/mod/search.php
index 1bea720a6..9ae9414d2 100644
--- a/mod/search.php
+++ b/mod/search.php
@@ -190,12 +190,12 @@ function search_content(&$a) {
$pager_sql = sprintf(" LIMIT %d, %d ",intval($a->pager['start']), intval($a->pager['itemspage']));
if($load) {
- $r = q("SELECT distinct(uri), item.* from item
+ $r = q("SELECT distinct(mid), item.* from item
WHERE item_restrict = 0
AND (( `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND item_private = 0 )
OR ( `item`.`uid` = %d ))
$sql_extra
- group by uri ORDER BY created DESC $pager_sql ",
+ group by mid ORDER BY created DESC $pager_sql ",
intval(local_user()),
intval(ABOOK_FLAG_BLOCKED)
@@ -228,7 +228,7 @@ function search_content(&$a) {
- $r = q("SELECT distinct(`item`.`uri`), `item`.*, `item`.`id` AS `item_id`,
+ $r = q("SELECT distinct(`item`.`mid`), `item`.*, `item`.`id` AS `item_id`,
`contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`alias`, `contact`.`rel`,
`contact`.`network`, `contact`.`thumb`, `contact`.`self`, `contact`.`writable`,
`contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`,
@@ -240,7 +240,7 @@ function search_content(&$a) {
OR `item`.`uid` = %d )
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
$sql_extra
- group by `item`.`uri`
+ group by `item`.`mid`
ORDER BY `received` DESC LIMIT %d , %d ",
intval(local_user()),
intval($a->pager['start']),