Code Duplication    Length = 11-11 lines in 2 locations

includes/search/SearchOracle.php 1 location

@@ 95-105 (lines=11) @@
92
	 * Return a partial WHERE clause to limit the search to the given namespaces
93
	 * @return string
94
	 */
95
	function queryNamespaces() {
96
		if ( is_null( $this->namespaces ) ) {
97
			return '';
98
		}
99
		if ( !count( $this->namespaces ) ) {
100
			$namespaces = '0';
101
		} else {
102
			$namespaces = $this->db->makeList( $this->namespaces );
103
		}
104
		return 'AND page_namespace IN (' . $namespaces . ')';
105
	}
106
107
	/**
108
	 * Return a LIMIT clause to limit results on the query.

includes/search/SearchSqlite.php 1 location

@@ 193-203 (lines=11) @@
190
	 * Return a partial WHERE clause to limit the search to the given namespaces
191
	 * @return string
192
	 */
193
	function queryNamespaces() {
194
		if ( is_null( $this->namespaces ) ) {
195
			return '';  # search all
196
		}
197
		if ( !count( $this->namespaces ) ) {
198
			$namespaces = '0';
199
		} else {
200
			$namespaces = $this->db->makeList( $this->namespaces );
201
		}
202
		return 'AND page_namespace IN (' . $namespaces . ')';
203
	}
204
205
	/**
206
	 * Returns a query with limit for number of results set.