Index: trunk/phase3/includes/LogEventsList.php |
— | — | @@ -19,6 +19,7 @@ |
20 | 20 | |
21 | 21 | class LogEventsList { |
22 | 22 | const NO_ACTION_LINK = 1; |
| 23 | + |
23 | 24 | private $skin; |
24 | 25 | public $flags; |
25 | 26 | |
— | — | @@ -252,7 +253,7 @@ |
253 | 254 | } |
254 | 255 | } |
255 | 256 | // Event description |
256 | | - if( $row->log_deleted & LogPage::DELETED_ACTION ) { |
| 257 | + if( self::isDeleted($row,LogPage::DELETED_ACTION) ) { |
257 | 258 | $action = '<span class="history-deleted">' . wfMsgHtml('rev-deleted-event') . '</span>'; |
258 | 259 | } else { |
259 | 260 | $action = LogPage::actionText( $row->log_type, $row->log_action, $title, $this->skin, $paramArray, true ); |
— | — | @@ -288,28 +289,6 @@ |
289 | 290 | } |
290 | 291 | |
291 | 292 | /** |
292 | | - * SQL clause to skip forbidden log types for this user |
293 | | - * @param Database $db |
294 | | - * @returns mixed (string or false) |
295 | | - */ |
296 | | - public static function getExcludeClause( $db ) { |
297 | | - global $wgLogRestrictions, $wgUser; |
298 | | - // Reset the array, clears extra "where" clauses when $par is used |
299 | | - $hiddenLogs = array(); |
300 | | - // Don't show private logs to unpriviledged users |
301 | | - foreach( $wgLogRestrictions as $logtype => $right ) { |
302 | | - if( !$wgUser->isAllowed($right) ) { |
303 | | - $safetype = $db->strencode( $logtype ); |
304 | | - $hiddenLogs[] = "'$safetype'"; |
305 | | - } |
306 | | - } |
307 | | - if( !empty($hiddenLogs) ) { |
308 | | - return 'log_type NOT IN(' . implode(',',$hiddenLogs) . ')'; |
309 | | - } |
310 | | - return false; |
311 | | - } |
312 | | - |
313 | | - /** |
314 | 293 | * Determine if the current user is allowed to view a particular |
315 | 294 | * field of this log row, if it's marked as deleted. |
316 | 295 | * @param Row $row |
— | — | @@ -337,6 +316,28 @@ |
338 | 317 | public static function isDeleted( $row, $field ) { |
339 | 318 | return ($row->log_deleted & $field) == $field; |
340 | 319 | } |
| 320 | + |
| 321 | + /** |
| 322 | + * SQL clause to skip forbidden log types for this user |
| 323 | + * @param Database $db |
| 324 | + * @returns mixed (string or false) |
| 325 | + */ |
| 326 | + public static function getExcludeClause( $db ) { |
| 327 | + global $wgLogRestrictions, $wgUser; |
| 328 | + // Reset the array, clears extra "where" clauses when $par is used |
| 329 | + $hiddenLogs = array(); |
| 330 | + // Don't show private logs to unpriviledged users |
| 331 | + foreach( $wgLogRestrictions as $logtype => $right ) { |
| 332 | + if( !$wgUser->isAllowed($right) ) { |
| 333 | + $safetype = $db->strencode( $logtype ); |
| 334 | + $hiddenLogs[] = "'$safetype'"; |
| 335 | + } |
| 336 | + } |
| 337 | + if( !empty($hiddenLogs) ) { |
| 338 | + return 'log_type NOT IN(' . implode(',',$hiddenLogs) . ')'; |
| 339 | + } |
| 340 | + return false; |
| 341 | + } |
341 | 342 | } |
342 | 343 | |
343 | 344 | /** |