Index: ../xwiki-platform/xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/AbstractSkinExtensionPlugin.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- ../xwiki-platform/xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/AbstractSkinExtensionPlugin.java (date 1409847099000) +++ ../xwiki-platform/xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/AbstractSkinExtensionPlugin.java (revision ) @@ -21,13 +21,17 @@ import java.io.UnsupportedEncodingException; import java.net.URLEncoder; +import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.LinkedHashSet; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; +import org.apache.commons.lang3.tuple.ImmutablePair; +import org.apache.commons.lang3.tuple.Pair; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -56,7 +60,7 @@ * @see JsSkinExtensionPlugin * @see CssSkinExtensionPlugin * @see LinkExtensionPlugin - * @version $Id$ + * @version $Id: e8500ec1f17a2f182ecc0a55964df021c171a991 $ */ @SuppressWarnings("deprecation") public abstract class AbstractSkinExtensionPlugin extends XWikiDefaultPlugin implements RenderingCacheAware @@ -296,6 +300,23 @@ query.append("&minify=false"); } return query.toString(); + } + + private List> getParametersAsList(String resource, XWikiContext context) + { + List> result = new ArrayList<>(); + Map parameters = getParametersForResource(resource, context); + for (Entry parameter : parameters.entrySet()) { + // Skip the parameter that forces the file extensions to be sent through the /skin/ action + if (!"forceSkinAction".equals(parameter.getKey())) { + result.add(new ImmutablePair<>(parameter.getKey(), parameter.getValue())); + } + } + // If the main page is requested unminified, also send unminified extensions + if ("false".equals(context.getRequest().getParameter("minify"))) { + result.add(new ImmutablePair<>("minify", (Object) "false")); + } + return result; } /** Index: ../xwiki-platform/xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/CssSkinFileExtensionPlugin.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- ../xwiki-platform/xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/CssSkinFileExtensionPlugin.java (date 1409847099000) +++ ../xwiki-platform/xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/CssSkinFileExtensionPlugin.java (revision ) @@ -32,7 +32,7 @@ /** * CSs Skin File Extension plugin to use css files from the skin. * - * @version $Id$ + * @version $Id: 1c3764f6897ec787dc0fff3588d1c172465c9550 $ * @since 1.6 */ public class CssSkinFileExtensionPlugin extends AbstractSkinExtensionPlugin @@ -43,6 +43,8 @@ */ public static final String PLUGIN_NAME = "ssfx"; + private static final String XWIKI_CONTEXT_PARAMETER_KEY = "xwikiURLFactoryParameters"; + /** * XWiki plugin constructor. * @@ -73,14 +75,20 @@ { boolean forceSkinAction = (Boolean) getParametersForResource(filename, context).get("forceSkinAction"); StringBuilder result = new StringBuilder(""); + } finally { - if (forceSkinAction) { + if (forceSkinAction) { - String parameters = StringUtils.removeStart(parametersAsQueryString(filename, context), "&"); - if (!StringUtils.isEmpty(parameters)) { - result.append("?").append(parameters); + context.put(XWIKI_CONTEXT_PARAMETER_KEY, originalParameter); } } - result.append("'/>"); return result.toString(); }