{"id":303,"date":"2007-05-01T18:09:31","date_gmt":"2007-05-01T22:09:31","guid":{"rendered":"http:\/\/www.dr-chuck.com\/wordpress\/?p=303"},"modified":"2011-12-17T12:22:43","modified_gmt":"2011-12-17T16:22:43","slug":"small-code-refactor-in-portal","status":"publish","type":"post","link":"https:\/\/www.dr-chuck.com\/csev-blog\/2007\/05\/small-code-refactor-in-portal\/","title":{"rendered":"Small Code Refactor in Portal"},"content":{"rendered":"<p>I did a bit of a refactor and removed some duplicate code that was getting ugly to maintain in<br \/>\nSkinnableCharonPortal.java<br \/>\nWorksiteHandler.java<br \/>\nIt was the code that sets up the order of the top tabs.  Some folks like Charles Sturt are interested in customizing this code and it is really sad to maintain it two places particularly when customizing it across a few releases.<br \/>\nIt is a simple refactor &#8211; stuff that was natively in the context is now in a map called siteTabs like in this diff:<br \/>\n-#if (  $pageNavToolsCount > 1 || ! $pageMaxIfSingle )<br \/>\n+#if ( $sitePages.pageNavToolsCount > 1 || ! $sitePages.pageMaxIfSingle )<br \/>\nIf this goes awry &#8211; you will see the string &#8220;$siteTabs&#8221; in your output.   I have tested every place I could think of &#8211; but it is always possible to have made a mistake.<\/p>\n<p><!--more--><br \/>\ncharles-severances-computer:~\/dev\/sakai\/portal csev$ svn commit<br \/>\nSending        portal-api\/api\/src\/java\/org\/sakaiproject\/portal\/api\/Portal.java<br \/>\nSending        portal-impl\/impl\/src\/java\/org\/sakaiproject\/portal\/charon\/SkinnableCharonPortal.java<br \/>\nSending        portal-impl\/impl\/src\/java\/org\/sakaiproject\/portal\/charon\/handlers\/WorksiteHandler.java<br \/>\nSending        portal-render-engine-impl\/pack\/src\/webapp\/vm\/defaultskin\/macros.vm<br \/>\nTransmitting file data &#8230;.<br \/>\nCommitted revision 29819.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I did a bit of a refactor and removed some duplicate code that was getting ugly to maintain in SkinnableCharonPortal.java WorksiteHandler.java It was the code that sets up the order of the top tabs. Some folks like Charles Sturt are interested in customizing this code and it is really sad to maintain it two places [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-303","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/303","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/comments?post=303"}],"version-history":[{"count":1,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/303\/revisions"}],"predecessor-version":[{"id":2394,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/303\/revisions\/2394"}],"wp:attachment":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/media?parent=303"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/categories?post=303"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/tags?post=303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}