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

git-svn-id: svn://10.0.0.236/trunk@242010 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
neil%parkwaycc.co.uk
2007-12-22 11:57:49 +00:00
parent cf9456d15e
commit 5f98068a63
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">