Index: trunk/extensions/SemanticForms/specials/SF_FormEdit.php |
— | — | @@ -126,6 +126,15 @@ |
127 | 127 | $page_contents = null; |
128 | 128 | //$page_is_source = false; |
129 | 129 | } else { |
| 130 | + // If page already exists and 'redlink' |
| 131 | + // is in the query string, redirect to |
| 132 | + // the actual page, just like |
| 133 | + // MediaWiki does it. |
| 134 | + if ( $wgRequest->getBool( 'redlink' ) ) { |
| 135 | + $wgOut->redirect( $target_title->getFullURL() ); |
| 136 | + wfProfileOut( __METHOD__ ); |
| 137 | + return; |
| 138 | + } |
130 | 139 | $target_article = new Article( $target_title, 0 ); |
131 | 140 | $page_contents = $target_article->getContent(); |
132 | 141 | //$page_is_source = true; |
— | — | @@ -344,7 +353,7 @@ |
345 | 354 | } else { |
346 | 355 | // Lets other code process additional form-definition syntax |
347 | 356 | wfRunHooks( 'sfWritePageData', array( $form_name, $target_title, &$data_text ) ); |
348 | | - $text = SFUtils::printRedirectForm( $target_title, $data_text, $wgRequest->getVal( 'wpSummary' ), $save_page, $preview_page, $diff_page, $wgRequest->getCheck( 'wpMinoredit' ), $wgRequest->getCheck( 'wpWatchthis' ), $wgRequest->getVal( 'wpStarttime' ), $wgRequest->getVal( 'wpEdittime' ) ); // extract its data |
| 357 | + $text = SFUtils::printRedirectForm( $target_title, $data_text, $wgRequest->getVal( 'wpSummary' ), $save_page, $preview_page, $diff_page, $wgRequest->getCheck( 'wpMinoredit' ), $wgRequest->getCheck( 'wpWatchthis' ), $wgRequest->getVal( 'wpStarttime' ), $wgRequest->getVal( 'wpEdittime' ) ); // extract its data |
349 | 358 | } |
350 | 359 | |
351 | 360 | |