Produced by Araxis Merge on Fri Oct 19 14:26:00 2007 UTC. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a reasonably standards compliant browser such as the latest version of Internet Explorer. For optimum results when printing this report, enable printing of background images and colours in your browser and use landscape orientation.
| # | File | Location | Last Modified |
|---|---|---|---|
| 1 | common_vars.inc | C:\jahia\template_diff\V2_JAHIA_5_0_2\src\jsp\common | Fri Oct 19 14:17:32 2007 UTC |
| 2 | common_vars.inc | C:\jahia\template_diff\V2_JAHIA_5_0_3\src\jsp\common | Fri Oct 19 14:16:50 2007 UTC |
| Description | Between Files 1 and 2 | |
|---|---|---|
| Blocks | Lines | |
| Unchanged | 3 | 187 |
| Changed | 0 | 0 |
| Inserted | 2 | 2 |
| Removed | 0 | 0 |
| Whitespace | All differences in whitespace within lines are ignored |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Hidden in comparison detail |
No regular expressions were active.
| 1 | <%-- | 1 | <%-- | |||
| 2 | Copyright 2002-2006 Jahia Ltd | 2 | Copyright 2002-2006 Jahia Ltd | |||
| 3 | 3 | |||||
| 4 | Licensed under the JAHIA COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (JCDDL), | 4 | Licensed under the JAHIA COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (JCDDL), | |||
| 5 | Version 1.0 (the "License"), or (at your option) any later version; you may | 5 | Version 1.0 (the "License"), or (at your option) any later version; you may | |||
| 6 | not use this file except in compliance with the License. You should have | 6 | not use this file except in compliance with the License. You should have | |||
| 7 | received a copy of the License along with this program; if not, you may obtain | 7 | received a copy of the License along with this program; if not, you may obtain | |||
| 8 | a copy of the License at | 8 | a copy of the License at | |||
| 9 | 9 | |||||
| 10 | http://www.jahia.org/license/ | 10 | http://www.jahia.org/license/ | |||
| 11 | 11 | |||||
| 12 | Unless required by applicable law or agreed to in writing, software | 12 | Unless required by applicable law or agreed to in writing, software | |||
| 13 | distributed under the License is distributed on an "AS IS" BASIS, | 13 | distributed under the License is distributed on an "AS IS" BASIS, | |||
| 14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
| 15 | See the License for the specific language governing permissions and | 15 | See the License for the specific language governing permissions and | |||
| 16 | limitations under the License. | 16 | limitations under the License. | |||
| 17 | --%><% | 17 | --%><% | |||
| 18 | 18 | |||||
| 19 | /******************************************************************************/ | 19 | /******************************************************************************/ | |||
| 20 | /* list of common variables used in this set of template */ | 20 | /* list of common variables used in this set of template */ | |||
| 21 | /******************************************************************************/ | 21 | /******************************************************************************/ | |||
| 22 | 22 | |||||
| 23 | org.apache.log4j.Logger logger = | 23 | org.apache.log4j.Logger logger = | |||
| 24 | org.apache.log4j.Logger.getLogger(getClass()); | 24 | org.apache.log4j.Logger.getLogger(getClass()); | |||
| 25 | //long tt1=System.currentTimeMillis(); | 25 | //long tt1=System.currentTimeMillis(); | |||
| 26 | //logger.debug("-----------------------------------------------------------"); | 26 | //logger.debug("-----------------------------------------------------------"); | |||
| 27 | 27 | |||||
| 28 | JahiaData jData = (JahiaData) request.getAttribute( "org.jahia.data.JahiaData" ); | 28 | JahiaData jData = (JahiaData) request.getAttribute( "org.jahia.data.JahiaData" ); | |||
| 29 | HashMap engineMap = (HashMap) request.getAttribute( "org.jahia.engines.EngineHashMap" ); | 29 | HashMap engineMap = (HashMap) request.getAttribute( "org.jahia.engines.EngineHashMap" ); | |||
| 30 | String contextPath = request.getContextPath(); | 30 | String contextPath = request.getContextPath(); | |||
| 31 | 31 | |||||
| 32 | // get the parambean | 32 | // get the parambean | |||
| 33 | ParamBean jParams = jData.params(); | 33 | ParamBean jParams = jData.params(); | |||
| 34 | // get the entry load request | 34 | // get the entry load request | |||
| 35 | EntryLoadRequest entryLoadRequest = jParams.getEntryLoadRequest(); | 35 | EntryLoadRequest entryLoadRequest = jParams.getEntryLoadRequest(); | |||
| 36 | 36 | |||||
| 37 | // get the operation mode | 37 | // get the operation mode | |||
| 38 | String operationMode = jParams.getOperationMode(); | 38 | String operationMode = jParams.getOperationMode(); | |||
| 39 | 39 | |||||
| 40 | 40 | |||||
| 41 | // get the site and siteId | 41 | // get the site and siteId | |||
| 42 | JahiaSite jahiaSite = jParams.getSite(); | 42 | JahiaSite jahiaSite = jParams.getSite(); | |||
| 43 | int siteId = jParams.getSiteID(); | 43 | int siteId = jParams.getSiteID(); | |||
| 44 | 44 | |||||
| 45 | // get the current user | 45 | // get the current user | |||
| 46 | JahiaUser user = jParams.getUser(); | 46 | JahiaUser user = jParams.getUser(); | |||
| 47 | 47 | |||||
| 48 | //get the locale | 48 | //get the locale | |||
| 49 | String languageCode = jParams.getLocale().toString(); | 49 | String languageCode = jParams.getLocale().toString(); | |||
| 50 | 50 | |||||
| 51 | // generate a bypassUrl URL | 51 | // generate a bypassUrl URL | |||
| 52 | String savedCacheStatus = jParams.getCacheStatus(); | 52 | String savedCacheStatus = jParams.getCacheStatus(); | |||
| 53 | jParams.setCacheStatus(ParamBean.CACHE_BYPASS); | 53 | jParams.setCacheStatus(ParamBean.CACHE_BYPASS); | |||
| 54 | String bypassUrl = jParams.composePageUrl(jData.page().getID()); | 54 | String bypassUrl = jParams.composePageUrl(jData.page().getID()); | |||
| 55 | // generate a cacheoffonce URL | 55 | // generate a cacheoffonce URL | |||
| 56 | jParams.setCacheStatus(ParamBean.CACHE_OFFONCE); | 56 | jParams.setCacheStatus(ParamBean.CACHE_OFFONCE); | |||
| 57 | String actionURL = jParams.composePageUrl(jData.page().getID()); | 57 | String actionURL = jParams.composePageUrl(jData.page().getID()); | |||
| 58 | //restore cachestatus | 58 | //restore cachestatus | |||
| 59 | jParams.setCacheStatus(savedCacheStatus); | 59 | jParams.setCacheStatus(savedCacheStatus); | |||
| 60 | 60 | |||||
| 61 | // get the context url | 61 | // get the context url | |||
| 62 | String contextURL = jData.gui().drawHttpJspContext(request); | 62 | String contextURL = jData.gui().drawHttpJspContext(request); | |||
| 63 | String contextUrl = contextURL; | 63 | String contextUrl = contextURL; | |||
| 64 | 64 | |||||
| 65 | // get the home page ID | 65 | // get the home page ID | |||
| 66 | int homePageId = jData.gui().getContentHomePage().getID(); | 66 | int homePageId = jData.gui().getContentHomePage().getID(); | |||
| 67 | 67 | |||||
| 68 | // get the current page ID and content page | 68 | // get the current page ID and content page | |||
| 69 | int currentPageId = jData.page().getID(); | 69 | int currentPageId = jData.page().getID(); | |||
| 70 | ContentPage contentPage = ContentPage.getPage(currentPageId); | 70 | ContentPage contentPage = ContentPage.getPage(currentPageId); | |||
| 71 | 71 | |||||
| 72 | 72 | |||||
| 73 | //logger.debug("Current user: " + user.getUsername()); | 73 | //logger.debug("Current user: " + user.getUsername()); | |||
| 74 | // isAdmin return true if current user is an administrator | 74 | // isAdmin return true if current user is an administrator | |||
| 75 | boolean isAdmin = user.isAdminMember( siteId ); | 75 | boolean isAdmin = user.isAdminMember( siteId ); | |||
| 76 | 76 | |||||
| 77 | // isEditMode return true if current mode is edit | 77 | // isEditMode return true if current mode is edit | |||
| 78 | boolean isEditMode = jData.gui().isEditMode(); | 78 | boolean isEditMode = jData.gui().isEditMode(); | |||
| 79 | 79 | |||||
| 80 | // isLogged() return true if user is logged | 80 | // isLogged() return true if user is logged | |||
| 81 | boolean isLogged = jData.gui().isLogged(); | 81 | boolean isLogged = jData.gui().isLogged(); | |||
| 82 | 82 | |||||
| 83 | // hasWriteAccess return true if current user has write access on current page | 83 | // hasWriteAccess return true if current user has write access on current page | |||
| 84 | boolean hasWriteAccess = jData.page().checkWriteAccess(user); | 84 | boolean hasWriteAccess = jData.page().checkWriteAccess(user); | |||
| 85 | 85 | |||||
| 86 | // hasAdminAccess return true if current user has admin access on current page | 86 | // hasAdminAccess return true if current user has admin access on current page | |||
| 87 | boolean hasAdminAccess = jData.page().checkAdminAccess(user); | 87 | boolean hasAdminAccess = jData.page().checkAdminAccess(user); | |||
| 88 | 88 | |||||
| 89 | // hasReadAccess return true if current user has read access on current page | 89 | // hasReadAccess return true if current user has read access on current page | |||
| 90 | boolean hasReadAccess = jData.page().checkReadAccess(user); | 90 | boolean hasReadAccess = jData.page().checkReadAccess(user); | |||
| 91 | 91 | |||||
| 92 | // Resource Bundle Definition | 92 | // Resource Bundle Definition | |||
| 93 | //String resBundleID = jParams.getSite().getSiteKey() + "_Corporate_portal_templates_v2"; | 93 | //String resBundleID = jParams.getSite().getSiteKey() + "_Corporate_portal_templates_v2"; | |||
| 94 | // dont put any dynamic and site related data in this bundle ID, or beware... | 94 | // dont put any dynamic and site related data in this bundle ID, or beware... | |||
| 95 | String resBundleID = "CORPORATE_PORTAL_TEMPLATES_V2"; | 95 | String resBundleID = "CORPORATE_PORTAL_TEMPLATES_V2"; | |||
| 96 | StringBuffer resBundleDef = new StringBuffer("<jahia-res-bundle id="); | 96 | StringBuffer resBundleDef = new StringBuffer("<jahia-res-bundle id="); | |||
| 97 | resBundleDef.append(resBundleID); | 97 | resBundleDef.append(resBundleID); | |||
| 98 | resBundleDef.append(" resbundle=jahiatemplates.Corporate_portal_templates_v2>"); | 98 | resBundleDef.append(" resbundle=jahiatemplates.Corporate_portal_templates_v2>"); | |||
| 99 | ServicesRegistry.getInstance().getResourceBundleService() | 99 | ServicesRegistry.getInstance().getResourceBundleService() | |||
| 100 | .declareResourceBundleDefinition(resBundleID,"jahiatemplates.Corporate_portal_templates_v2"); | 100 | .declareResourceBundleDefinition(resBundleID,"jahiatemplates.Corporate_portal_templates_v2"); | |||
| 101 | 101 | |||||
| 102 | // store the navigationContainerList def containers for level 1 | 102 | // store the navigationContainerList def containers for level 1 | |||
| 103 | Vector topNavigationContainerVector = new Vector(); | 103 | Vector topNavigationContainerVector = new Vector(); | |||
| 104 | JahiaContainerList topNavigationContainerList = null; | 104 | JahiaContainerList topNavigationContainerList = null; | |||
| 105 | if (request.getAttribute("topNavigationContainerVector") == null) { | 105 | if (request.getAttribute("topNavigationContainerVector") == null) { | |||
| 106 | logger.debug("topNavigationContainerVector not in request -> compute AbsoluteContainerList"); | 106 | logger.debug("topNavigationContainerVector not in request -> compute AbsoluteContainerList"); | |||
| 107 | topNavigationContainerList = | 107 | topNavigationContainerList = | |||
| 108 | jData.containers().getAbsoluteContainerList( "navigationContainerList",homePageId ); | 108 | jData.containers().getAbsoluteContainerList( "navigationContainerList",homePageId ); | |||
| 109 | request.setAttribute("topNavigationContainerList",topNavigationContainerList); | 109 | request.setAttribute("topNavigationContainerList",topNavigationContainerList); | |||
| 110 | if (topNavigationContainerList != null) { | 110 | if (topNavigationContainerList != null) { | |||
| 111 | Enumeration topNavigationContainers = topNavigationContainerList.getContainers(); | 111 | Enumeration topNavigationContainers = topNavigationContainerList.getContainers(); | |||
| 112 | while (topNavigationContainers.hasMoreElements()) { | 112 | while (topNavigationContainers.hasMoreElements()) { | |||
| 113 | JahiaContainer topNavigationContainer = | 113 | JahiaContainer topNavigationContainer = | |||
| 114 | (JahiaContainer) topNavigationContainers.nextElement(); | 114 | (JahiaContainer) topNavigationContainers.nextElement(); | |||
| 115 | topNavigationContainerVector.add(topNavigationContainer); | 115 | topNavigationContainerVector.add(topNavigationContainer); | |||
| 116 | } | 116 | } | |||
| 117 | } else { | 117 | } else { | |||
| 118 | logger.debug("navigationContainerList on page " + homePageId + " is NULL" ); | 118 | logger.debug("navigationContainerList on page " + homePageId + " is NULL" ); | |||
| 119 | } | 119 | } | |||
| 120 | request.setAttribute("topNavigationContainerVector",topNavigationContainerVector); | 120 | request.setAttribute("topNavigationContainerVector",topNavigationContainerVector); | |||
| 121 | } else { | 121 | } else { | |||
| 122 | topNavigationContainerVector = | 122 | topNavigationContainerVector = | |||
| 123 | (Vector) request.getAttribute("topNavigationContainerVector"); | 123 | (Vector) request.getAttribute("topNavigationContainerVector"); | |||
| 124 | topNavigationContainerList = | 124 | topNavigationContainerList = | |||
| 125 | (JahiaContainerList) request.getAttribute("topNavigationContainerList"); | 125 | (JahiaContainerList) request.getAttribute("topNavigationContainerList"); | |||
| 126 | //logger.debug("get topNavigationContainerVector from request"); | 126 | //logger.debug("get topNavigationContainerVector from request"); | |||
| 127 | } | 127 | } | |||
| 128 | 128 | |||||
| 129 | Enumeration topNavigationContainers = null; | 129 | Enumeration topNavigationContainers = null; | |||
| 130 | 130 | |||||
| 131 | // store the languagesStates on request | 131 | // store the languagesStates on request | |||
| 132 | Map languagesStates = null; | 132 | Map languagesStates = null; | |||
| 133 | if (request.getAttribute("languagesStates") == null) { | 133 | if (request.getAttribute("languagesStates") == null) { | |||
| 134 | logger.debug("languagesStates not in request -> comppute LanguagesStates"); | 134 | logger.debug("languagesStates not in request -> comppute LanguagesStates"); | |||
| 135 | boolean withContent = true; | 135 | boolean withContent = true; | |||
| 136 | if (jData.gui().isNormalMode()) { | 136 | if (jData.gui().isNormalMode()) { | |||
| 137 | withContent = false; | 137 | withContent = false; | |||
| 138 | } | 138 | } | |||
| 139 | 139 | |||||
| 140 | languagesStates = | 140 | languagesStates = | |||
| 141 | contentPage.getLanguagesStates(withContent); | 141 | contentPage.getLanguagesStates(withContent); | |||
| 142 | 142 | |||||
| 143 | /* | |||||
| 143 | Iterator languageIterator = languagesStates.keySet().iterator(); | 144 | Iterator languageIterator = languagesStates.keySet().iterator(); | |||
| 144 | boolean checkUnlinkedObject = true; | 145 | boolean checkUnlinkedObject = true; | |||
| 145 | while (languageIterator.hasNext()) { | 146 | while (languageIterator.hasNext()) { | |||
| 146 | String language = (java.lang.String) languageIterator.next(); | 147 | String language = (java.lang.String) languageIterator.next(); | |||
| 147 | if(("shared".equals(language) || jParams.getLocale().toString().equals(language))&& (((Integer)languagesStates.get(language)).intValue() > EntryLoadRequest.ACTIVE_WORKFLOW_STATE)) { | 148 | if(("shared".equals(language) || jParams.getLocale().toString().equals(language))&& (((Integer)languagesStates.get(language)).intValue() > EntryLoadRequest.ACTIVE_WORKFLOW_STATE)) { | |||
| 148 | checkUnlinkedObject = false; | 149 | checkUnlinkedObject = false; | |||
| 149 | } | 150 | } | |||
| 150 | } | 151 | } | |||
| 151 | if(checkUnlinkedObject) { | 152 | if(checkUnlinkedObject) { | |||
| 152 | try { | 153 | try { | |||
| 153 | WorkflowService workflowService = ServicesRegistry.getInstance().getWorkflowService(); | 154 | WorkflowService workflowService = ServicesRegistry.getInstance().getWorkflowService(); | |||
| 154 | List unlinkedObjects = workflowService.getUnlinkedContentObjects(contentPage); | 155 | List unlinkedObjects = workflowService.getUnlinkedContentObjects(contentPage); | |||
| 155 | for (int i = 0; i < unlinkedObjects.size(); i++) { | 156 | for (int i = 0; i < unlinkedObjects.size(); i++) { | |||
| 156 | ContentObject contentObject = (org.jahia.content.ContentObject) unlinkedObjects.get(i); | 157 | ContentObject contentObject = (org.jahia.content.ContentObject) unlinkedObjects.get(i); | |||
| 157 | Map map = workflowService.getLanguagesStates(workflowService.getHardLinkedMainObject(contentObject)); | 158 | Map map = workflowService.getLanguagesStates(workflowService.getHardLinkedMainObject(contentObject)); | |||
| 158 | languageIterator = map.keySet().iterator(); | 159 | languageIterator = map.keySet().iterator(); | |||
| 159 | while (languageIterator.hasNext()) { | 160 | while (languageIterator.hasNext()) { | |||
| 160 | String language = (java.lang.String) languageIterator.next(); | 161 | String language = (java.lang.String) languageIterator.next(); | |||
| 161 | if(languagesStates.get(language) == null || ((Integer)map.get(language)).intValue()>((Integer)languagesStates.get(language)).intValue()) { | 162 | if(languagesStates.get(language) == null || ((Integer)map.get(language)).intValue()>((Integer)languagesStates.get(language)).intValue()) { | |||
| 162 | languagesStates.put(language, map.get(language)); | 163 | languagesStates.put(language, map.get(language)); | |||
| 163 | } | 164 | } | |||
| 164 | } | 165 | } | |||
| 165 | } | 166 | } | |||
| 166 | } catch (JahiaException e) { | 167 | } catch (JahiaException e) { | |||
| 167 | e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. | 168 | e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. | |||
| 168 | } | 169 | } | |||
| 169 | } | 170 | } | |||
| 171 | */ | |||||
| 170 | 172 | |||||
| 171 | request.setAttribute("languagesStates",languagesStates); | 173 | request.setAttribute("languagesStates",languagesStates); | |||
| 172 | } else { | 174 | } else { | |||
| 173 | //logger.debug("get languagesStates from request"); | 175 | //logger.debug("get languagesStates from request"); | |||
| 174 | languagesStates = (Map) request.getAttribute("languagesStates"); | 176 | languagesStates = (Map) request.getAttribute("languagesStates"); | |||
| 175 | } | 177 | } | |||
| 176 | 178 | |||||
| 177 | 179 | |||||
| 178 | String addButton = "<img src='" + contextURL + "/img/actions/add.gif' border='0' alt='Add'/>"; | 180 | String addButton = "<img src='" + contextURL + "/img/actions/add.gif' border='0' alt='Add'/>"; | |||
| 179 | 181 | |||||
| 180 | boolean advSearchLicenseEnabled = LicenseActionChecker.isAuthorizedByLicense("org.jahia.engines.search.advancedSearch", 0); | 182 | boolean advSearchLicenseEnabled = LicenseActionChecker.isAuthorizedByLicense("org.jahia.engines.search.advancedSearch", 0); | |||
| 181 | 183 | |||||
| 182 | //variables necessary for chat.inc | 184 | //variables necessary for chat.inc | |||
| 183 | String chatstatus=(String) session.getAttribute("chatstatus"); | 185 | String chatstatus=(String) session.getAttribute("chatstatus"); | |||
| 184 | if(chatstatus==null) chatstatus="false"; | 186 | if(chatstatus==null) chatstatus="false"; | |||
| 185 | 187 | |||||
| 186 | boolean isFullScreen = request.getServletPath().endsWith("fullbox.jsp"); | 188 | boolean isFullScreen = request.getServletPath().endsWith("fullbox.jsp"); | |||
| 187 | %> | 189 | %> | |||
Araxis Merge (but not this generated report) is Copyright © 1993-2003 Araxis Ltd (www.araxis.com). All rights reserved.