r22508 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r22507‎ | r22508 | r22509 >
Date:13:47, 28 May 2007
Author:hashar
Status:old
Tags:
Comment:
Only load on QueryPages (fix [[Special:Log]])
Modified paths:
  • /trunk/extensions/AjaxQueryPages/Hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/AjaxQueryPages/Hooks.php
@@ -6,12 +6,15 @@
77 global $wgHooks;
88 $wgHooks['AjaxAddScript'][] = 'wfAjaxQueryPagesAddJS';
99
 10+// Insert our javascript only for QueryPages
1011 function wfAjaxQueryPagesAddJS( $out ) {
1112 global $wgTitle;
1213 if( $wgTitle->getNamespace() != NS_SPECIAL ) {
1314 return true;
1415 }
15 - if( !$spObj = SpecialPage::getPage( $wgTitle->getDBKey() ) ) {
 16+ global $wgQueryPages;
 17+ if( !$spObj = SpecialPage::getPage( $wgTitle->getDBKey() )
 18+ or !(isset($wgQueryPages) ) ) {
1619 return true;
1720 }
1821