Index: trunk/extensions/AjaxQueryPages/Hooks.php |
— | — | @@ -6,12 +6,15 @@ |
7 | 7 | global $wgHooks; |
8 | 8 | $wgHooks['AjaxAddScript'][] = 'wfAjaxQueryPagesAddJS'; |
9 | 9 | |
| 10 | +// Insert our javascript only for QueryPages |
10 | 11 | function wfAjaxQueryPagesAddJS( $out ) { |
11 | 12 | global $wgTitle; |
12 | 13 | if( $wgTitle->getNamespace() != NS_SPECIAL ) { |
13 | 14 | return true; |
14 | 15 | } |
15 | | - if( !$spObj = SpecialPage::getPage( $wgTitle->getDBKey() ) ) { |
| 16 | + global $wgQueryPages; |
| 17 | + if( !$spObj = SpecialPage::getPage( $wgTitle->getDBKey() ) |
| 18 | + or !(isset($wgQueryPages) ) ) { |
16 | 19 | return true; |
17 | 20 | } |
18 | 21 | |