natecavanaugh/liferay-portal — pull request #546 by ivicac (2012-02-01 22:23:59+00:00)
Title: LPS-17128: Non-instanceable portlets are able to add to page when same portlet is embedded in the theme

Hi Nate,
I have replaced javascript part regarding to arrays as jou advised, but nested loop in view_category.jsp and view.jsp needs to stay because it is doing the same thing for runtime portlets as layoutTypePortlet.hasPortletId method for regular portlets. If you go inside of layoutTypePortlet.hasPortletId method you will see two nested loops. The first one is going through the list of columns and then the second one is going through the list of regular portlets that are the part of current column.