Index: trunk/extensions/SemanticForms/includes/SF_ParserFunctions.php |
— | — | @@ -173,6 +173,7 @@ |
174 | 174 | // set defaults |
175 | 175 | $inFormName = $inValue = $inButtonStr = $inQueryStr = ''; |
176 | 176 | $inQueryArr = array(); |
| 177 | + $positionalParameters = false; |
177 | 178 | $inAutocompletionSource = ''; |
178 | 179 | $inRemoteAutocompletion = false; |
179 | 180 | $inSize = 25; |
— | — | @@ -182,7 +183,7 @@ |
183 | 184 | $elements = explode( '=', $param, 2 ); |
184 | 185 | |
185 | 186 | // set param_name and value |
186 | | - if ( count( $elements ) > 1 ) { |
| 187 | + if ( count( $elements ) > 1 && !$positionalParameters ) { |
187 | 188 | $param_name = trim( $elements[0] ); |
188 | 189 | |
189 | 190 | // parse (and sanitize) parameter values |
— | — | @@ -221,7 +222,7 @@ |
222 | 223 | } elseif ( $param_name == null && $value == 'popup' ) { |
223 | 224 | SFUtils::loadScriptsForPopupForm( $parser ); |
224 | 225 | $classStr = 'popupforminput'; |
225 | | - } elseif ( $param_name !== null ) { |
| 226 | + } elseif ( $param_name !== null && !$positionalParameters ) { |
226 | 227 | |
227 | 228 | $value = urlencode($value); |
228 | 229 | parse_str("$param_name=$value", $arr); |
— | — | @@ -229,6 +230,7 @@ |
230 | 231 | |
231 | 232 | } elseif ( $i == 0 ) { |
232 | 233 | $inFormName = $value; |
| 234 | + $positionalParameters = true; |
233 | 235 | } elseif ( $i == 1 ) { |
234 | 236 | $inSize = $value; |
235 | 237 | } elseif ( $i == 2 ) { |
Index: trunk/extensions/SemanticForms/includes/SF_Utils.php |
— | — | @@ -896,14 +896,18 @@ |
897 | 897 | $inQueryStr = $inTargetName = ''; |
898 | 898 | $classStr = ""; |
899 | 899 | $inQueryArr = array(); |
| 900 | + |
| 901 | + $positionalParameters = false; |
| 902 | + |
900 | 903 | // assign params |
901 | 904 | // - support unlabelled params, for backwards compatibility |
902 | 905 | // - parse and sanitize all parameter values |
903 | 906 | foreach ( $params as $i => $param ) { |
| 907 | + |
904 | 908 | $elements = explode( '=', $param, 2 ); |
905 | 909 | |
906 | 910 | // set param_name and value |
907 | | - if ( count( $elements ) > 1 ) { |
| 911 | + if ( count( $elements ) > 1 && !$positionalParameters ) { |
908 | 912 | $param_name = trim( $elements[0] ); |
909 | 913 | |
910 | 914 | // parse (and sanitize) parameter values |
— | — | @@ -936,12 +940,13 @@ |
937 | 941 | } elseif ( $param_name == null && $value == 'popup' ) { |
938 | 942 | self::loadScriptsForPopupForm( $parser ); |
939 | 943 | $classStr = 'popupformlink'; |
940 | | - } elseif ( $param_name !== null ) { |
| 944 | + } elseif ( $param_name !== null && !$positionalParameters ) { |
941 | 945 | $value = urlencode($value); |
942 | 946 | parse_str("$param_name=$value", $arr); |
943 | 947 | $inQueryArr = self::array_merge_recursive_distinct( $inQueryArr, $arr ); |
944 | | - }elseif ( $i == 0 ) { |
| 948 | + } elseif ( $i == 0 ) { |
945 | 949 | $inFormName = $value; |
| 950 | + $positionalParameters = true; |
946 | 951 | } elseif ( $i == 1 ) { |
947 | 952 | $inLinkStr = $value; |
948 | 953 | } elseif ( $i == 2 ) { |