From 959edbe49de91221e6fefd402204fc4f64ed1f61 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Sat, 7 May 2011 23:46:16 +0000 Subject: [PATCH] * (bug 24711) MV_EditPageAjax.php uses deprecated LogReader and LogViewer Not fixing usage, just SVN copy'd it from trunk into MetavidWiki extension as it's the only place still using it --- RELEASE-NOTES-1.19 | 1 + includes/AutoLoader.php | 2 - includes/LogEventsList.php | 116 ------------------------------------- 3 files changed, 1 insertion(+), 118 deletions(-) diff --git a/RELEASE-NOTES-1.19 b/RELEASE-NOTES-1.19 index 87c40cce79..99d3eff599 100644 --- a/RELEASE-NOTES-1.19 +++ b/RELEASE-NOTES-1.19 @@ -15,6 +15,7 @@ production. * $wgInputEncoding and $wgOutputEncoding (deprecated in 1.5) have now been removed * $wgAllowUserSkin (deprecated in 1.16) has now been removed * $wgExtraRandompageSQL (deprecated in 1.16) has now been removed +* LogReader and LogViewer classes (deprecated in 1.14) have now been removed === New features in 1.19 === diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index 635c757ae9..b852fcaf7c 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -143,8 +143,6 @@ $wgAutoloadLocalClasses = array( 'LogEventsList' => 'includes/LogEventsList.php', 'LogPage' => 'includes/LogPage.php', 'LogPager' => 'includes/LogEventsList.php', - 'LogReader' => 'includes/LogEventsList.php', - 'LogViewer' => 'includes/LogEventsList.php', 'MacBinary' => 'includes/MacBinary.php', 'MagicWord' => 'includes/MagicWord.php', 'MagicWordArray' => 'includes/MagicWord.php', diff --git a/includes/LogEventsList.php b/includes/LogEventsList.php index 8cf88390f6..87ad6eeeee 100644 --- a/includes/LogEventsList.php +++ b/includes/LogEventsList.php @@ -1055,119 +1055,3 @@ class LogPager extends ReverseChronologicalPager { } } -/** - * @deprecated since 1.14 - * @ingroup SpecialPage - */ -class LogReader { - var $pager; - - /** - * @param $request WebRequest: for internal use use a FauxRequest object to pass arbitrary parameters. - * - * @deprecated since 1.14 - */ - function __construct( $request ) { - global $wgUser, $wgOut; - wfDeprecated(__METHOD__); - # Get parameters - $type = $request->getVal( 'type' ); - $user = $request->getText( 'user' ); - $title = $request->getText( 'page' ); - $pattern = $request->getBool( 'pattern' ); - $year = $request->getIntOrNull( 'year' ); - $month = $request->getIntOrNull( 'month' ); - $tagFilter = $request->getVal( 'tagfilter' ); - # Don't let the user get stuck with a certain date - $skip = $request->getText( 'offset' ) || $request->getText( 'dir' ) == 'prev'; - if( $skip ) { - $year = ''; - $month = ''; - } - # Use new list class to output results - $loglist = new LogEventsList( $wgUser->getSkin(), $wgOut, 0 ); - $this->pager = new LogPager( $loglist, $type, $user, $title, $pattern, $year, $month, $tagFilter ); - } - - /** - * Is there at least one row? - * @return bool - */ - public function hasRows() { - return isset($this->pager) ? ($this->pager->getNumRows() > 0) : false; - } -} - -/** - * @deprecated since 1.14 - * @ingroup SpecialPage - */ -class LogViewer { - const NO_ACTION_LINK = 1; - - /** - * LogReader object - */ - var $reader; - - /** - * @param &$reader LogReader: where to get our data from - * @param $flags Integer: Bitwise combination of flags: - * LogEventsList::NO_ACTION_LINK Don't show restore/unblock/block links - * - * @deprecated since 1.14 - */ - function __construct( &$reader, $flags = 0 ) { - wfDeprecated(__METHOD__); - $this->reader =& $reader; - $this->reader->pager->mLogEventsList->flags = $flags; - # Aliases for shorter code... - $this->pager =& $this->reader->pager; - $this->list =& $this->reader->pager->mLogEventsList; - } - - /** - * 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( $this->pager->getType() ); - # Show form options - $this->list->showOptions( $this->pager->getType(), $this->pager->getUser(), $this->pager->getPage(), - $this->pager->getPattern(), $this->pager->getYear(), $this->pager->getMonth() ); - # Insert list - $logBody = $this->pager->getBody(); - if( $logBody ) { - $wgOut->addHTML( - $this->pager->getNavigationBar() . - $this->list->beginLogEventsList() . - $logBody . - $this->list->endLogEventsList() . - $this->pager->getNavigationBar() - ); - } else { - $wgOut->addWikiMsg( 'logempty' ); - } - } - - /** - * Output just the list of entries given by the linked LogReader, - * with extraneous UI elements. Use for displaying log fragments in - * another page (eg at Special:Undelete) - * - * @param $out OutputPage: where to send output - */ - public function showList( &$out ) { - $logBody = $this->pager->getBody(); - if( $logBody ) { - $out->addHTML( - $this->list->beginLogEventsList() . - $logBody . - $this->list->endLogEventsList() - ); - } else { - $out->addWikiMsg( 'logempty' ); - } - } -} -- 2.20.1