@@ -827,7 +827,7 @@ public void setParent(String parent)
827827
828828 /** vm files for each mode. */
829829 private static final String TEMPLATE_DAV = "content/chef_resources_webdav" ;
830-
830+
831831 private static final String TEMPLATE_QUOTA = "resources/sakai_quota" ;
832832
833833 private static final String TEMPLATE_DELETE_CONFIRM = "content/chef_resources_deleteConfirm" ;
@@ -3802,17 +3802,17 @@ public String buildColumnsContext(VelocityPortlet portlet, Context context, RunD
38023802
38033803 }
38043804 catch (IdUnusedException e )
3805- {
3805+ {
38063806 // TODO Auto-generated catch block
38073807 log .warn ("IdUnusedException {}" , e .getMessage ());
38083808 }
38093809 catch (TypeException e )
3810- {
3810+ {
38113811 // TODO Auto-generated catch block
38123812 log .warn ("TypeException {}" , e .getMessage ());
38133813 }
38143814 catch (PermissionException e )
3815- {
3815+ {
38163816 // TODO Auto-generated catch block
38173817 log .warn ("PermissionException {}" , e .getMessage ());
38183818 }
@@ -4869,15 +4869,15 @@ public String buildPermissionsPageContext(VelocityPortlet portlet, Context conte
48694869 log .debug ("{}.buildPermissionsPageContext()" , this );
48704870
48714871 String reference = (String ) state .getAttribute ("folder_group_reference" );
4872+ String overrideReference = null ;
4873+ if (StringUtils .isNotBlank (reference )) {
4874+ overrideReference = contentHostingService .getContainingCollectionId (reference );
4875+ }
48724876
4873- String siteId = toolManager .getCurrentPlacement ().getContext ();
4874-
4875- String siteCollectionId = contentHostingService .getSiteCollection (siteId );
4876- String overrideReference = contentHostingService .getReference (siteCollectionId );
48774877 String folderName = (String ) state .getAttribute ("folder_name" );
48784878 if (StringUtils .isNoneBlank (reference , folderName )) {
48794879 context .put ("reference" , reference );
4880- if (!reference .equals (overrideReference )) {
4880+ if (overrideReference != null && !reference .equals (overrideReference )) {
48814881 context .put ("overrideReference" , overrideReference );
48824882 }
48834883 context .put ("folderName" , folderName );
@@ -4890,7 +4890,7 @@ public String buildPermissionsPageContext(VelocityPortlet portlet, Context conte
48904890 context .put ("permissionsLabel" , rb .getString ("list.fPerm" ));
48914891
48924892 String toolId = toolManager .getCurrentPlacement ().getId ();
4893- String startUrl = ServerConfigurationService .getPortalUrl () + "/site/" + siteId + "/tool/" + toolId + "?panel=Main" ;
4893+ String startUrl = ServerConfigurationService .getPortalUrl () + "/site/" + toolManager . getCurrentPlacement (). getContext () + "/tool/" + toolId + "?panel=Main" ;
48944894 context .put ("startPage" , startUrl );
48954895
48964896 state .setAttribute (STATE_MODE , MODE_LIST );
@@ -5720,7 +5720,7 @@ public String buildQuotaContext( VelocityPortlet portlet,
57205720 * Iterate over attributes in ToolSession and remove all attributes starting with a particular prefix.
57215721 * @param toolSession
57225722 * @param prefix
5723- */
5723+ */
57245724 protected void cleanup (ToolSession toolSession , String prefix )
57255725 {
57265726 log .debug ("{}.cleanup()" , this );
@@ -6991,32 +6991,6 @@ public void doHierarchy(RunData data)
69916991 state .setAttribute (STATE_LIST_PREFERENCE , LIST_HIERARCHY );
69926992 }
69936993
6994- // private static void resetCurrentMode(SessionState state)
6995- // {
6996- // String mode = (String) state.getAttribute(STATE_MODE);
6997- // if(isStackEmpty(state))
6998- // {
6999- // if(MODE_HELPER.equals(mode))
7000- // {
7001- // cleanupState(state);
7002- // state.setAttribute(STATE_RESOURCES_HELPER_MODE, MODE_ATTACHMENT_DONE);
7003- // }
7004- // else
7005- // {
7006- // state.setAttribute(STATE_MODE, MODE_LIST);
7007- // state.removeAttribute(STATE_RESOURCES_HELPER_MODE);
7008- // }
7009- // return;
7010- // }
7011- // Map current_stack_frame = peekAtStack(state);
7012- // String helper_mode = (String) current_stack_frame.get(STATE_RESOURCES_HELPER_MODE);
7013- // if(helper_mode != null)
7014- // {
7015- // state.setAttribute(STATE_RESOURCES_HELPER_MODE, helper_mode);
7016- // }
7017- //
7018- // }
7019- //
70206994 /**
70216995 * Expand all the collection resources and put in EXPANDED_COLLECTIONS attribute.
70226996 */
0 commit comments