Index: trunk/extensions/WhosOnline/WhosOnlineSpecialPage.php |
— | — | @@ -17,11 +17,15 @@ |
18 | 18 | } |
19 | 19 | |
20 | 20 | function getQueryInfo() { |
| 21 | + global $wgWhosOnlineShowAnons; |
| 22 | + |
21 | 23 | return array ( |
22 | 24 | 'tables' => array('online'), |
23 | 25 | 'fields' => array('username'), |
24 | 26 | 'options' => array('ORDER BY' => 'timestamp DESC'), |
25 | | - 'conds' => array('userid != 0') |
| 27 | + 'conds' => $wgWhosOnlineShowAnons |
| 28 | + ? array() |
| 29 | + : array('userid != 0') |
26 | 30 | ); |
27 | 31 | } |
28 | 32 | |
— | — | @@ -115,4 +119,4 @@ |
116 | 120 | $wgOut->addHTML($pager->getNavigationBar()); |
117 | 121 | $wgOut->addHTML('<ul>'.$body.'</ul>'); |
118 | 122 | } |
119 | | -} |
\ No newline at end of file |
| 123 | +} |
Index: trunk/extensions/WhosOnline/WhosOnline.php |
— | — | @@ -10,6 +10,8 @@ |
11 | 11 | * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later |
12 | 12 | */ |
13 | 13 | |
| 14 | +$wgWhosOnlineShowAnons = FALSE; // Showing anonymous users IP addresses can be a security threat! |
| 15 | + |
14 | 16 | $wgHooks['BeforePageDisplay'][] = 'wfWhosOnline_update_data'; |
15 | 17 | |
16 | 18 | $wgExtensionCredits['other'][] = array( |