Index: trunk/extensions/SemanticForms/specials/SF_FormEdit.php |
— | — | @@ -26,7 +26,7 @@ |
27 | 27 | SFUtils::loadMessages(); |
28 | 28 | } |
29 | 29 | |
30 | | - function execute( $query ) { |
| 30 | + function execute( $query, $redirectOnError = true ) { |
31 | 31 | global $wgRequest, $wgOut; |
32 | 32 | |
33 | 33 | $this->setHeaders(); |
— | — | @@ -43,7 +43,7 @@ |
44 | 44 | |
45 | 45 | $alt_forms = $wgRequest->getArray( 'alt_form' ); |
46 | 46 | |
47 | | - $msg = self::printForm( $this->mForm, $this->mTarget, $alt_forms, true ); |
| 47 | + $msg = self::printForm( $this->mForm, $this->mTarget, $alt_forms, $redirectOnError ); |
48 | 48 | |
49 | 49 | if ( $msg ) { |
50 | 50 | // some error occurred |
Index: trunk/extensions/SemanticForms/includes/SF_AutoEditAjaxHandler.php |
— | — | @@ -1,4 +1,5 @@ |
2 | 2 | <?php |
| 3 | + |
3 | 4 | /** |
4 | 5 | * |
5 | 6 | * @file |
— | — | @@ -27,23 +28,15 @@ |
28 | 29 | |
29 | 30 | $title = new Title(); |
30 | 31 | |
31 | | - if ( version_compare( substr( $wgVersion, 0, 4 ), '1.17', '<' ) ) { |
32 | | - // TODO: remove work around for bug in MW 1.16 |
33 | | - // get any contents already in putput buffer |
34 | | - $obcontents = ob_get_contents(); |
| 32 | +// if ( version_compare( substr( $wgVersion, 0, 4 ), '1.17', '<' ) ) { |
| 33 | + if ( !StubObject::isRealObject( $wgParser ) ) |
| 34 | + $wgParser -> _unstub(); |
35 | 35 | |
36 | 36 | // perform offensive operation |
37 | | - eval( '$wgParser -> startExternalParse( & $title, ParserOptions::newFromUser($wgUser), Parser::OT_HTML, true );' ); |
38 | | - |
39 | | - // clean out the deprecation message (and everything else in the output buffer) |
40 | | - ob_clean(); |
41 | | - |
42 | | - // put former output buffer contents back in |
43 | | - if ( $obcontents ) |
44 | | - echo $obcontents; |
45 | | - } else { |
46 | 37 | $wgParser -> startExternalParse( $title, ParserOptions::newFromUser( $wgUser ), Parser::OT_HTML, true ); |
47 | | - } |
| 38 | +// } else { |
| 39 | +// $wgParser -> startExternalParse( $title, ParserOptions::newFromUser( $wgUser ), Parser::OT_HTML, true ); |
| 40 | +// } |
48 | 41 | |
49 | 42 | // parse options |
50 | 43 | $this -> parseDataFromQueryString( $this -> mOptions, $options, true ); |
— | — | @@ -152,9 +145,9 @@ |
153 | 146 | |
154 | 147 | // get the MW form |
155 | 148 | if ( array_key_exists( 'target', $this -> mOptions ) ) { |
156 | | - $formedit -> execute( $this -> mOptions[ 'form' ] . '/' . $this -> mOptions[ 'target' ] ); |
| 149 | + $formedit -> execute( $this -> mOptions[ 'form' ] . '/' . $this -> mOptions[ 'target' ], false ); |
157 | 150 | } else { |
158 | | - $formedit -> execute( $this -> mOptions[ 'form' ] ); |
| 151 | + $formedit -> execute( $this -> mOptions[ 'form' ], false ); |
159 | 152 | } |
160 | 153 | |
161 | 154 | $wgParser -> getOptions() -> enableLimitReport( false ); |
— | — | @@ -164,15 +157,14 @@ |
165 | 158 | $msg = $formedit -> mError; // Should this be sanitized? I.e. all html tags removed? |
166 | 159 | |
167 | 160 | $msg = $wgParser -> parse( |
168 | | - wfMsgReplaceArgs( $this -> mOptions[ 'error text' ], array( $msg ) ), |
169 | | - $wgTitle, |
170 | | - $wgParser -> getOptions() |
| 161 | + wfMsgReplaceArgs( $this -> mOptions[ 'error text' ], array( $msg ) ), |
| 162 | + $wgTitle, |
| 163 | + $wgParser -> getOptions() |
171 | 164 | ) -> getText(); |
172 | 165 | |
173 | 166 | $result = new AjaxResponse( $msg ); |
174 | 167 | $result -> setResponseCode( '400 Bad Request' ); |
175 | 168 | return $result; |
176 | | - |
177 | 169 | } else { |
178 | 170 | |
179 | 171 | header( "X-Location: " . $wgOut -> getRedirect() ); |
Index: trunk/extensions/SemanticForms/skins/SF_autoedit.css |
— | — | @@ -26,6 +26,10 @@ |
27 | 27 | |
28 | 28 | } |
29 | 29 | |
| 30 | +.autoedit-result > p:first-child { |
| 31 | + display:inline; |
| 32 | +} |
| 33 | + |
30 | 34 | .autoedit-result-wait { |
31 | 35 | color: #555; |
32 | 36 | cursor: progress; |