Bug 409168 Exclude unnamed topics from help viewer r=Waldo a=mconnor (over IRC)

This commit is contained in:
neil@parkwaycc.co.uk 2007-12-22 03:57:49 -08:00
parent b56b55c8cf
commit f57ee1c2ed
2 changed files with 6 additions and 7 deletions

View File

@ -689,9 +689,10 @@ function doFindOnSeq(resultsDS, sourceDS, resource, level) {
var target = targets.getNext();
var link = sourceDS.GetTarget(target, NC_LINK, true);
var name = sourceDS.GetTarget(target, NC_NAME, true);
name = name.QueryInterface(Components.interfaces.nsIRDFLiteral);
if (link && isMatch(name.Value)) {
if (link &&
name instanceof Components.interfaces.nsIRDFLiteral &&
isMatch(name.Value)) {
// we have found a search entry - add it to the results datasource.
var urn = RDF.GetAnonymousResource();
resultsDS.Assert(urn, NC_NAME, name, true);

View File

@ -209,12 +209,10 @@
object="?subheadings"/>
<member container="?subheadings"
child="?subheading"/>
<triple subject="?subheading"
predicate="http://home.netscape.com/NC-rdf#name"
object="?name"/>
</conditions>
<bindings>
<binding subject="?subheading"
predicate="http://home.netscape.com/NC-rdf#name"
object="?name"/>
</bindings>
<action>
<treechildren>
<treeitem uri="?subheading">