Author: dpillot
Date: Wed Aug 16 17:26:54 2006
New Revision: 14919

URL: https://svndev.jahia.net/websvn/listing.php?sc=1&rev=14919&repname=jahia
Log:
fix for overriding variable declaration in V2

Modified:
    trunk/core/src/webapp/jsp/jahia/topbar/operationbuttons.inc

Modified: trunk/core/src/webapp/jsp/jahia/topbar/operationbuttons.inc
URL: 
https://svndev.jahia.net/websvn/diff.php?path=/trunk/core/src/webapp/jsp/jahia/topbar/operationbuttons.inc&rev=14919&repname=jahia
==============================================================================
--- trunk/core/src/webapp/jsp/jahia/topbar/operationbuttons.inc (original)
+++ trunk/core/src/webapp/jsp/jahia/topbar/operationbuttons.inc Wed Aug 16 
17:26:54 2006
@@ -17,10 +17,11 @@
 --%><%
     if (jData.page().checkWriteAccess(user,true)
             || (jData.page().checkAdminAccess(user,true) && 
jData.page().checkReadAccess(user))) {
-    
-    ContentPage contentPage = jData.getProcessingContext().getContentPage();   
            
-    boolean hasActiveEntries = 
contentPage.hasEntries(ContentPage.ACTIVE_PAGE_INFOS, 
jParams.getLocale().toString());
-    boolean isAvailable = contentPage.isAvailable();
+
+    // reduce the scope of this local var to avoid conflicts with corporate2: 
please check against both corporate sets before commit
+    ContentPage thecontentPage = jData.getProcessingContext().getContentPage();
+    boolean hasActiveEntries = 
thecontentPage.hasEntries(ContentPage.ACTIVE_PAGE_INFOS, 
jParams.getLocale().toString());
+    boolean isAvailable = thecontentPage.isAvailable();
 %>
 <div class="tab">
     <ul>
@@ -44,8 +45,8 @@
             boolean displayPreview = false;
             boolean isSharedInStaging_1 = false;
             Integer sharedState_1 = (Integer) languagesStates.get("shared");
-            boolean writeAccess = 
contentPage.checkWriteAccess(jData.params().getUser());
-            boolean isMarkedForDelete = 
contentPage.isStagedEntryMarkedForDeletion(jParams.getLocale().toString());
+            boolean writeAccess = 
thecontentPage.checkWriteAccess(jData.params().getUser());
+            boolean isMarkedForDelete = 
thecontentPage.isStagedEntryMarkedForDeletion(jParams.getLocale().toString());
             if (sharedState_1 != null) {
                 if (sharedState_1.intValue() > 
EntryLoadRequest.ACTIVE_WORKFLOW_STATE) {
                     isSharedInStaging_1 = true;

Reply via email to