Index: trunk/extensions/SemanticForms/specials/SF_FormStart.php |
— | — | @@ -88,7 +88,7 @@ |
89 | 89 | } |
90 | 90 | } |
91 | 91 | |
92 | | - if ( ( ! $form_title || ! $form_title->exists() ) && ( $form_name != '' ) ) { |
| 92 | + if ( ( !$form_title || !$form_title->exists() ) && ( $form_name != '' ) ) { |
93 | 93 | $text = Xml::element( 'p', null, wfMsg( 'sf_formstart_badform', SFUtils::linkText( SF_NS_FORM, $form_name ) ) ) . "\n"; |
94 | 94 | } else { |
95 | 95 | if ( $form_name == '' ) { |
— | — | @@ -126,7 +126,7 @@ |
127 | 127 | if ( $page_title->exists() ) { |
128 | 128 | // It exists - see if page is a redirect; if |
129 | 129 | // it is, edit the target page instead. |
130 | | - $article = new Article( $page_title ); |
| 130 | + $article = new Article( $page_title, 0 ); |
131 | 131 | $article->loadContent(); |
132 | 132 | $redirect_title = Title::newFromRedirect( $article->fetchContent() ); |
133 | 133 | if ( $redirect_title != null ) { |
Index: trunk/extensions/SemanticForms/specials/SF_FormEdit.php |
— | — | @@ -103,7 +103,7 @@ |
104 | 104 | |
105 | 105 | $form_title = Title::makeTitleSafe( SF_NS_FORM, $form_name ); |
106 | 106 | |
107 | | - $form_article = new Article( $form_title ); |
| 107 | + $form_article = new Article( $form_title, 0 ); |
108 | 108 | $form_definition = $form_article->getContent(); |
109 | 109 | $form_definition = StringUtils::delimiterReplace( '<noinclude>', '</noinclude>', '', $form_definition ); |
110 | 110 | |
— | — | @@ -125,7 +125,7 @@ |
126 | 126 | $page_contents = null; |
127 | 127 | //$page_is_source = false; |
128 | 128 | } else { |
129 | | - $target_article = new Article( $target_title ); |
| 129 | + $target_article = new Article( $target_title, 0 ); |
130 | 130 | $page_contents = $target_article->getContent(); |
131 | 131 | //$page_is_source = true; |
132 | 132 | } |
— | — | @@ -300,7 +300,7 @@ |
301 | 301 | |
302 | 302 | // Find existing article if it exists, |
303 | 303 | // or create a new one. |
304 | | - $article = new Article( $target_title ); |
| 304 | + $article = new Article( $target_title, 0 ); |
305 | 305 | |
306 | 306 | $editor = new EditPage( $article ); |
307 | 307 | $editor->importFormData( $request ); |
Index: trunk/extensions/SemanticForms/specials/SF_RunQuery.php |
— | — | @@ -35,10 +35,11 @@ |
36 | 36 | // Get contents of form-definition page. |
37 | 37 | $form_title = Title::makeTitleSafe( SF_NS_FORM, $form_name ); |
38 | 38 | |
39 | | - if ( ! $form_title || ! $form_title->exists() ) { |
| 39 | + if ( !$form_title || !$form_title->exists() ) { |
40 | 40 | if ( $form_name == '' ) { |
41 | 41 | $text = Xml::element( 'p', array( 'class' => 'error' ), wfMsg( 'sf_runquery_badurl' ) ) . "\n"; |
42 | 42 | } else { |
| 43 | + /// FIXME: i18n |
43 | 44 | $text = '<p class="error">Error: No form page was found at ' . SFUtils::linkText( SF_NS_FORM, $form_name ) . ".</p>\n"; |
44 | 45 | } |
45 | 46 | $wgOut->addHTML( $text ); |
— | — | @@ -46,7 +47,7 @@ |
47 | 48 | } |
48 | 49 | |
49 | 50 | // Initialize variables. |
50 | | - $form_article = new Article( $form_title ); |
| 51 | + $form_article = new Article( $form_title, 0 ); |
51 | 52 | $form_definition = $form_article->getContent(); |
52 | 53 | $submit_url = $form_title->getLocalURL( 'action=submit' ); |
53 | 54 | if ( $embedded ) { |
— | — | @@ -110,7 +111,7 @@ |
111 | 112 | $text .= "\n<h2>$additional_query</h2>\n"; |
112 | 113 | } |
113 | 114 | if ( !$raw ) { |
114 | | - $action = htmlspecialchars( SpecialPage::getTitleFor( "RunQuery", $form_name )->getLocalURL() ); |
| 115 | + $action = htmlspecialchars( $this->getTitle( $form_name )->getLocalURL() ); |
115 | 116 | $text .= <<<END |
116 | 117 | <form id="sfForm" name="createbox" action="$action" method="post" class="createbox"> |
117 | 118 | |
Index: trunk/extensions/SemanticForms/specials/SF_Templates.php |
— | — | @@ -97,7 +97,7 @@ |
98 | 98 | function getCategoryDefinedByTemplate( $templateTitle ) { |
99 | 99 | global $wgContLang; |
100 | 100 | |
101 | | - $templateArticle = new Article( $templateTitle ); |
| 101 | + $templateArticle = new Article( $templateTitle, 0 ); |
102 | 102 | $templateText = $templateArticle->getContent(); |
103 | 103 | $cat_ns_name = $wgContLang->getNsText( NS_TEMPLATE ); |
104 | 104 | if ( preg_match_all( "/\[\[(Category|$cat_ns_name):([^\]]*)\]\]/", $templateText, $matches ) ) { |