removed invalid "as" html attribute from param2 in commentcounter_macro

This commit is contained in:
Tobi Schäfer 2004-04-22 13:16:01 +00:00
parent 9f0c544f8f
commit d07a749608

View file

@ -216,18 +216,22 @@ function commentcounter_macro(param) {
// cloning the param object to remove the macro-specific // cloning the param object to remove the macro-specific
// attributes from the clone for valid markup output: // attributes from the clone for valid markup output:
var param2 = Object.clone(param); var param2 = Object.clone(param);
delete param2.as;
delete param2.one; delete param2.one;
delete param2.more; delete param2.more;
delete param2.no; delete param2.no;
var linkflag = (param.as == "link" && param.as != "text" || !param.as && commentCnt > 0); var linkflag = (param.as == "link" && param.as != "text" ||
!param.as && commentCnt > 0);
if (linkflag) if (linkflag)
Html.openTag("a", this.createLinkParam(param2)); Html.openTag("a", this.createLinkParam(param2));
if (commentCnt == 0) if (commentCnt == 0)
res.write(param.no || param.no == "" ? param.no : getMessage("Comment.no")); res.write(param.no || param.no == "" ?
param.no : getMessage("Comment.no"));
else if (commentCnt == 1) else if (commentCnt == 1)
res.write(param.one ? param.one : getMessage("Comment.one")); res.write(param.one ? param.one : getMessage("Comment.one"));
else else
res.write(commentCnt + (param.more ? param.more : " " + getMessage("Comment.more"))); res.write(commentCnt + (param.more ?
param.more : " " + getMessage("Comment.more")));
if (linkflag) if (linkflag)
Html.closeTag("a"); Html.closeTag("a");
return; return;