Index: trunk/phase3/includes/LogEventsList.php |
— | — | @@ -372,15 +372,17 @@ |
373 | 373 | global $wgLogRestrictions, $wgUser; |
374 | 374 | // Reset the array, clears extra "where" clauses when $par is used |
375 | 375 | $hiddenLogs = array(); |
376 | | - // Don't show private logs to unpriviledged users |
| 376 | + // Don't show private logs to unprivileged users |
377 | 377 | foreach( $wgLogRestrictions as $logtype => $right ) { |
378 | 378 | if( !$wgUser->isAllowed($right) ) { |
379 | 379 | $safetype = $db->strencode( $logtype ); |
380 | | - $hiddenLogs[] = "'$safetype'"; |
| 380 | + $hiddenLogs[] = $safetype; |
381 | 381 | } |
382 | 382 | } |
383 | | - if( !empty($hiddenLogs) ) { |
384 | | - return 'log_type NOT IN(' . implode(',',$hiddenLogs) . ')'; |
| 383 | + if( count($hiddenLogs) == 1 ) { |
| 384 | + return 'log_type != ' . $db->addQuotes( $hiddenLogs[0] ); |
| 385 | + } elseif( !empty( $hiddenLogs ) ) { |
| 386 | + return 'log_type NOT IN (' . $db->makeList($hiddenLogs) . ')'; |
385 | 387 | } |
386 | 388 | return false; |
387 | 389 | } |