Skip to content
Snippets Groups Projects
Commit 275d3185 authored by tmortagne's avatar tmortagne
Browse files

Apply codestyle

parent b477b091
No related branches found
No related tags found
No related merge requests found
......@@ -258,8 +258,7 @@ public static String getRedirect(String action, String queryString, XWikiContext
*/
public static String getRedirect(String action, String queryString, String... redirectParameters)
{
XWikiContext context =
(XWikiContext) Utils.getComponent(Execution.class).getContext().getProperty("xwikicontext");
XWikiContext context = getContext();
XWikiRequest request = context.getRequest();
String redirect = null;
for (String p : redirectParameters) {
......@@ -268,9 +267,11 @@ public static String getRedirect(String action, String queryString, String... re
break;
}
}
if (StringUtils.isEmpty(redirect)) {
redirect = context.getDoc().getURL(action, queryString, true, context);
}
return redirect;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment