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 @@ ...@@ -44,10 +44,17 @@
Search Plugin Changelog Search Plugin Changelog
</h1> </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> <p><b>1.3.1</b> -- March 12, 2007</p>
<ul> <ul>
<li>Fixed UnsupportedOperationException from occuring when using LDAP.</li> <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> </ul>
<p><b>1.3.0</b> -- February 28, 2007</p> <p><b>1.3.0</b> -- February 28, 2007</p>
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<name>Search</name> <name>Search</name>
<description>Provides support for Jabber Search (XEP-0055)</description> <description>Provides support for Jabber Search (XEP-0055)</description>
<author>Ryan Graham</author> <author>Ryan Graham</author>
<version>1.3.1</version> <version>1.3.2</version>
<date>03/12/2007</date> <date>04/03/2007</date>
<minServerVersion>3.1.0</minServerVersion> <minServerVersion>3.1.0</minServerVersion>
<adminconsole> <adminconsole>
......
...@@ -75,6 +75,7 @@ public class SearchPlugin implements Component, Plugin, PropertyEventListener { ...@@ -75,6 +75,7 @@ public class SearchPlugin implements Component, Plugin, PropertyEventListener {
exculudedFields = StringUtils.stringToCollection(JiveGlobals.getProperty(EXCLUDEDFIELDS, "")); exculudedFields = StringUtils.stringToCollection(JiveGlobals.getProperty(EXCLUDEDFIELDS, ""));
serverName = XMPPServer.getInstance().getServerInfo().getName(); serverName = XMPPServer.getInstance().getServerInfo().getName();
userManager = UserManager.getInstance();
// Some clients, such as Miranda, are hard-coded to search specific fields, // Some clients, such as Miranda, are hard-coded to search specific fields,
// so we map those fields to the fields that Wildfire actually supports. // so we map those fields to the fields that Wildfire actually supports.
...@@ -124,10 +125,12 @@ public class SearchPlugin implements Component, Plugin, PropertyEventListener { ...@@ -124,10 +125,12 @@ public class SearchPlugin implements Component, Plugin, PropertyEventListener {
catch (Exception e) { catch (Exception e) {
componentManager.getLog().error(e); componentManager.getLog().error(e);
} }
serviceName = null;
userManager = null; userManager = null;
exculudedFields = null;
serverName = null;
fieldLookup = null; fieldLookup = null;
reverseFieldLookup = null; reverseFieldLookup = null;
exculudedFields = null;
} }
public void shutdown() { public void shutdown() {
...@@ -160,8 +163,8 @@ public class SearchPlugin implements Component, Plugin, PropertyEventListener { ...@@ -160,8 +163,8 @@ public class SearchPlugin implements Component, Plugin, PropertyEventListener {
Element responseElement = replyPacket Element responseElement = replyPacket
.setChildElement("query", "http://jabber.org/protocol/disco#info"); .setChildElement("query", "http://jabber.org/protocol/disco#info");
responseElement.addElement("identity").addAttribute("category", "search") responseElement.addElement("identity").addAttribute("category", "directory")
.addAttribute("type", "text") .addAttribute("type", "user")
.addAttribute("name", "User Search"); .addAttribute("name", "User Search");
responseElement.addElement("feature").addAttribute("var", "jabber:iq:search"); responseElement.addElement("feature").addAttribute("var", "jabber:iq:search");
...@@ -457,7 +460,6 @@ public class SearchPlugin implements Component, Plugin, PropertyEventListener { ...@@ -457,7 +460,6 @@ public class SearchPlugin implements Component, Plugin, PropertyEventListener {
// See if the installed provider supports searching. If not, workaround // See if the installed provider supports searching. If not, workaround
// by providing our own searching. // by providing our own searching.
try { try {
userManager = UserManager.getInstance();
searchFields = new ArrayList<String>(userManager.getSearchFields()); searchFields = new ArrayList<String>(userManager.getSearchFields());
} }
catch (UnsupportedOperationException uoe) { 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