2004-11-25 13:47:17 +00:00
|
|
|
|
<?php
|
2010-08-14 17:42:40 +00:00
|
|
|
|
/**
|
2013-10-17 00:51:49 +00:00
|
|
|
|
* Generates a list of changes using an Enhanced system (uses javascript).
|
2010-08-14 17:42:40 +00:00
|
|
|
|
*
|
2012-05-21 19:56:04 +00:00
|
|
|
|
* 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
|
|
|
|
|
|
*
|
2010-08-14 17:42:40 +00:00
|
|
|
|
* @file
|
|
|
|
|
|
*/
|
2004-11-25 13:47:17 +00:00
|
|
|
|
|
2005-09-06 18:43:45 +00:00
|
|
|
|
class EnhancedChangesList extends ChangesList {
|
2013-11-26 11:56:17 +00:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* @var RCCacheEntryFactory
|
|
|
|
|
|
*/
|
|
|
|
|
|
protected $cacheEntryFactory;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* @var array Array of array of RCCacheEntry
|
|
|
|
|
|
*/
|
2012-01-12 19:03:32 +00:00
|
|
|
|
protected $rc_cache;
|
|
|
|
|
|
|
2013-11-26 11:56:17 +00:00
|
|
|
|
/**
|
|
|
|
|
|
* @param IContextSource|Skin $obj
|
2014-12-24 13:49:20 +00:00
|
|
|
|
* @throws MWException
|
2013-11-26 11:56:17 +00:00
|
|
|
|
*/
|
|
|
|
|
|
public function __construct( $obj ) {
|
|
|
|
|
|
if ( $obj instanceof Skin ) {
|
|
|
|
|
|
// @todo: deprecate constructing with Skin
|
|
|
|
|
|
$context = $obj->getContext();
|
|
|
|
|
|
} else {
|
2014-07-21 12:47:42 +00:00
|
|
|
|
if ( !$obj instanceof IContextSource ) {
|
2013-11-26 11:56:17 +00:00
|
|
|
|
throw new MWException( 'EnhancedChangesList must be constructed with a '
|
|
|
|
|
|
. 'context source or skin.' );
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$context = $obj;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
parent::__construct( $context );
|
|
|
|
|
|
|
|
|
|
|
|
// message is set by the parent ChangesList class
|
|
|
|
|
|
$this->cacheEntryFactory = new RCCacheEntryFactory(
|
|
|
|
|
|
$context,
|
|
|
|
|
|
$this->message
|
|
|
|
|
|
);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2008-10-25 20:57:56 +00:00
|
|
|
|
/**
|
2010-01-05 21:24:23 +00:00
|
|
|
|
* Add the JavaScript file for enhanced changeslist
|
2013-11-19 12:25:54 +00:00
|
|
|
|
* @return string
|
2010-01-05 21:24:23 +00:00
|
|
|
|
*/
|
2014-03-26 14:07:44 +00:00
|
|
|
|
public function beginRecentChangesList() {
|
2008-10-25 20:57:56 +00:00
|
|
|
|
$this->rc_cache = array();
|
|
|
|
|
|
$this->rcMoveIndex = 0;
|
|
|
|
|
|
$this->rcCacheIndex = 0;
|
|
|
|
|
|
$this->lastdate = '';
|
|
|
|
|
|
$this->rclistOpen = false;
|
2013-06-13 23:47:43 +00:00
|
|
|
|
$this->getOutput()->addModuleStyles( array(
|
|
|
|
|
|
'mediawiki.special.changeslist',
|
|
|
|
|
|
'mediawiki.special.changeslist.enhanced',
|
|
|
|
|
|
) );
|
|
|
|
|
|
$this->getOutput()->addModules( array(
|
|
|
|
|
|
'jquery.makeCollapsible',
|
|
|
|
|
|
'mediawiki.icon',
|
|
|
|
|
|
) );
|
2013-11-08 11:20:58 +00:00
|
|
|
|
|
2013-11-26 22:13:51 +00:00
|
|
|
|
return '<div class="mw-changeslist">';
|
2008-10-25 20:57:56 +00:00
|
|
|
|
}
|
2013-11-08 11:20:58 +00:00
|
|
|
|
|
2005-09-06 18:14:24 +00:00
|
|
|
|
/**
|
|
|
|
|
|
* Format a line for enhanced recentchange (aka with javascript and block of lines).
|
2011-04-04 21:23:22 +00:00
|
|
|
|
*
|
2013-11-19 12:25:54 +00:00
|
|
|
|
* @param RecentChange $baseRC
|
|
|
|
|
|
* @param bool $watched
|
2011-05-20 22:03:10 +00:00
|
|
|
|
*
|
|
|
|
|
|
* @return string
|
2005-09-06 18:14:24 +00:00
|
|
|
|
*/
|
2008-04-04 05:08:25 +00:00
|
|
|
|
public function recentChangesLine( &$baseRC, $watched = false ) {
|
2005-07-01 20:36:04 +00:00
|
|
|
|
|
2013-11-08 11:20:58 +00:00
|
|
|
|
$date = $this->getLanguage()->userDate(
|
2013-11-26 10:35:24 +00:00
|
|
|
|
$baseRC->mAttribs['rc_timestamp'],
|
2013-11-08 11:20:58 +00:00
|
|
|
|
$this->getUser()
|
|
|
|
|
|
);
|
|
|
|
|
|
|
2004-11-25 13:47:17 +00:00
|
|
|
|
$ret = '';
|
2013-11-08 11:20:58 +00:00
|
|
|
|
|
2014-04-11 10:35:42 +00:00
|
|
|
|
# If it's a new day, add the headline and flush the cache
|
2013-04-20 22:49:30 +00:00
|
|
|
|
if ( $date != $this->lastdate ) {
|
2004-11-25 13:47:17 +00:00
|
|
|
|
# Process current cache
|
2005-12-16 23:56:44 +00:00
|
|
|
|
$ret = $this->recentChangesBlock();
|
|
|
|
|
|
$this->rc_cache = array();
|
2010-11-08 21:21:32 +00:00
|
|
|
|
$ret .= Xml::element( 'h4', null, $date ) . "\n";
|
2004-11-25 13:47:17 +00:00
|
|
|
|
$this->lastdate = $date;
|
|
|
|
|
|
}
|
2005-07-01 20:36:04 +00:00
|
|
|
|
|
2013-11-26 11:56:17 +00:00
|
|
|
|
$cacheEntry = $this->cacheEntryFactory->newFromRecentChange( $baseRC, $watched );
|
2014-04-08 08:40:04 +00:00
|
|
|
|
$this->addCacheEntry( $cacheEntry );
|
2004-11-25 13:47:17 +00:00
|
|
|
|
|
2014-04-08 08:40:04 +00:00
|
|
|
|
return $ret;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* Put accumulated information into the cache, for later display.
|
|
|
|
|
|
* Page moves go on their own line.
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param RCCacheEntry $cacheEntry
|
|
|
|
|
|
*/
|
|
|
|
|
|
protected function addCacheEntry( RCCacheEntry $cacheEntry ) {
|
2014-04-11 10:35:42 +00:00
|
|
|
|
$cacheGroupingKey = $this->makeCacheGroupingKey( $cacheEntry );
|
|
|
|
|
|
|
|
|
|
|
|
if ( !isset( $this->rc_cache[$cacheGroupingKey] ) ) {
|
|
|
|
|
|
$this->rc_cache[$cacheGroupingKey] = array();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
array_push( $this->rc_cache[$cacheGroupingKey], $cacheEntry );
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* @todo use rc_source to group, if set; fallback to rc_type
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param RCCacheEntry $cacheEntry
|
|
|
|
|
|
*
|
|
|
|
|
|
* @return string
|
|
|
|
|
|
*/
|
|
|
|
|
|
protected function makeCacheGroupingKey( RCCacheEntry $cacheEntry ) {
|
2013-11-08 11:20:58 +00:00
|
|
|
|
$title = $cacheEntry->getTitle();
|
2014-04-11 10:35:42 +00:00
|
|
|
|
$cacheGroupingKey = $title->getPrefixedDBkey();
|
2013-11-08 11:20:58 +00:00
|
|
|
|
|
2013-11-26 11:56:17 +00:00
|
|
|
|
$type = $cacheEntry->mAttribs['rc_type'];
|
|
|
|
|
|
|
2014-06-05 00:54:02 +00:00
|
|
|
|
if ( $type == RC_LOG ) {
|
2014-04-11 10:35:42 +00:00
|
|
|
|
// Group by log type
|
|
|
|
|
|
$cacheGroupingKey = SpecialPage::getTitleFor(
|
|
|
|
|
|
'Log',
|
|
|
|
|
|
$cacheEntry->mAttribs['rc_log_type']
|
|
|
|
|
|
)->getPrefixedDBkey();
|
2004-11-25 13:47:17 +00:00
|
|
|
|
}
|
2014-04-11 10:35:42 +00:00
|
|
|
|
|
|
|
|
|
|
return $cacheGroupingKey;
|
2004-11-25 13:47:17 +00:00
|
|
|
|
}
|
2006-01-07 13:31:29 +00:00
|
|
|
|
|
2005-09-06 22:16:41 +00:00
|
|
|
|
/**
|
|
|
|
|
|
* Enhanced RC group
|
2013-11-19 12:25:54 +00:00
|
|
|
|
* @param RCCacheEntry[] $block
|
2012-02-09 21:33:27 +00:00
|
|
|
|
* @return string
|
2005-09-06 22:16:41 +00:00
|
|
|
|
*/
|
2008-04-04 13:16:58 +00:00
|
|
|
|
protected function recentChangesBlockGroup( $block ) {
|
2009-02-20 13:00:58 +00:00
|
|
|
|
|
2010-11-08 21:21:32 +00:00
|
|
|
|
# Add the namespace and title of the block as part of the class
|
2012-05-12 03:33:04 +00:00
|
|
|
|
$classes = array( 'mw-collapsible', 'mw-collapsed', 'mw-enhanced-rc' );
|
2010-11-08 21:21:32 +00:00
|
|
|
|
if ( $block[0]->mAttribs['rc_log_type'] ) {
|
|
|
|
|
|
# Log entry
|
2012-05-12 03:33:04 +00:00
|
|
|
|
$classes[] = Sanitizer::escapeClass( 'mw-changeslist-log-'
|
2014-01-14 06:19:21 +00:00
|
|
|
|
. $block[0]->mAttribs['rc_log_type'] );
|
2010-11-08 21:21:32 +00:00
|
|
|
|
} else {
|
2012-05-12 03:33:04 +00:00
|
|
|
|
$classes[] = Sanitizer::escapeClass( 'mw-changeslist-ns'
|
2013-11-18 22:07:49 +00:00
|
|
|
|
. $block[0]->mAttribs['rc_namespace'] . '-' . $block[0]->mAttribs['rc_title'] );
|
2010-11-08 21:21:32 +00:00
|
|
|
|
}
|
2012-12-31 19:41:00 +00:00
|
|
|
|
$classes[] = $block[0]->watched && $block[0]->mAttribs['rc_timestamp'] >= $block[0]->watched
|
|
|
|
|
|
? 'mw-changeslist-line-watched' : 'mw-changeslist-line-not-watched';
|
2010-11-08 21:21:32 +00:00
|
|
|
|
$r = Html::openElement( 'table', array( 'class' => $classes ) ) .
|
|
|
|
|
|
Html::openElement( 'tr' );
|
2005-09-06 22:16:41 +00:00
|
|
|
|
|
|
|
|
|
|
# Collate list of users
|
2008-04-01 22:41:19 +00:00
|
|
|
|
$userlinks = array();
|
|
|
|
|
|
# Other properties
|
2008-09-16 05:56:43 +00:00
|
|
|
|
$unpatrolled = false;
|
|
|
|
|
|
$isnew = false;
|
2012-12-01 19:51:09 +00:00
|
|
|
|
$allBots = true;
|
|
|
|
|
|
$allMinors = true;
|
2015-02-26 13:10:22 +00:00
|
|
|
|
$curId = 0;
|
2008-04-01 22:41:19 +00:00
|
|
|
|
# Some catalyst variables...
|
2008-03-16 18:46:09 +00:00
|
|
|
|
$namehidden = true;
|
2008-12-11 21:34:15 +00:00
|
|
|
|
$allLogs = true;
|
2014-08-22 20:01:08 +00:00
|
|
|
|
$RCShowChangedSize = $this->getConfig()->get( 'RCShowChangedSize' );
|
2013-04-20 22:49:30 +00:00
|
|
|
|
foreach ( $block as $rcObj ) {
|
|
|
|
|
|
if ( $rcObj->mAttribs['rc_type'] == RC_NEW ) {
|
2005-12-16 23:56:44 +00:00
|
|
|
|
$isnew = true;
|
2005-09-06 22:16:41 +00:00
|
|
|
|
}
|
2008-03-16 18:46:09 +00:00
|
|
|
|
// If all log actions to this page were hidden, then don't
|
|
|
|
|
|
// give the name of the affected page for this block!
|
2013-04-20 22:49:30 +00:00
|
|
|
|
if ( !$this->isDeleted( $rcObj, LogPage::DELETED_ACTION ) ) {
|
2008-03-16 18:46:09 +00:00
|
|
|
|
$namehidden = false;
|
|
|
|
|
|
}
|
2005-12-16 23:56:44 +00:00
|
|
|
|
$u = $rcObj->userlink;
|
2013-04-20 22:49:30 +00:00
|
|
|
|
if ( !isset( $userlinks[$u] ) ) {
|
2005-12-16 23:56:44 +00:00
|
|
|
|
$userlinks[$u] = 0;
|
2005-09-06 22:16:41 +00:00
|
|
|
|
}
|
2013-04-20 22:49:30 +00:00
|
|
|
|
if ( $rcObj->unpatrolled ) {
|
2005-09-06 22:16:41 +00:00
|
|
|
|
$unpatrolled = true;
|
|
|
|
|
|
}
|
2013-04-20 22:49:30 +00:00
|
|
|
|
if ( $rcObj->mAttribs['rc_type'] != RC_LOG ) {
|
2008-12-11 21:34:15 +00:00
|
|
|
|
$allLogs = false;
|
2008-04-01 22:41:19 +00:00
|
|
|
|
}
|
|
|
|
|
|
# Get the latest entry with a page_id and oldid
|
|
|
|
|
|
# since logs may not have these.
|
2013-04-20 22:49:30 +00:00
|
|
|
|
if ( !$curId && $rcObj->mAttribs['rc_cur_id'] ) {
|
2008-04-01 22:41:19 +00:00
|
|
|
|
$curId = $rcObj->mAttribs['rc_cur_id'];
|
|
|
|
|
|
}
|
2008-04-14 07:45:50 +00:00
|
|
|
|
|
2013-04-20 22:49:30 +00:00
|
|
|
|
if ( !$rcObj->mAttribs['rc_bot'] ) {
|
2012-12-01 19:51:09 +00:00
|
|
|
|
$allBots = false;
|
|
|
|
|
|
}
|
2013-04-20 22:49:30 +00:00
|
|
|
|
if ( !$rcObj->mAttribs['rc_minor'] ) {
|
2012-12-01 19:51:09 +00:00
|
|
|
|
$allMinors = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2005-12-16 23:56:44 +00:00
|
|
|
|
$userlinks[$u]++;
|
2005-09-06 22:16:41 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# Sort the list and convert to text
|
2005-12-16 23:56:44 +00:00
|
|
|
|
krsort( $userlinks );
|
|
|
|
|
|
asort( $userlinks );
|
|
|
|
|
|
$users = array();
|
2013-04-20 22:49:30 +00:00
|
|
|
|
foreach ( $userlinks as $userlink => $count ) {
|
2005-09-06 22:16:41 +00:00
|
|
|
|
$text = $userlink;
|
2011-11-21 16:13:21 +00:00
|
|
|
|
$text .= $this->getLanguage()->getDirMark();
|
2013-04-20 22:49:30 +00:00
|
|
|
|
if ( $count > 1 ) {
|
2013-11-18 22:03:29 +00:00
|
|
|
|
// @todo FIXME: Hardcoded '×'. Should be a message.
|
|
|
|
|
|
$formattedCount = $this->getLanguage()->formatNum( $count ) . '×';
|
|
|
|
|
|
$text .= ' ' . $this->msg( 'parentheses' )->rawParams( $formattedCount )->escaped();
|
2005-12-16 23:56:44 +00:00
|
|
|
|
}
|
|
|
|
|
|
array_push( $users, $text );
|
2005-09-06 22:16:41 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2012-06-05 22:58:54 +00:00
|
|
|
|
$users = ' <span class="changedby">'
|
2012-05-30 11:46:52 +00:00
|
|
|
|
. $this->msg( 'brackets' )->rawParams(
|
2012-06-05 22:58:54 +00:00
|
|
|
|
implode( $this->message['semicolon-separator'], $users )
|
2012-05-30 11:46:52 +00:00
|
|
|
|
)->escaped() . '</span>';
|
2005-09-06 22:16:41 +00:00
|
|
|
|
|
2013-11-18 22:03:29 +00:00
|
|
|
|
$tl = '<span class="mw-collapsible-toggle mw-collapsible-arrow ' .
|
|
|
|
|
|
'mw-enhancedchanges-arrow mw-enhancedchanges-arrow-space"></span>';
|
2010-12-27 19:07:28 +00:00
|
|
|
|
$r .= "<td>$tl</td>";
|
2005-09-06 22:16:41 +00:00
|
|
|
|
|
|
|
|
|
|
# Main line
|
2010-12-27 19:07:28 +00:00
|
|
|
|
$r .= '<td class="mw-enhanced-rc">' . $this->recentChangesFlags( array(
|
2012-12-01 19:51:09 +00:00
|
|
|
|
'newpage' => $isnew, # show, when one have this flag
|
|
|
|
|
|
'minor' => $allMinors, # show only, when all have this flag
|
|
|
|
|
|
'unpatrolled' => $unpatrolled, # show, when one have this flag
|
|
|
|
|
|
'bot' => $allBots, # show only, when all have this flag
|
2010-12-27 19:07:28 +00:00
|
|
|
|
) );
|
2005-09-06 22:16:41 +00:00
|
|
|
|
|
|
|
|
|
|
# Timestamp
|
2013-02-03 20:05:24 +00:00
|
|
|
|
$r .= ' ' . $block[0]->timestamp . ' </td><td>';
|
2005-09-06 22:16:41 +00:00
|
|
|
|
|
|
|
|
|
|
# Article link
|
2013-04-20 22:49:30 +00:00
|
|
|
|
if ( $namehidden ) {
|
2013-11-18 22:03:29 +00:00
|
|
|
|
$r .= ' <span class="history-deleted">' .
|
|
|
|
|
|
$this->msg( 'rev-deleted-event' )->escaped() . '</span>';
|
2013-04-20 22:49:30 +00:00
|
|
|
|
} elseif ( $allLogs ) {
|
2008-12-11 21:34:15 +00:00
|
|
|
|
$r .= $this->maybeWatchedLink( $block[0]->link, $block[0]->watched );
|
2008-04-01 22:41:19 +00:00
|
|
|
|
} else {
|
2008-11-29 00:17:10 +00:00
|
|
|
|
$this->insertArticleLink( $r, $block[0], $block[0]->unpatrolled, $block[0]->watched );
|
2008-04-01 22:41:19 +00:00
|
|
|
|
}
|
2007-02-28 18:11:09 +00:00
|
|
|
|
|
2011-11-21 16:13:21 +00:00
|
|
|
|
$r .= $this->getLanguage()->getDirMark();
|
2006-12-13 20:08:02 +00:00
|
|
|
|
|
2009-06-06 22:42:48 +00:00
|
|
|
|
$queryParams['curid'] = $curId;
|
2013-07-24 11:45:17 +00:00
|
|
|
|
|
2015-02-26 13:10:22 +00:00
|
|
|
|
$r .= $this->getLogText( $block, $queryParams, $allLogs, $isnew, $namehidden );
|
2012-02-28 11:56:59 +00:00
|
|
|
|
|
2012-08-30 14:42:49 +00:00
|
|
|
|
$r .= ' <span class="mw-changeslist-separator">. .</span> ';
|
2008-11-18 12:54:53 +00:00
|
|
|
|
|
2008-04-01 22:41:19 +00:00
|
|
|
|
# Character difference (does not apply if only log items)
|
2014-08-22 20:01:08 +00:00
|
|
|
|
if ( $RCShowChangedSize && !$allLogs ) {
|
2008-04-01 22:41:19 +00:00
|
|
|
|
$last = 0;
|
2013-02-03 20:05:24 +00:00
|
|
|
|
$first = count( $block ) - 1;
|
2008-04-01 22:41:19 +00:00
|
|
|
|
# Some events (like logs) have an "empty" size, so we need to skip those...
|
2013-04-20 22:49:30 +00:00
|
|
|
|
while ( $last < $first && $block[$last]->mAttribs['rc_new_len'] === null ) {
|
2008-04-01 22:41:19 +00:00
|
|
|
|
$last++;
|
|
|
|
|
|
}
|
2013-04-20 22:49:30 +00:00
|
|
|
|
while ( $first > $last && $block[$first]->mAttribs['rc_old_len'] === null ) {
|
2008-04-01 22:41:19 +00:00
|
|
|
|
$first--;
|
|
|
|
|
|
}
|
|
|
|
|
|
# Get net change
|
2012-06-28 09:31:55 +00:00
|
|
|
|
$chardiff = $this->formatCharacterDifference( $block[$first], $block[$last] );
|
2008-04-14 07:45:50 +00:00
|
|
|
|
|
2013-04-20 22:49:30 +00:00
|
|
|
|
if ( $chardiff == '' ) {
|
2008-04-01 22:41:19 +00:00
|
|
|
|
$r .= ' ';
|
|
|
|
|
|
} else {
|
2013-04-13 11:36:24 +00:00
|
|
|
|
$r .= ' ' . $chardiff . ' <span class="mw-changeslist-separator">. .</span> ';
|
2008-03-16 18:46:09 +00:00
|
|
|
|
}
|
2005-09-06 22:16:41 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2005-12-16 23:56:44 +00:00
|
|
|
|
$r .= $users;
|
2015-02-26 13:10:22 +00:00
|
|
|
|
$r .= $this->numberofWatchingusers( $block[0]->numberofWatchingusers );
|
2013-11-19 19:09:00 +00:00
|
|
|
|
$r .= '</td></tr>';
|
2008-04-14 07:45:50 +00:00
|
|
|
|
|
2005-09-06 22:16:41 +00:00
|
|
|
|
# Sub-entries
|
2013-04-20 22:49:30 +00:00
|
|
|
|
foreach ( $block as $rcObj ) {
|
2009-02-18 04:39:52 +00:00
|
|
|
|
# Classes to apply -- TODO implement
|
|
|
|
|
|
$classes = array();
|
2010-12-27 19:07:28 +00:00
|
|
|
|
$type = $rcObj->mAttribs['rc_type'];
|
2005-09-06 22:16:41 +00:00
|
|
|
|
|
2012-12-31 19:41:00 +00:00
|
|
|
|
$trClass = $rcObj->watched && $rcObj->mAttribs['rc_timestamp'] >= $rcObj->watched
|
|
|
|
|
|
? ' class="mw-enhanced-watched"' : '';
|
|
|
|
|
|
|
|
|
|
|
|
$r .= '<tr' . $trClass . '><td></td><td class="mw-enhanced-rc">';
|
2010-12-27 19:07:28 +00:00
|
|
|
|
$r .= $this->recentChangesFlags( array(
|
2012-08-05 22:08:35 +00:00
|
|
|
|
'newpage' => $type == RC_NEW,
|
2010-12-27 20:02:10 +00:00
|
|
|
|
'minor' => $rcObj->mAttribs['rc_minor'],
|
2011-05-25 15:39:47 +00:00
|
|
|
|
'unpatrolled' => $rcObj->unpatrolled,
|
2010-12-27 20:02:10 +00:00
|
|
|
|
'bot' => $rcObj->mAttribs['rc_bot'],
|
2010-12-27 19:07:28 +00:00
|
|
|
|
) );
|
|
|
|
|
|
$r .= ' </td><td class="mw-enhanced-rc-nested"><span class="mw-enhanced-rc-time">';
|
2005-09-06 22:16:41 +00:00
|
|
|
|
|
2009-06-06 22:42:48 +00:00
|
|
|
|
$params = $queryParams;
|
|
|
|
|
|
|
2013-04-20 22:49:30 +00:00
|
|
|
|
if ( $rcObj->mAttribs['rc_this_oldid'] != 0 ) {
|
2010-12-27 19:07:28 +00:00
|
|
|
|
$params['oldid'] = $rcObj->mAttribs['rc_this_oldid'];
|
2005-09-06 22:16:41 +00:00
|
|
|
|
}
|
2009-06-06 22:42:48 +00:00
|
|
|
|
|
2008-04-21 03:20:08 +00:00
|
|
|
|
# Log timestamp
|
2013-04-20 22:49:30 +00:00
|
|
|
|
if ( $type == RC_LOG ) {
|
Update ChangesList output for enhanced changes to use CSS instead of obsolete attrbutes and elements (cellpadding, <tt>, etc.)
The test page I was using successfully validated as HTML 5 :)
Tested for signs of obvious regressions in FF 3.5, IE8, Opera 9.64 and Safari 4.0.
Supposedly, the border-spacing property isn't supported by IE, but I didn't see any obvious issues when testing,
so either the information I got was wrong/outdated, or its not actually necessary here. Needs testing in IE6/7 to verify.
If I did everything right, there shouldn't be any visible changes, save maybe a couple trivial spacing quirks.
2009-08-20 21:06:24 +00:00
|
|
|
|
$link = $rcObj->timestamp;
|
2008-04-21 03:20:08 +00:00
|
|
|
|
# Revision link
|
2013-04-20 22:49:30 +00:00
|
|
|
|
} elseif ( !ChangesList::userCan( $rcObj, Revision::DELETED_TEXT, $this->getUser() ) ) {
|
2013-02-03 20:05:24 +00:00
|
|
|
|
$link = '<span class="history-deleted">' . $rcObj->timestamp . '</span> ';
|
2005-09-06 22:16:41 +00:00
|
|
|
|
} else {
|
2009-06-06 22:42:48 +00:00
|
|
|
|
|
2011-07-17 09:25:50 +00:00
|
|
|
|
$link = Linker::linkKnown(
|
2013-11-18 22:07:49 +00:00
|
|
|
|
$rcObj->getTitle(),
|
|
|
|
|
|
$rcObj->timestamp,
|
|
|
|
|
|
array(),
|
|
|
|
|
|
$params
|
|
|
|
|
|
);
|
2013-04-20 22:49:30 +00:00
|
|
|
|
if ( $this->isDeleted( $rcObj, Revision::DELETED_TEXT ) ) {
|
2013-02-03 20:05:24 +00:00
|
|
|
|
$link = '<span class="history-deleted">' . $link . '</span> ';
|
2012-09-27 19:46:22 +00:00
|
|
|
|
}
|
2005-09-06 22:16:41 +00:00
|
|
|
|
}
|
Update ChangesList output for enhanced changes to use CSS instead of obsolete attrbutes and elements (cellpadding, <tt>, etc.)
The test page I was using successfully validated as HTML 5 :)
Tested for signs of obvious regressions in FF 3.5, IE8, Opera 9.64 and Safari 4.0.
Supposedly, the border-spacing property isn't supported by IE, but I didn't see any obvious issues when testing,
so either the information I got was wrong/outdated, or its not actually necessary here. Needs testing in IE6/7 to verify.
If I did everything right, there shouldn't be any visible changes, save maybe a couple trivial spacing quirks.
2009-08-20 21:06:24 +00:00
|
|
|
|
$r .= $link . '</span>';
|
2008-04-14 07:45:50 +00:00
|
|
|
|
|
2010-12-27 19:07:28 +00:00
|
|
|
|
if ( !$type == RC_LOG || $type == RC_NEW ) {
|
2013-11-18 22:03:29 +00:00
|
|
|
|
$r .= ' ' . $this->msg( 'parentheses' )->rawParams(
|
|
|
|
|
|
$rcObj->curlink .
|
|
|
|
|
|
$this->message['pipe-separator'] .
|
|
|
|
|
|
$rcObj->lastlink
|
|
|
|
|
|
)->escaped();
|
2008-03-16 18:46:09 +00:00
|
|
|
|
}
|
2012-08-30 14:42:49 +00:00
|
|
|
|
$r .= ' <span class="mw-changeslist-separator">. .</span> ';
|
2006-12-13 20:08:02 +00:00
|
|
|
|
|
|
|
|
|
|
# Character diff
|
2014-08-22 20:01:08 +00:00
|
|
|
|
if ( $RCShowChangedSize ) {
|
2012-06-28 09:31:55 +00:00
|
|
|
|
$cd = $this->formatCharacterDifference( $rcObj );
|
|
|
|
|
|
if ( $cd !== '' ) {
|
2012-08-30 14:42:49 +00:00
|
|
|
|
$r .= $cd . ' <span class="mw-changeslist-separator">. .</span> ';
|
2012-06-28 09:31:55 +00:00
|
|
|
|
}
|
2006-12-13 20:08:02 +00:00
|
|
|
|
}
|
2010-12-27 19:07:28 +00:00
|
|
|
|
|
2011-09-08 09:15:59 +00:00
|
|
|
|
if ( $rcObj->mAttribs['rc_type'] == RC_LOG ) {
|
|
|
|
|
|
$r .= $this->insertLogEntry( $rcObj );
|
|
|
|
|
|
} else {
|
|
|
|
|
|
# User links
|
|
|
|
|
|
$r .= $rcObj->userlink;
|
|
|
|
|
|
$r .= $rcObj->usertalklink;
|
2011-09-19 12:36:58 +00:00
|
|
|
|
$r .= $this->insertComment( $rcObj );
|
2011-09-08 09:15:59 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2009-01-20 04:01:59 +00:00
|
|
|
|
# Rollback
|
|
|
|
|
|
$this->insertRollback( $r, $rcObj );
|
2009-02-18 04:39:52 +00:00
|
|
|
|
# Tags
|
|
|
|
|
|
$this->insertTags( $r, $rcObj, $classes );
|
2008-03-16 18:46:09 +00:00
|
|
|
|
|
|
|
|
|
|
$r .= "</td></tr>\n";
|
2005-09-06 22:16:41 +00:00
|
|
|
|
}
|
2010-12-27 19:07:28 +00:00
|
|
|
|
$r .= "</table>\n";
|
2005-09-06 18:43:45 +00:00
|
|
|
|
|
2005-12-16 23:56:44 +00:00
|
|
|
|
$this->rcCacheIndex++;
|
2009-02-20 13:00:58 +00:00
|
|
|
|
|
2005-12-16 23:56:44 +00:00
|
|
|
|
return $r;
|
2005-09-06 22:16:41 +00:00
|
|
|
|
}
|
2006-01-07 13:31:29 +00:00
|
|
|
|
|
2015-02-26 13:10:22 +00:00
|
|
|
|
/**
|
|
|
|
|
|
* Generates amount of changes (linking to diff ) & link to history.
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param array $block
|
|
|
|
|
|
* @param array $queryParams
|
|
|
|
|
|
* @param bool $allLogs
|
|
|
|
|
|
* @param bool $isnew
|
|
|
|
|
|
* @param bool $namehidden
|
|
|
|
|
|
* @return string
|
|
|
|
|
|
*/
|
|
|
|
|
|
protected function getLogText( $block, $queryParams, $allLogs, $isnew, $namehidden ) {
|
|
|
|
|
|
# Changes message
|
|
|
|
|
|
static $nchanges = array();
|
|
|
|
|
|
static $sinceLastVisitMsg = array();
|
|
|
|
|
|
|
|
|
|
|
|
$n = count( $block );
|
|
|
|
|
|
if ( !isset( $nchanges[$n] ) ) {
|
|
|
|
|
|
$nchanges[$n] = $this->msg( 'nchanges' )->numParams( $n )->escaped();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$sinceLast = 0;
|
|
|
|
|
|
$unvisitedOldid = null;
|
|
|
|
|
|
/** @var $rcObj RCCacheEntry */
|
|
|
|
|
|
foreach ( $block as $rcObj ) {
|
|
|
|
|
|
// Same logic as below inside main foreach
|
|
|
|
|
|
if ( $rcObj->watched && $rcObj->mAttribs['rc_timestamp'] >= $rcObj->watched ) {
|
|
|
|
|
|
$sinceLast++;
|
|
|
|
|
|
$unvisitedOldid = $rcObj->mAttribs['rc_last_oldid'];
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
if ( !isset( $sinceLastVisitMsg[$sinceLast] ) ) {
|
|
|
|
|
|
$sinceLastVisitMsg[$sinceLast] =
|
|
|
|
|
|
$this->msg( 'enhancedrc-since-last-visit' )->numParams( $sinceLast )->escaped();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$currentRevision = 0;
|
|
|
|
|
|
foreach ( $block as $rcObj ) {
|
|
|
|
|
|
if ( !$currentRevision ) {
|
|
|
|
|
|
$currentRevision = $rcObj->mAttribs['rc_this_oldid'];
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# Total change link
|
|
|
|
|
|
$links = array();
|
|
|
|
|
|
/** @var $block0 RecentChange */
|
|
|
|
|
|
$block0 = $block[0];
|
|
|
|
|
|
$last = $block[count( $block ) - 1];
|
|
|
|
|
|
if ( !$allLogs ) {
|
|
|
|
|
|
if ( !ChangesList::userCan( $rcObj, Revision::DELETED_TEXT, $this->getUser() ) ) {
|
|
|
|
|
|
$links['total-changes'] = $nchanges[$n];
|
|
|
|
|
|
} elseif ( $isnew ) {
|
|
|
|
|
|
$links['total-changes'] = $nchanges[$n];
|
|
|
|
|
|
} else {
|
|
|
|
|
|
$links['total-changes'] = Linker::link(
|
|
|
|
|
|
$block0->getTitle(),
|
|
|
|
|
|
$nchanges[$n],
|
|
|
|
|
|
array(),
|
|
|
|
|
|
$queryParams + array(
|
|
|
|
|
|
'diff' => $currentRevision,
|
|
|
|
|
|
'oldid' => $last->mAttribs['rc_last_oldid'],
|
|
|
|
|
|
),
|
|
|
|
|
|
array( 'known', 'noclasses' )
|
|
|
|
|
|
);
|
|
|
|
|
|
if ( $sinceLast > 0 && $sinceLast < $n ) {
|
|
|
|
|
|
$links['total-changes-since-last'] = Linker::link(
|
|
|
|
|
|
$block0->getTitle(),
|
|
|
|
|
|
$sinceLastVisitMsg[$sinceLast],
|
|
|
|
|
|
array(),
|
|
|
|
|
|
$queryParams + array(
|
|
|
|
|
|
'diff' => $currentRevision,
|
|
|
|
|
|
'oldid' => $unvisitedOldid,
|
|
|
|
|
|
),
|
|
|
|
|
|
array( 'known', 'noclasses' )
|
|
|
|
|
|
);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# History
|
|
|
|
|
|
if ( $allLogs ) {
|
|
|
|
|
|
// don't show history link for logs
|
|
|
|
|
|
} elseif ( $namehidden || !$block0->getTitle()->exists() ) {
|
|
|
|
|
|
$links['history'] = $this->message['enhancedrc-history'];
|
|
|
|
|
|
} else {
|
|
|
|
|
|
$params = $queryParams;
|
|
|
|
|
|
$params['action'] = 'history';
|
|
|
|
|
|
|
|
|
|
|
|
$links['history'] = Linker::linkKnown(
|
|
|
|
|
|
$block0->getTitle(),
|
|
|
|
|
|
$this->message['enhancedrc-history'],
|
|
|
|
|
|
array(),
|
|
|
|
|
|
$params
|
|
|
|
|
|
);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# Allow others to alter, remove or add to these links
|
|
|
|
|
|
Hooks::run( 'EnhancedChangesList::getLogText',
|
|
|
|
|
|
array( $this, &$links, $block ) );
|
|
|
|
|
|
|
|
|
|
|
|
if ( !$links ) {
|
|
|
|
|
|
return '';
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$logtext = implode( $this->message['pipe-separator'], $links );
|
|
|
|
|
|
$logtext = $this->msg( 'parentheses' )->rawParams( $logtext )->escaped();
|
|
|
|
|
|
return ' ' . $logtext;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2005-12-16 23:56:44 +00:00
|
|
|
|
/**
|
|
|
|
|
|
* Enhanced RC ungrouped line.
|
2011-04-04 21:23:22 +00:00
|
|
|
|
*
|
2013-11-19 12:25:54 +00:00
|
|
|
|
* @param RecentChange|RCCacheEntry $rcObj
|
|
|
|
|
|
* @return string A HTML formatted line (generated using $r)
|
2005-12-16 23:56:44 +00:00
|
|
|
|
*/
|
2008-04-04 13:16:58 +00:00
|
|
|
|
protected function recentChangesBlockLine( $rcObj ) {
|
2010-12-27 19:07:28 +00:00
|
|
|
|
$query['curid'] = $rcObj->mAttribs['rc_cur_id'];
|
2009-02-20 13:00:58 +00:00
|
|
|
|
|
2010-12-27 19:07:28 +00:00
|
|
|
|
$type = $rcObj->mAttribs['rc_type'];
|
|
|
|
|
|
$logType = $rcObj->mAttribs['rc_log_type'];
|
2012-05-12 03:33:04 +00:00
|
|
|
|
$classes = array( 'mw-enhanced-rc' );
|
2013-04-20 22:49:30 +00:00
|
|
|
|
if ( $logType ) {
|
2010-11-08 21:21:32 +00:00
|
|
|
|
# Log entry
|
2014-01-14 06:19:21 +00:00
|
|
|
|
$classes[] = Sanitizer::escapeClass( 'mw-changeslist-log-' . $logType );
|
2010-11-08 21:21:32 +00:00
|
|
|
|
} else {
|
2012-05-12 03:33:04 +00:00
|
|
|
|
$classes[] = Sanitizer::escapeClass( 'mw-changeslist-ns' .
|
2013-11-18 22:07:49 +00:00
|
|
|
|
$rcObj->mAttribs['rc_namespace'] . '-' . $rcObj->mAttribs['rc_title'] );
|
2010-11-08 21:21:32 +00:00
|
|
|
|
}
|
2012-12-31 19:41:00 +00:00
|
|
|
|
$classes[] = $rcObj->watched && $rcObj->mAttribs['rc_timestamp'] >= $rcObj->watched
|
|
|
|
|
|
? 'mw-changeslist-line-watched' : 'mw-changeslist-line-not-watched';
|
2010-11-08 21:21:32 +00:00
|
|
|
|
$r = Html::openElement( 'table', array( 'class' => $classes ) ) .
|
|
|
|
|
|
Html::openElement( 'tr' );
|
|
|
|
|
|
|
2012-12-27 09:36:06 +00:00
|
|
|
|
$r .= '<td class="mw-enhanced-rc"><span class="mw-enhancedchanges-arrow-space"></span>';
|
2005-12-16 23:56:44 +00:00
|
|
|
|
# Flag and Timestamp
|
2014-06-05 00:54:02 +00:00
|
|
|
|
$r .= $this->recentChangesFlags( array(
|
|
|
|
|
|
'newpage' => $type == RC_NEW,
|
|
|
|
|
|
'minor' => $rcObj->mAttribs['rc_minor'],
|
|
|
|
|
|
'unpatrolled' => $rcObj->unpatrolled,
|
|
|
|
|
|
'bot' => $rcObj->mAttribs['rc_bot'],
|
|
|
|
|
|
) );
|
2013-02-03 20:05:24 +00:00
|
|
|
|
$r .= ' ' . $rcObj->timestamp . ' </td><td>';
|
2008-04-04 03:56:48 +00:00
|
|
|
|
# Article or log link
|
2013-04-20 22:49:30 +00:00
|
|
|
|
if ( $logType ) {
|
2012-06-18 22:56:55 +00:00
|
|
|
|
$logPage = new LogPage( $logType );
|
|
|
|
|
|
$logTitle = SpecialPage::getTitleFor( 'Log', $logType );
|
|
|
|
|
|
$logName = $logPage->getName()->escaped();
|
2013-11-18 22:03:29 +00:00
|
|
|
|
$r .= $this->msg( 'parentheses' )
|
|
|
|
|
|
->rawParams( Linker::linkKnown( $logTitle, $logName ) )->escaped();
|
2008-03-16 18:46:09 +00:00
|
|
|
|
} else {
|
2008-11-29 00:17:10 +00:00
|
|
|
|
$this->insertArticleLink( $r, $rcObj, $rcObj->unpatrolled, $rcObj->watched );
|
2008-03-16 18:46:09 +00:00
|
|
|
|
}
|
2008-04-04 03:56:48 +00:00
|
|
|
|
# Diff and hist links
|
2010-12-27 19:07:28 +00:00
|
|
|
|
if ( $type != RC_LOG ) {
|
2009-06-06 22:42:48 +00:00
|
|
|
|
$query['action'] = 'history';
|
2013-11-18 22:03:29 +00:00
|
|
|
|
$r .= ' ' . $this->msg( 'parentheses' )
|
|
|
|
|
|
->rawParams( $rcObj->difflink . $this->message['pipe-separator'] . Linker::linkKnown(
|
|
|
|
|
|
$rcObj->getTitle(),
|
|
|
|
|
|
$this->message['hist'],
|
|
|
|
|
|
array(),
|
|
|
|
|
|
$query
|
|
|
|
|
|
) )->escaped();
|
2008-03-16 18:46:09 +00:00
|
|
|
|
}
|
2012-08-30 14:42:49 +00:00
|
|
|
|
$r .= ' <span class="mw-changeslist-separator">. .</span> ';
|
2006-12-13 20:08:02 +00:00
|
|
|
|
# Character diff
|
2014-08-22 20:01:08 +00:00
|
|
|
|
if ( $this->getConfig()->get( 'RCShowChangedSize' ) ) {
|
2012-06-28 09:31:55 +00:00
|
|
|
|
$cd = $this->formatCharacterDifference( $rcObj );
|
|
|
|
|
|
if ( $cd !== '' ) {
|
2012-08-30 14:42:49 +00:00
|
|
|
|
$r .= $cd . ' <span class="mw-changeslist-separator">. .</span> ';
|
2012-06-28 09:31:55 +00:00
|
|
|
|
}
|
2006-12-13 20:08:02 +00:00
|
|
|
|
}
|
2011-09-08 09:15:59 +00:00
|
|
|
|
|
|
|
|
|
|
if ( $type == RC_LOG ) {
|
|
|
|
|
|
$r .= $this->insertLogEntry( $rcObj );
|
2012-06-28 09:31:55 +00:00
|
|
|
|
} else {
|
2013-02-03 20:05:24 +00:00
|
|
|
|
$r .= ' ' . $rcObj->userlink . $rcObj->usertalklink;
|
2011-09-19 12:36:58 +00:00
|
|
|
|
$r .= $this->insertComment( $rcObj );
|
2012-06-16 13:42:30 +00:00
|
|
|
|
$this->insertRollback( $r, $rcObj );
|
2008-04-04 03:56:48 +00:00
|
|
|
|
}
|
2011-09-08 09:15:59 +00:00
|
|
|
|
|
2009-02-18 04:39:52 +00:00
|
|
|
|
# Tags
|
|
|
|
|
|
$this->insertTags( $r, $rcObj, $classes );
|
2008-04-04 03:56:48 +00:00
|
|
|
|
# Show how many people are watching this if enabled
|
2013-02-03 20:05:24 +00:00
|
|
|
|
$r .= $this->numberofWatchingusers( $rcObj->numberofWatchingusers );
|
2005-12-16 23:56:44 +00:00
|
|
|
|
|
2008-03-16 18:46:09 +00:00
|
|
|
|
$r .= "</td></tr></table>\n";
|
2009-02-20 13:00:58 +00:00
|
|
|
|
|
2005-12-16 23:56:44 +00:00
|
|
|
|
return $r;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* If enhanced RC is in use, this function takes the previously cached
|
|
|
|
|
|
* RC lines, arranges them, and outputs the HTML
|
2011-05-20 22:03:10 +00:00
|
|
|
|
*
|
|
|
|
|
|
* @return string
|
2005-12-16 23:56:44 +00:00
|
|
|
|
*/
|
2008-04-04 13:16:58 +00:00
|
|
|
|
protected function recentChangesBlock() {
|
2013-11-18 22:07:49 +00:00
|
|
|
|
if ( count( $this->rc_cache ) == 0 ) {
|
2005-12-16 23:56:44 +00:00
|
|
|
|
return '';
|
|
|
|
|
|
}
|
2009-02-20 13:00:58 +00:00
|
|
|
|
|
2005-12-16 23:56:44 +00:00
|
|
|
|
$blockOut = '';
|
2013-04-20 22:49:30 +00:00
|
|
|
|
foreach ( $this->rc_cache as $block ) {
|
|
|
|
|
|
if ( count( $block ) < 2 ) {
|
2005-12-16 23:56:44 +00:00
|
|
|
|
$blockOut .= $this->recentChangesBlockLine( array_shift( $block ) );
|
|
|
|
|
|
} else {
|
|
|
|
|
|
$blockOut .= $this->recentChangesBlockGroup( $block );
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2009-02-20 13:00:58 +00:00
|
|
|
|
|
2013-02-03 20:05:24 +00:00
|
|
|
|
return '<div>' . $blockOut . '</div>';
|
2005-12-16 23:56:44 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2011-05-25 15:39:47 +00:00
|
|
|
|
* Returns text for the end of RC
|
2005-12-16 23:56:44 +00:00
|
|
|
|
* If enhanced RC is in use, returns pretty much all the text
|
2012-01-12 19:03:32 +00:00
|
|
|
|
* @return string
|
2005-12-16 23:56:44 +00:00
|
|
|
|
*/
|
2008-04-04 05:08:25 +00:00
|
|
|
|
public function endRecentChangesList() {
|
2013-11-26 22:13:51 +00:00
|
|
|
|
return $this->recentChangesBlock() . '</div>';
|
2005-12-16 23:56:44 +00:00
|
|
|
|
}
|
2005-09-06 22:16:41 +00:00
|
|
|
|
}
|