From: Chad Horohoe Date: Fri, 20 Jun 2014 14:24:09 +0000 (-0700) Subject: SearchResultSet: remove hasResults(), unused X-Git-Tag: 1.31.0-rc.0~15313^2 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=bea8e24db2ac60ce79e60ea3ad2d3886acaba9cf;p=lhc%2Fweb%2Fwiklou.git SearchResultSet: remove hasResults(), unused SolrStore, MWSearch and CirrusSearch all implement this and are now free to drop their implementations. Change-Id: Ia04bd3fc8526c35c3c9590c7fe4e2db2bc120283 --- diff --git a/includes/search/SearchResultSet.php b/includes/search/SearchResultSet.php index f753e3d190..f430dd0926 100644 --- a/includes/search/SearchResultSet.php +++ b/includes/search/SearchResultSet.php @@ -40,16 +40,6 @@ class SearchResultSet { return 0; } - /** - * Return true if results are included in this result set. - * STUB - * - * @return bool - */ - function hasResults() { - return false; - } - /** * Some search modes return a total hit count for the query * in the entire article database. This may include pages @@ -200,12 +190,8 @@ class SearchNearMatchResultSet extends SearchResultSet { $this->result = $match; } - public function hasResult() { - return (bool)$this->result; - } - public function numRows() { - return $this->hasResults() ? 1 : 0; + return $this->result ? 1 : 0; } public function next() {