Index: trunk/extensions/SemanticForms/includes/SF_FormPrinter.php |
— | — | @@ -189,11 +189,18 @@ |
190 | 190 | // set in different ways |
191 | 191 | // HACK - sometimes we don't know the page name in advance, but we still |
192 | 192 | // need to set a title here for testing permissions |
193 | | - if ( $page_name == '' ) |
| 193 | + if ( $embedded ) { |
| 194 | + // if this is an embedded form (probably a 'RunQuery'), just use the |
| 195 | + // name of the actual page we're on |
| 196 | + global $wgTitle; |
| 197 | + $this->mPageTitle = $wgTitle; |
| 198 | + } elseif ( $page_name == '' ) { |
194 | 199 | $this->mPageTitle = Title::newFromText( |
195 | 200 | $wgRequest->getVal( 'namespace' ) . ":Semantic Forms permissions test" ); |
196 | | - else |
| 201 | + } else { |
197 | 202 | $this->mPageTitle = Title::newFromText( $page_name ); |
| 203 | + } |
| 204 | + |
198 | 205 | global $wgOut; |
199 | 206 | // show previous set of deletions for this page, if it's been deleted before |
200 | 207 | if ( ! $form_submitted && ! $this->mPageTitle->exists() ) { |