Index: trunk/extensions/SemanticForms/specials/SF_RunQuery.php |
— | — | @@ -130,7 +130,7 @@ |
131 | 131 | if ( $embedded ) { |
132 | 132 | $wgParser->getOutput()->addHeadItem( $script ); |
133 | 133 | } else { |
134 | | - $wgOut->addScript( $script ); |
| 134 | + $wgOut->addScript( $script . implode($wgParser->getOutput()->getHeadItems()) ); |
135 | 135 | } |
136 | 136 | } |
137 | 137 | } |
Index: trunk/extensions/SemanticForms/includes/SF_ParserFunctions.php |
— | — | @@ -116,6 +116,11 @@ |
117 | 117 | $parser->setFunctionHook( 'arraymap', array( 'SFParserFunctions', 'renderArrayMap' ) ); |
118 | 118 | $parser->setFunctionHook( 'arraymaptemplate', array( 'SFParserFunctions', 'renderArrayMapTemplate' ) ); |
119 | 119 | } |
| 120 | + |
| 121 | + // load jQuery |
| 122 | + global $wgOut; |
| 123 | + $wgOut->includeJQuery(); // only necessary in MW 1.16, does nothing in MW 1.17+ |
| 124 | + |
120 | 125 | return true; |
121 | 126 | } |
122 | 127 | |
Index: trunk/extensions/SemanticForms/includes/SF_FormPrinter.php |
— | — | @@ -1145,15 +1145,15 @@ |
1146 | 1146 | // doing a replace |
1147 | 1147 | if ( $existing_page_content && strpos( $existing_page_content, '{{{insertionpoint}}}', 0 ) !== false ) { |
1148 | 1148 | $existing_page_content = preg_replace( '/\{\{\{insertionpoint\}\}\}(\r?\n?)/', |
1149 | | - preg_replace( '/\}\}/m', '}�', |
1150 | | - preg_replace( '/\{\{/m', '�{', $template_text ) ) . |
| 1149 | + preg_replace( '/\}\}/m', '}�', |
| 1150 | + preg_replace( '/\{\{/m', '�{', $template_text ) ) . |
1151 | 1151 | "\n{{{insertionpoint}}}", |
1152 | 1152 | $existing_page_content ); |
1153 | 1153 | // otherwise, if it's a partial form, we have to add the new |
1154 | 1154 | // text somewhere |
1155 | 1155 | } elseif ( $form_is_partial && $wgRequest->getCheck( 'partial' ) ) { |
1156 | | - $existing_page_content = preg_replace( '/\}\}/m', '}�', |
1157 | | - preg_replace( '/\{\{/m', '�{', $template_text ) ) . |
| 1156 | + $existing_page_content = preg_replace( '/\}\}/m', '}�', |
| 1157 | + preg_replace( '/\{\{/m', '�{', $template_text ) ) . |
1158 | 1158 | "\n{{{insertionpoint}}}\n" . $existing_page_content; |
1159 | 1159 | } |
1160 | 1160 | } |
— | — | @@ -1218,7 +1218,7 @@ |
1219 | 1219 | $form_text .= SFFormUtils::hiddenFieldHTML( 'partial', 1 ); |
1220 | 1220 | } else { |
1221 | 1221 | $free_text = null; |
1222 | | - $existing_page_content = preg_replace( array( '/�\{/m','/\}�/m' ), |
| 1222 | + $existing_page_content = preg_replace( array( '/�\{/m','/\}�/m' ), |
1223 | 1223 | array( '{{','}}' ), |
1224 | 1224 | $existing_page_content ); |
1225 | 1225 | $existing_page_content = preg_replace( '/\{\{\{insertionpoint\}\}\}/', '', $existing_page_content ); |
— | — | @@ -1310,7 +1310,7 @@ |
1311 | 1311 | global $wgParser; |
1312 | 1312 | $new_text = ""; |
1313 | 1313 | if ( !$embedded ) { |
1314 | | - $new_text = $wgParser->preprocess( str_replace( "{{!}}", "|", $form_page_title ), $this->mPageTitle, new ParserOptions() ); |
| 1314 | + $new_text = $wgParser->recursiveTagParse (str_replace( "{{!}}", "|", $form_page_title ) ); |
1315 | 1315 | } |
1316 | 1316 | |
1317 | 1317 | // If the form has already been submitted, i.e. this is just the redirect |