X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FLogEventsList.php;h=711dec24bde0715da18367d87f2917fba0e6fe60;hb=2a103ae8d7b6bcd04c57aedb2f307df75567d2e9;hp=9a583628566ff6bc1fd72c4a285c30af23fca417;hpb=04f68827d0e3e53ba2924ff7e9f67f6a7e485656;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/LogEventsList.php b/includes/LogEventsList.php index 9a58362856..711dec24bd 100644 --- a/includes/LogEventsList.php +++ b/includes/LogEventsList.php @@ -1,21 +1,27 @@ , 2008 Aaron Schulz -# http://www.mediawiki.org/ -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# http://www.gnu.org/copyleft/gpl.html +/** + * Contain classes to list log entries + * + * Copyright © 2004 Brion Vibber , 2008 Aaron Schulz + * http://www.mediawiki.org/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html + * + * @file + */ class LogEventsList { const NO_ACTION_LINK = 1; @@ -315,7 +321,6 @@ class LogEventsList { } private function logUserLinks( $row ) { - $userLinks = ''; if( self::isDeleted( $row, LogPage::DELETED_USER ) ) { $userLinks = '' . wfMsgHtml( 'rev-deleted-user' ) . ''; @@ -331,7 +336,6 @@ class LogEventsList { } private function logAction( $row, $title, $paramArray ) { - $action = ''; if( self::isDeleted( $row, LogPage::DELETED_ACTION ) ) { $action = '' . wfMsgHtml( 'rev-deleted-event' ) . ''; @@ -344,7 +348,6 @@ class LogEventsList { private function logComment( $row ) { global $wgContLang; - $comment = ''; if( self::isDeleted( $row, LogPage::DELETED_COMMENT ) ) { $comment = '' . wfMsgHtml( 'rev-deleted-comment' ) . ''; @@ -576,7 +579,7 @@ class LogEventsList { public static function userCanBitfield( $bitfield, $field ) { if( $bitfield & $field ) { global $wgUser; - $permission = ''; + if ( $bitfield & LogPage::DELETED_RESTRICTED ) { $permission = 'suppressrevision'; } else { @@ -965,7 +968,7 @@ class LogPager extends ReverseChronologicalPager { # Do a link batch query if( $this->getNumRows() > 0 ) { $lb = new LinkBatch; - while( $row = $this->mResult->fetchObject() ) { + foreach ( $this->mResult as $row ) { $lb->add( $row->log_namespace, $row->log_title ); $lb->addObj( Title::makeTitleSafe( NS_USER, $row->user_name ) ); $lb->addObj( Title::makeTitleSafe( NS_USER_TALK, $row->user_name ) ); @@ -1088,6 +1091,7 @@ class LogViewer { * Take over the whole output page in $wgOut with the log display. */ public function show() { + global $wgOut; # Set title and add header $this->list->showHeader( $pager->getType() ); # Show form options