/** * Return a partial WHERE clause to limit the search to the given namespaces * @return String */ function queryNamespaces() { if (is_null($this->namespaces)) { return ''; } # search all if (!count($this->namespaces)) { $namespaces = '0'; } else { $namespaces = $this->db->makeList($this->namespaces); } return 'AND page_namespace IN (' . $namespaces . ')'; }