Merge "Drop index oi_name_archive_name on table oldimage"
[lhc/web/wiklou.git] / includes / specials / SpecialWatchlist.php
1 <?php
2 /**
3 * Implements Special:Watchlist
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * http://www.gnu.org/copyleft/gpl.html
19 *
20 * @file
21 * @ingroup SpecialPage
22 */
23
24 use MediaWiki\MediaWikiServices;
25 use Wikimedia\Rdbms\ResultWrapper;
26
27 /**
28 * A special page that lists last changes made to the wiki,
29 * limited to user-defined list of titles.
30 *
31 * @ingroup SpecialPage
32 */
33 class SpecialWatchlist extends ChangesListSpecialPage {
34 public function __construct( $page = 'Watchlist', $restriction = 'viewmywatchlist' ) {
35 parent::__construct( $page, $restriction );
36 }
37
38 public function doesWrites() {
39 return true;
40 }
41
42 /**
43 * Main execution point
44 *
45 * @param string $subpage
46 */
47 function execute( $subpage ) {
48 // Anons don't get a watchlist
49 $this->requireLogin( 'watchlistanontext' );
50
51 $output = $this->getOutput();
52 $request = $this->getRequest();
53 $this->addHelpLink( 'Help:Watching pages' );
54 $output->addModules( [
55 'mediawiki.special.changeslist.visitedstatus',
56 'mediawiki.special.watchlist',
57 ] );
58
59 $mode = SpecialEditWatchlist::getMode( $request, $subpage );
60 if ( $mode !== false ) {
61 if ( $mode === SpecialEditWatchlist::EDIT_RAW ) {
62 $title = SpecialPage::getTitleFor( 'EditWatchlist', 'raw' );
63 } elseif ( $mode === SpecialEditWatchlist::EDIT_CLEAR ) {
64 $title = SpecialPage::getTitleFor( 'EditWatchlist', 'clear' );
65 } else {
66 $title = SpecialPage::getTitleFor( 'EditWatchlist' );
67 }
68
69 $output->redirect( $title->getLocalURL() );
70
71 return;
72 }
73
74 $this->checkPermissions();
75
76 $user = $this->getUser();
77 $opts = $this->getOptions();
78
79 $config = $this->getConfig();
80 if ( ( $config->get( 'EnotifWatchlist' ) || $config->get( 'ShowUpdatedMarker' ) )
81 && $request->getVal( 'reset' )
82 && $request->wasPosted()
83 ) {
84 $user->clearAllNotifications();
85 $output->redirect( $this->getPageTitle()->getFullURL( $opts->getChangedValues() ) );
86
87 return;
88 }
89
90 parent::execute( $subpage );
91 }
92
93 /**
94 * Return an array of subpages that this special page will accept.
95 *
96 * @see also SpecialEditWatchlist::getSubpagesForPrefixSearch
97 * @return string[] subpages
98 */
99 public function getSubpagesForPrefixSearch() {
100 return [
101 'clear',
102 'edit',
103 'raw',
104 ];
105 }
106
107 /**
108 * @inheritdoc
109 */
110 protected function registerFiltersFromDefinitions( array $definition ) {
111 foreach ( $definition as $groupName => &$groupDefinition ) {
112 foreach ( $groupDefinition['filters'] as &$filterDefinition ) {
113 if ( isset( $filterDefinition['showHideSuffix'] ) ) {
114 $filterDefinition['showHide'] = 'wl' . $filterDefinition['showHideSuffix'];
115 }
116 }
117 }
118
119 parent::registerFiltersFromDefinitions( $definition );
120 }
121
122 /**
123 * @inheritdoc
124 */
125 protected function registerFilters() {
126 parent::registerFilters();
127
128 $user = $this->getUser();
129
130 $significance = $this->getFilterGroup( 'significance' );
131 $hideMinor = $significance->getFilter( 'hideminor' );
132 $hideMinor->setDefault( $user->getBoolOption( 'watchlisthideminor' ) );
133
134 $automated = $this->getFilterGroup( 'automated' );
135 $hideBots = $automated->getFilter( 'hidebots' );
136 $hideBots->setDefault( $user->getBoolOption( 'watchlisthidebots' ) );
137
138 $registration = $this->getFilterGroup( 'registration' );
139 $hideAnons = $registration->getFilter( 'hideanons' );
140 $hideAnons->setDefault( $user->getBoolOption( 'watchlisthideanons' ) );
141 $hideLiu = $registration->getFilter( 'hideliu' );
142 $hideLiu->setDefault( $user->getBoolOption( 'watchlisthideliu' ) );
143
144 $reviewStatus = $this->getFilterGroup( 'reviewStatus' );
145 $hidePatrolled = $reviewStatus->getFilter( 'hidepatrolled' );
146 $hidePatrolled->setDefault( $user->getBoolOption( 'watchlisthidepatrolled' ) );
147
148 $authorship = $this->getFilterGroup( 'authorship' );
149 $hideMyself = $authorship->getFilter( 'hidemyself' );
150 $hideMyself->setDefault( $user->getBoolOption( 'watchlisthideown' ) );
151
152 $changeType = $this->getFilterGroup( 'changeType' );
153 $hideCategorization = $changeType->getFilter( 'hidecategorization' );
154 $hideCategorization->setDefault( $user->getBoolOption( 'watchlisthidecategorization' ) );
155 }
156
157 /**
158 * Get a FormOptions object containing the default options
159 *
160 * @return FormOptions
161 */
162 public function getDefaultOptions() {
163 $opts = parent::getDefaultOptions();
164 $user = $this->getUser();
165
166 $opts->add( 'days', $user->getOption( 'watchlistdays' ), FormOptions::FLOAT );
167 $opts->add( 'extended', $user->getBoolOption( 'extendwatchlist' ) );
168 if ( $this->getRequest()->getVal( 'action' ) == 'submit' ) {
169 // The user has submitted the form, so we dont need the default values
170 return $opts;
171 }
172
173 return $opts;
174 }
175
176 /**
177 * Get all custom filters
178 *
179 * @return array Map of filter URL param names to properties (msg/default)
180 */
181 protected function getCustomFilters() {
182 if ( $this->customFilters === null ) {
183 $this->customFilters = parent::getCustomFilters();
184 Hooks::run( 'SpecialWatchlistFilters', [ $this, &$this->customFilters ], '1.23' );
185 }
186
187 return $this->customFilters;
188 }
189
190 /**
191 * Fetch values for a FormOptions object from the WebRequest associated with this instance.
192 *
193 * Maps old pre-1.23 request parameters Watchlist used to use (different from Recentchanges' ones)
194 * to the current ones.
195 *
196 * @param FormOptions $opts
197 * @return FormOptions
198 */
199 protected function fetchOptionsFromRequest( $opts ) {
200 static $compatibilityMap = [
201 'hideMinor' => 'hideminor',
202 'hideBots' => 'hidebots',
203 'hideAnons' => 'hideanons',
204 'hideLiu' => 'hideliu',
205 'hidePatrolled' => 'hidepatrolled',
206 'hideOwn' => 'hidemyself',
207 ];
208
209 $params = $this->getRequest()->getValues();
210 foreach ( $compatibilityMap as $from => $to ) {
211 if ( isset( $params[$from] ) ) {
212 $params[$to] = $params[$from];
213 unset( $params[$from] );
214 }
215 }
216
217 // Not the prettiest way to achieve this… FormOptions internally depends on data sanitization
218 // methods defined on WebRequest and removing this dependency would cause some code duplication.
219 $request = new DerivativeRequest( $this->getRequest(), $params );
220 $opts->fetchValuesFromRequest( $request );
221
222 return $opts;
223 }
224
225 /**
226 * @inheritdoc
227 */
228 protected function buildQuery( &$tables, &$fields, &$conds, &$query_options,
229 &$join_conds, FormOptions $opts ) {
230
231 $dbr = $this->getDB();
232 parent::buildQuery( $tables, $fields, $conds, $query_options, $join_conds,
233 $opts );
234
235 // Calculate cutoff
236 if ( $opts['days'] > 0 ) {
237 $conds[] = 'rc_timestamp > ' .
238 $dbr->addQuotes( $dbr->timestamp( time() - intval( $opts['days'] * 86400 ) ) );
239 }
240 }
241
242 /**
243 * @inheritdoc
244 */
245 protected function doMainQuery( $tables, $fields, $conds, $query_options,
246 $join_conds, FormOptions $opts ) {
247
248 $dbr = $this->getDB();
249 $user = $this->getUser();
250
251 # Toggle watchlist content (all recent edits or just the latest)
252 if ( $opts['extended'] ) {
253 $limitWatchlist = $user->getIntOption( 'wllimit' );
254 $usePage = false;
255 } else {
256 # Top log Ids for a page are not stored
257 $nonRevisionTypes = [ RC_LOG ];
258 Hooks::run( 'SpecialWatchlistGetNonRevisionTypes', [ &$nonRevisionTypes ] );
259 if ( $nonRevisionTypes ) {
260 $conds[] = $dbr->makeList(
261 [
262 'rc_this_oldid=page_latest',
263 'rc_type' => $nonRevisionTypes,
264 ],
265 LIST_OR
266 );
267 }
268 $limitWatchlist = 0;
269 $usePage = true;
270 }
271
272 $tables = array_merge( [ 'recentchanges', 'watchlist' ], $tables );
273 $fields = array_merge( RecentChange::selectFields(), $fields );
274
275 $query_options = array_merge( [ 'ORDER BY' => 'rc_timestamp DESC' ], $query_options );
276 $join_conds = array_merge(
277 [
278 'watchlist' => [
279 'INNER JOIN',
280 [
281 'wl_user' => $user->getId(),
282 'wl_namespace=rc_namespace',
283 'wl_title=rc_title'
284 ],
285 ],
286 ],
287 $join_conds
288 );
289
290 if ( $this->getConfig()->get( 'ShowUpdatedMarker' ) ) {
291 $fields[] = 'wl_notificationtimestamp';
292 }
293 if ( $limitWatchlist ) {
294 $query_options['LIMIT'] = $limitWatchlist;
295 }
296
297 $rollbacker = $user->isAllowed( 'rollback' );
298 if ( $usePage || $rollbacker ) {
299 $tables[] = 'page';
300 $join_conds['page'] = [ 'LEFT JOIN', 'rc_cur_id=page_id' ];
301 if ( $rollbacker ) {
302 $fields[] = 'page_latest';
303 }
304 }
305
306 // Log entries with DELETED_ACTION must not show up unless the user has
307 // the necessary rights.
308 if ( !$user->isAllowed( 'deletedhistory' ) ) {
309 $bitmask = LogPage::DELETED_ACTION;
310 } elseif ( !$user->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) {
311 $bitmask = LogPage::DELETED_ACTION | LogPage::DELETED_RESTRICTED;
312 } else {
313 $bitmask = 0;
314 }
315 if ( $bitmask ) {
316 $conds[] = $dbr->makeList( [
317 'rc_type != ' . RC_LOG,
318 $dbr->bitAnd( 'rc_deleted', $bitmask ) . " != $bitmask",
319 ], LIST_OR );
320 }
321
322 ChangeTags::modifyDisplayQuery(
323 $tables,
324 $fields,
325 $conds,
326 $join_conds,
327 $query_options,
328 ''
329 );
330
331 $this->runMainQueryHook( $tables, $fields, $conds, $query_options, $join_conds, $opts );
332
333 return $dbr->select(
334 $tables,
335 $fields,
336 $conds,
337 __METHOD__,
338 $query_options,
339 $join_conds
340 );
341 }
342
343 protected function runMainQueryHook( &$tables, &$fields, &$conds, &$query_options,
344 &$join_conds, $opts
345 ) {
346 return parent::runMainQueryHook( $tables, $fields, $conds, $query_options, $join_conds, $opts )
347 && Hooks::run(
348 'SpecialWatchlistQuery',
349 [ &$conds, &$tables, &$join_conds, &$fields, $opts ],
350 '1.23'
351 );
352 }
353
354 /**
355 * Return a IDatabase object for reading
356 *
357 * @return IDatabase
358 */
359 protected function getDB() {
360 return wfGetDB( DB_REPLICA, 'watchlist' );
361 }
362
363 /**
364 * Output feed links.
365 */
366 public function outputFeedLinks() {
367 $user = $this->getUser();
368 $wlToken = $user->getTokenFromOption( 'watchlisttoken' );
369 if ( $wlToken ) {
370 $this->addFeedLinks( [
371 'action' => 'feedwatchlist',
372 'allrev' => 1,
373 'wlowner' => $user->getName(),
374 'wltoken' => $wlToken,
375 ] );
376 }
377 }
378
379 /**
380 * Build and output the actual changes list.
381 *
382 * @param ResultWrapper $rows Database rows
383 * @param FormOptions $opts
384 */
385 public function outputChangesList( $rows, $opts ) {
386 $dbr = $this->getDB();
387 $user = $this->getUser();
388 $output = $this->getOutput();
389
390 # Show a message about replica DB lag, if applicable
391 $lag = wfGetLB()->safeGetLag( $dbr );
392 if ( $lag > 0 ) {
393 $output->showLagWarning( $lag );
394 }
395
396 # If no rows to display, show message before try to render the list
397 if ( $rows->numRows() == 0 ) {
398 $output->wrapWikiMsg(
399 "<div class='mw-changeslist-empty'>\n$1\n</div>", 'recentchanges-noresult'
400 );
401 return;
402 }
403
404 $dbr->dataSeek( $rows, 0 );
405
406 $list = ChangesList::newFromContext( $this->getContext(), $this->filterGroups );
407 $list->setWatchlistDivs();
408 $list->initChangesListRows( $rows );
409 $dbr->dataSeek( $rows, 0 );
410
411 if ( $this->getConfig()->get( 'RCShowWatchingUsers' )
412 && $user->getOption( 'shownumberswatching' )
413 ) {
414 $watchedItemStore = MediaWikiServices::getInstance()->getWatchedItemStore();
415 }
416
417 $s = $list->beginRecentChangesList();
418 $userShowHiddenCats = $this->getUser()->getBoolOption( 'showhiddencats' );
419 $counter = 1;
420 foreach ( $rows as $obj ) {
421 # Make RC entry
422 $rc = RecentChange::newFromRow( $obj );
423
424 # Skip CatWatch entries for hidden cats based on user preference
425 if (
426 $rc->getAttribute( 'rc_type' ) == RC_CATEGORIZE &&
427 !$userShowHiddenCats &&
428 $rc->getParam( 'hidden-cat' )
429 ) {
430 continue;
431 }
432
433 $rc->counter = $counter++;
434
435 if ( $this->getConfig()->get( 'ShowUpdatedMarker' ) ) {
436 $updated = $obj->wl_notificationtimestamp;
437 } else {
438 $updated = false;
439 }
440
441 if ( isset( $watchedItemStore ) ) {
442 $rcTitleValue = new TitleValue( (int)$obj->rc_namespace, $obj->rc_title );
443 $rc->numberofWatchingusers = $watchedItemStore->countWatchers( $rcTitleValue );
444 } else {
445 $rc->numberofWatchingusers = 0;
446 }
447
448 $changeLine = $list->recentChangesLine( $rc, $updated, $counter );
449 if ( $changeLine !== false ) {
450 $s .= $changeLine;
451 }
452 }
453 $s .= $list->endRecentChangesList();
454
455 $output->addHTML( $s );
456 }
457
458 /**
459 * Set the text to be displayed above the changes
460 *
461 * @param FormOptions $opts
462 * @param int $numRows Number of rows in the result to show after this header
463 */
464 public function doHeader( $opts, $numRows ) {
465 $user = $this->getUser();
466 $out = $this->getOutput();
467
468 $out->addSubtitle(
469 $this->msg( 'watchlistfor2', $user->getName() )
470 ->rawParams( SpecialEditWatchlist::buildTools(
471 $this->getLanguage(),
472 $this->getLinkRenderer()
473 ) )
474 );
475
476 $this->setTopText( $opts );
477
478 $lang = $this->getLanguage();
479 if ( $opts['days'] > 0 ) {
480 $days = $opts['days'];
481 } else {
482 $days = $this->getConfig()->get( 'RCMaxAge' ) / ( 3600 * 24 );
483 }
484 $timestamp = wfTimestampNow();
485 $wlInfo = $this->msg( 'wlnote' )->numParams( $numRows, round( $days * 24 ) )->params(
486 $lang->userDate( $timestamp, $user ), $lang->userTime( $timestamp, $user )
487 )->parse() . "<br />\n";
488
489 $nondefaults = $opts->getChangedValues();
490 $cutofflinks = $this->msg( 'wlshowtime' ) . ' ' . $this->cutoffselector( $opts );
491
492 # Spit out some control panel links
493 $links = [];
494 $context = $this->getContext();
495 $namesOfDisplayedFilters = [];
496 foreach ( $this->getFilterGroups() as $groupName => $group ) {
497 if ( !$group->isPerGroupRequestParameter() ) {
498 foreach ( $group->getFilters() as $filterName => $filter ) {
499 if ( $filter->displaysOnUnstructuredUi( $this ) ) {
500 $namesOfDisplayedFilters[] = $filterName;
501 $links[] = $this->showHideCheck(
502 $nondefaults,
503 $filter->getShowHide(),
504 $filterName,
505 $opts[$filterName]
506 );
507 }
508 }
509 }
510 }
511
512 $hiddenFields = $nondefaults;
513 $hiddenFields['action'] = 'submit';
514 unset( $hiddenFields['namespace'] );
515 unset( $hiddenFields['invert'] );
516 unset( $hiddenFields['associated'] );
517 unset( $hiddenFields['days'] );
518 foreach ( $namesOfDisplayedFilters as $filterName ) {
519 unset( $hiddenFields[$filterName] );
520 }
521
522 # Create output
523 $form = '';
524
525 # Namespace filter and put the whole form together.
526 $form .= $wlInfo;
527 $form .= $cutofflinks;
528 $form .= $this->msg( 'watchlist-hide' ) .
529 $this->msg( 'colon-separator' )->escaped() .
530 implode( ' ', $links );
531 $form .= "\n<br />\n";
532 $form .= Html::namespaceSelector(
533 [
534 'selected' => $opts['namespace'],
535 'all' => '',
536 'label' => $this->msg( 'namespace' )->text()
537 ], [
538 'name' => 'namespace',
539 'id' => 'namespace',
540 'class' => 'namespaceselector',
541 ]
542 ) . "\n";
543 $form .= '<span class="mw-input-with-label">' . Xml::checkLabel(
544 $this->msg( 'invert' )->text(),
545 'invert',
546 'nsinvert',
547 $opts['invert'],
548 [ 'title' => $this->msg( 'tooltip-invert' )->text() ]
549 ) . "</span>\n";
550 $form .= '<span class="mw-input-with-label">' . Xml::checkLabel(
551 $this->msg( 'namespace_association' )->text(),
552 'associated',
553 'nsassociated',
554 $opts['associated'],
555 [ 'title' => $this->msg( 'tooltip-namespace_association' )->text() ]
556 ) . "</span>\n";
557 $form .= Xml::submitButton( $this->msg( 'watchlist-submit' )->text() ) . "\n";
558 foreach ( $hiddenFields as $key => $value ) {
559 $form .= Html::hidden( $key, $value ) . "\n";
560 }
561 $form .= Xml::closeElement( 'fieldset' ) . "\n";
562 $form .= Xml::closeElement( 'form' ) . "\n";
563 $this->getOutput()->addHTML( $form );
564
565 $this->setBottomText( $opts );
566 }
567
568 function cutoffselector( $options ) {
569 // Cast everything to strings immediately, so that we know all of the values have the same
570 // precision, and can be compared with '==='. 2/24 has a few more decimal places than its
571 // default string representation, for example, and would confuse comparisons.
572
573 // Misleadingly, the 'days' option supports hours too.
574 $days = array_map( 'strval', [ 1/24, 2/24, 6/24, 12/24, 1, 3, 7 ] );
575
576 $userWatchlistOption = (string)$this->getUser()->getOption( 'watchlistdays' );
577 // add the user preference, if it isn't available already
578 if ( !in_array( $userWatchlistOption, $days ) && $userWatchlistOption !== '0' ) {
579 $days[] = $userWatchlistOption;
580 }
581
582 $maxDays = (string)( $this->getConfig()->get( 'RCMaxAge' ) / ( 3600 * 24 ) );
583 // add the maximum possible value, if it isn't available already
584 if ( !in_array( $maxDays, $days ) ) {
585 $days[] = $maxDays;
586 }
587
588 $selected = (string)$options['days'];
589 if ( $selected <= 0 ) {
590 $selected = $maxDays;
591 }
592
593 // add the currently selected value, if it isn't available already
594 if ( !in_array( $selected, $days ) ) {
595 $days[] = $selected;
596 }
597
598 $select = new XmlSelect( 'days', 'days', $selected );
599
600 asort( $days );
601 foreach ( $days as $value ) {
602 if ( $value < 1 ) {
603 $name = $this->msg( 'hours' )->numParams( $value * 24 )->text();
604 } else {
605 $name = $this->msg( 'days' )->numParams( $value )->text();
606 }
607 $select->addOption( $name, $value );
608 }
609
610 return $select->getHTML() . "\n<br />\n";
611 }
612
613 function setTopText( FormOptions $opts ) {
614 $nondefaults = $opts->getChangedValues();
615 $form = "";
616 $user = $this->getUser();
617
618 $numItems = $this->countItems();
619 $showUpdatedMarker = $this->getConfig()->get( 'ShowUpdatedMarker' );
620
621 // Show watchlist header
622 $form .= "<p>";
623 if ( $numItems == 0 ) {
624 $form .= $this->msg( 'nowatchlist' )->parse() . "\n";
625 } else {
626 $form .= $this->msg( 'watchlist-details' )->numParams( $numItems )->parse() . "\n";
627 if ( $this->getConfig()->get( 'EnotifWatchlist' )
628 && $user->getOption( 'enotifwatchlistpages' )
629 ) {
630 $form .= $this->msg( 'wlheader-enotif' )->parse() . "\n";
631 }
632 if ( $showUpdatedMarker ) {
633 $form .= $this->msg( 'wlheader-showupdated' )->parse() . "\n";
634 }
635 }
636 $form .= "</p>";
637
638 if ( $numItems > 0 && $showUpdatedMarker ) {
639 $form .= Xml::openElement( 'form', [ 'method' => 'post',
640 'action' => $this->getPageTitle()->getLocalURL(),
641 'id' => 'mw-watchlist-resetbutton' ] ) . "\n" .
642 Xml::submitButton( $this->msg( 'enotif_reset' )->text(),
643 [ 'name' => 'mw-watchlist-reset-submit' ] ) . "\n" .
644 Html::hidden( 'reset', 'all' ) . "\n";
645 foreach ( $nondefaults as $key => $value ) {
646 $form .= Html::hidden( $key, $value ) . "\n";
647 }
648 $form .= Xml::closeElement( 'form' ) . "\n";
649 }
650
651 $form .= Xml::openElement( 'form', [
652 'method' => 'get',
653 'action' => wfScript(),
654 'id' => 'mw-watchlist-form'
655 ] );
656 $form .= Html::hidden( 'title', $this->getPageTitle()->getPrefixedText() );
657 $form .= Xml::fieldset(
658 $this->msg( 'watchlist-options' )->text(),
659 false,
660 [ 'id' => 'mw-watchlist-options' ]
661 );
662
663 $form .= $this->makeLegend();
664
665 $this->getOutput()->addHTML( $form );
666 }
667
668 protected function showHideCheck( $options, $message, $name, $value ) {
669 $options[$name] = 1 - (int)$value;
670
671 return '<span class="mw-input-with-label">' . Xml::checkLabel(
672 $this->msg( $message, '' )->text(),
673 $name,
674 $name,
675 (int)$value
676 ) . '</span>';
677 }
678
679 /**
680 * Count the number of paired items on a user's watchlist.
681 * The assumption made here is that when a subject page is watched a talk page is also watched.
682 * Hence the number of individual items is halved.
683 *
684 * @return int
685 */
686 protected function countItems() {
687 $store = MediaWikiServices::getInstance()->getWatchedItemStore();
688 $count = $store->countWatchedItems( $this->getUser() );
689 return floor( $count / 2 );
690 }
691 }