String[] publishInode = req.getParameterValues("publishInode");
if (publishInode == null) return;
ActionRequestImpl reqImpl = (ActionRequestImpl)req;
//creates a set of related pages for this template
Set relatedPages = new HashSet();
for (int i=0;i<publishInode.length;i++) {
Template template = (Template) InodeFactory.getInode(publishInode[i],Template.class);
if (InodeUtils.isSet(template.getInode())) {
//calls the asset factory edit
try{
PublishFactory.publishAsset(template,reqImpl.getHttpServletRequest());
ActivityLogger.logInfo(this.getClass(), "Publish Template action", "User " + user.getPrimaryKey() + " publishing template" + template.getTitle(), HostUtil.hostNameUtil(req, _getUser(req)));
SessionMessages.add(req, "message", "message.template_list.published");
}catch(WebAssetException wax){
Logger.error(this, wax.getMessage(),wax);
SessionMessages.add(req, "error", "message.webasset.published.failed");