 		# reduce and mutate the results
 		if Session.equals('search_ignores_versions', true) is true
 			filtered_pkgs = []
-
 			for obj, i in pkgs
 				found = false
 				for fobj,j in filtered_pkgs

			}

		# We'll flip a and b to make the newest versions first
		pkgs = pkgs.sort (b,a)->
			name_order = a.name.localeCompare(b.name)
			if name_order is 0
				Mandrill.util.versionCompare a.version, b.version

		'/pkg.png'


# Searches for the pkginfo item by name and returns its display_name, if there is one.
Template.manifest_installer_item.pkg_display_name = ->
	pkg = MunkiPkgsinfo.findOne({'dom.name': this.toString().split('-')[0]})
	if pkg? and pkg.dom? and pkg.dom.display_name?
		pkg.dom.display_name


# Searches for a matching pkginfo item by its name and returns `true` if found,
# `false` if not.
Template.manifest_installer_item.pkg_name_is_valid = ->
	MunkiPkgsinfo.findOne({'dom.name': this.toString()})?

