Commit baba18d0 authored by Ryan Graham's avatar Ryan Graham Committed by ryang

* Changed discovery category/type from "search/text" to "directory/user".

* Fixed UnsupportedOperationException if the client did not send a iq set/get prior to conducting a search.
* Fixed a possible issue that might prevent the plugin from being destroyed completely.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/branches@7870 b35dd754-fafc-0310-a699-88a17e54d16e
parent f7200908
......@@ -44,10 +44,17 @@
Search Plugin Changelog
</h1>
<p><b>1.3.2</b> -- April 3, 2007</p>
<ul>
<li>Changed discovery category/type from "search/text" to "directory/user".</li>
<li>Fixed UnsupportedOperationException if the client did not send a iq set/get prior to conducting a search.</li>
<li>Fixed a possible issue that might prevent the plugin from being destroyed completely.</li>
</ul>
<p><b>1.3.1</b> -- March 12, 2007</p>
<ul>
<li>Fixed UnsupportedOperationException from occuring when using LDAP.</li>
<li>On the Advanced User Search unescape username in the search results.</a>
<li>On the Advanced User Search unescape username in the search results.</li>
</ul>
<p><b>1.3.0</b> -- February 28, 2007</p>
......
......@@ -5,8 +5,8 @@
<name>Search</name>
<description>Provides support for Jabber Search (XEP-0055)</description>
<author>Ryan Graham</author>
<version>1.3.1</version>
<date>03/12/2007</date>
<version>1.3.2</version>
<date>04/03/2007</date>
<minServerVersion>3.1.0</minServerVersion>
<adminconsole>
......
......@@ -75,6 +75,7 @@ public class SearchPlugin implements Component, Plugin, PropertyEventListener {
exculudedFields = StringUtils.stringToCollection(JiveGlobals.getProperty(EXCLUDEDFIELDS, ""));
serverName = XMPPServer.getInstance().getServerInfo().getName();
userManager = UserManager.getInstance();
// Some clients, such as Miranda, are hard-coded to search specific fields,
// so we map those fields to the fields that Wildfire actually supports.
......@@ -124,10 +125,12 @@ public class SearchPlugin implements Component, Plugin, PropertyEventListener {
catch (Exception e) {
componentManager.getLog().error(e);
}
serviceName = null;
userManager = null;
exculudedFields = null;
serverName = null;
fieldLookup = null;
reverseFieldLookup = null;
exculudedFields = null;
}
public void shutdown() {
......@@ -160,8 +163,8 @@ public class SearchPlugin implements Component, Plugin, PropertyEventListener {
Element responseElement = replyPacket
.setChildElement("query", "http://jabber.org/protocol/disco#info");
responseElement.addElement("identity").addAttribute("category", "search")
.addAttribute("type", "text")
responseElement.addElement("identity").addAttribute("category", "directory")
.addAttribute("type", "user")
.addAttribute("name", "User Search");
responseElement.addElement("feature").addAttribute("var", "jabber:iq:search");
......@@ -303,7 +306,7 @@ public class SearchPlugin implements Component, Plugin, PropertyEventListener {
}
}
private Hashtable<String, String> extractSearchQuery(Element incomingForm) {
private Hashtable<String, String> extractSearchQuery(Element incomingForm) {
Hashtable<String, String> searchList = new Hashtable<String, String>();
Element form = incomingForm.element(QName.get("x", "jabber:x:data"));
if (form == null) {
......@@ -457,7 +460,6 @@ public class SearchPlugin implements Component, Plugin, PropertyEventListener {
// See if the installed provider supports searching. If not, workaround
// by providing our own searching.
try {
userManager = UserManager.getInstance();
searchFields = new ArrayList<String>(userManager.getSearchFields());
}
catch (UnsupportedOperationException uoe) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment