From fe6cc35cbc78214e0fa3f6d80890d9e0f5927ac6 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Mon, 8 May 2017 22:50:25 +0200 Subject: [PATCH] Revert "Added user torrents search" This reverts commit 65a543478a4fc7472e08c3e7cb55890cb0e2d745. --- util/search/search.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/util/search/search.go b/util/search/search.go index 18929435..cf89477f 100644 --- a/util/search/search.go +++ b/util/search/search.go @@ -19,7 +19,6 @@ type SearchParam struct { Max int Status string Sort string - UserId string } func SearchByQuery(r *http.Request, pagenum int) (SearchParam, []model.Torrents, int) { @@ -38,7 +37,6 @@ func SearchByQuery(r *http.Request, pagenum int) (SearchParam, []model.Torrents, search_param.Status = r.URL.Query().Get("s") search_param.Sort = r.URL.Query().Get("sort") search_param.Order = r.URL.Query().Get("order") - search_param.UserId = r.URL.Query().Get("userId") catsSplit := strings.Split(search_param.Category, "_") // need this to prevent out of index panics @@ -95,11 +93,6 @@ func SearchByQuery(r *http.Request, pagenum int) (SearchParam, []model.Torrents, } parameters.Params = append(parameters.Params, search_param.Status) } - if search_param.UserId != "" { - - conditions = append(conditions, "owner_id = ?") - parameters.Params = append(parameters.Params, search_param.UserId) - } searchQuerySplit := strings.Fields(search_param.Query) for i, word := range searchQuerySplit { firstRune, _ := utf8.DecodeRuneInString(word)