* Integrate $wgDeleteRevisionsLimit in Title::getUserPermissionsErrors() (only if...
[lhc/web/wiklou.git] / includes / specials / SpecialMovepage.php
1 <?php
2 /**
3 * Implements Special:Movepage
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 /**
25 * A special page that allows users to change page titles
26 *
27 * @ingroup SpecialPage
28 */
29 class MovePageForm extends UnlistedSpecialPage {
30
31 /**
32 * @var Title
33 */
34 var $oldTitle, $newTitle; # Objects
35 var $reason; # Text input
36 var $moveTalk, $deleteAndMove, $moveSubpages, $fixRedirects, $leaveRedirect, $moveOverShared; # Checks
37
38 private $watch = false;
39
40 public function __construct() {
41 parent::__construct( 'Movepage' );
42 }
43
44 public function execute( $par ) {
45 $this->checkReadOnly();
46
47 $this->setHeaders();
48 $this->outputHeader();
49
50 $request = $this->getRequest();
51 $target = !is_null( $par ) ? $par : $request->getVal( 'target' );
52
53 // Yes, the use of getVal() and getText() is wanted, see bug 20365
54 $oldTitleText = $request->getVal( 'wpOldTitle', $target );
55 $newTitleText = $request->getText( 'wpNewTitle' );
56
57 $this->oldTitle = Title::newFromText( $oldTitleText );
58 $this->newTitle = Title::newFromText( $newTitleText );
59
60 if( is_null( $this->oldTitle ) ) {
61 throw new ErrorPageError( 'notargettitle', 'notargettext' );
62 }
63 if( !$this->oldTitle->exists() ) {
64 throw new ErrorPageError( 'nopagetitle', 'nopagetext' );
65 }
66
67 $user = $this->getUser();
68
69 # Check rights
70 $permErrors = $this->oldTitle->getUserPermissionsErrors( 'move', $user );
71 if( !empty( $permErrors ) ) {
72 // Auto-block user's IP if the account was "hard" blocked
73 $user->spreadAnyEditBlock();
74 throw new PermissionsError( 'move', $permErrors );
75 }
76
77 $def = !$request->wasPosted();
78
79 $this->reason = $request->getText( 'wpReason' );
80 $this->moveTalk = $request->getBool( 'wpMovetalk', $def );
81 $this->fixRedirects = $request->getBool( 'wpFixRedirects', $def );
82 $this->leaveRedirect = $request->getBool( 'wpLeaveRedirect', $def );
83 $this->moveSubpages = $request->getBool( 'wpMovesubpages', false );
84 $this->deleteAndMove = $request->getBool( 'wpDeleteAndMove' ) && $request->getBool( 'wpConfirm' );
85 $this->moveOverShared = $request->getBool( 'wpMoveOverSharedFile', false );
86 $this->watch = $request->getCheck( 'wpWatch' ) && $user->isLoggedIn();
87
88 if ( 'submit' == $request->getVal( 'action' ) && $request->wasPosted()
89 && $user->matchEditToken( $request->getVal( 'wpEditToken' ) ) ) {
90 $this->doSubmit();
91 } else {
92 $this->showForm( '' );
93 }
94 }
95
96 /**
97 * Show the form
98 *
99 * @param $err Mixed: error message. May either be a string message name or
100 * array message name and parameters, like the second argument to
101 * OutputPage::wrapWikiMsg().
102 */
103 function showForm( $err ) {
104 global $wgContLang, $wgFixDoubleRedirects, $wgMaximumMovedPages;
105
106 $this->getSkin()->setRelevantTitle( $this->oldTitle );
107
108 $oldTitleLink = Linker::link( $this->oldTitle );
109
110 $out = $this->getOutput();
111 $out->setPageTitle( $this->msg( 'move-page', $this->oldTitle->getPrefixedText() ) );
112 $out->addModules( 'mediawiki.special.movePage' );
113
114 $newTitle = $this->newTitle;
115
116 if( !$newTitle ) {
117 # Show the current title as a default
118 # when the form is first opened.
119 $newTitle = $this->oldTitle;
120 }
121 else {
122 if( empty($err) ) {
123 # If a title was supplied, probably from the move log revert
124 # link, check for validity. We can then show some diagnostic
125 # information and save a click.
126 $newerr = $this->oldTitle->isValidMoveOperation( $newTitle );
127 if( $newerr ) {
128 $err = $newerr[0];
129 }
130 }
131 }
132
133 $user = $this->getUser();
134
135 if ( !empty($err) && $err[0] == 'articleexists' && $user->isAllowed( 'delete' ) ) {
136 $out->addWikiMsg( 'delete_and_move_text', $newTitle->getPrefixedText() );
137 $movepagebtn = wfMsg( 'delete_and_move' );
138 $submitVar = 'wpDeleteAndMove';
139 $confirm = "
140 <tr>
141 <td></td>
142 <td class='mw-input'>" .
143 Xml::checkLabel( wfMsg( 'delete_and_move_confirm' ), 'wpConfirm', 'wpConfirm' ) .
144 "</td>
145 </tr>";
146 $err = '';
147 } else {
148 if ($this->oldTitle->getNamespace() == NS_USER && !$this->oldTitle->isSubpage() ) {
149 $out->wrapWikiMsg( "<div class=\"error mw-moveuserpage-warning\">\n$1\n</div>", 'moveuserpage-warning' );
150 }
151 $out->addWikiMsg( $wgFixDoubleRedirects ? 'movepagetext' :
152 'movepagetext-noredirectfixer' );
153 $movepagebtn = wfMsg( 'movepagebtn' );
154 $submitVar = 'wpMove';
155 $confirm = false;
156 }
157
158 if ( !empty($err) && $err[0] == 'file-exists-sharedrepo' && $user->isAllowed( 'reupload-shared' ) ) {
159 $out->addWikiMsg( 'move-over-sharedrepo', $newTitle->getPrefixedText() );
160 $submitVar = 'wpMoveOverSharedFile';
161 $err = '';
162 }
163
164 $oldTalk = $this->oldTitle->getTalkPage();
165 $oldTitleSubpages = $this->oldTitle->hasSubpages();
166 $oldTitleTalkSubpages = $this->oldTitle->getTalkPage()->hasSubpages();
167
168 $canMoveSubpage = ( $oldTitleSubpages || $oldTitleTalkSubpages ) &&
169 !count( $this->oldTitle->getUserPermissionsErrors( 'move-subpages', $user ) );
170
171 # We also want to be able to move assoc. subpage talk-pages even if base page
172 # has no associated talk page, so || with $oldTitleTalkSubpages.
173 $considerTalk = !$this->oldTitle->isTalkPage() &&
174 ( $oldTalk->exists()
175 || ( $oldTitleTalkSubpages && $canMoveSubpage ) );
176
177 $dbr = wfGetDB( DB_SLAVE );
178 if ( $wgFixDoubleRedirects ) {
179 $hasRedirects = $dbr->selectField( 'redirect', '1',
180 array(
181 'rd_namespace' => $this->oldTitle->getNamespace(),
182 'rd_title' => $this->oldTitle->getDBkey(),
183 ) , __METHOD__ );
184 } else {
185 $hasRedirects = false;
186 }
187
188 if ( $considerTalk ) {
189 $out->addWikiMsg( 'movepagetalktext' );
190 }
191
192 $token = htmlspecialchars( $user->getEditToken() );
193
194 if ( !empty($err) ) {
195 $out->addSubtitle( $this->msg( 'formerror' ) );
196 if( $err[0] == 'hookaborted' ) {
197 $hookErr = $err[1];
198 $errMsg = "<p><strong class=\"error\">$hookErr</strong></p>\n";
199 $out->addHTML( $errMsg );
200 } else {
201 $out->wrapWikiMsg( "<p><strong class=\"error\">\n$1\n</strong></p>", $err );
202 }
203 }
204
205 if ( $this->oldTitle->isProtected( 'move' ) ) {
206 # Is the title semi-protected?
207 if ( $this->oldTitle->isSemiProtected( 'move' ) ) {
208 $noticeMsg = 'semiprotectedpagemovewarning';
209 $classes[] = 'mw-textarea-sprotected';
210 } else {
211 # Then it must be protected based on static groups (regular)
212 $noticeMsg = 'protectedpagemovewarning';
213 $classes[] = 'mw-textarea-protected';
214 }
215 $out->addHTML( "<div class='mw-warning-with-logexcerpt'>\n" );
216 $out->addWikiMsg( $noticeMsg );
217 LogEventsList::showLogExtract( $out, 'protect', $this->oldTitle, '', array( 'lim' => 1 ) );
218 $out->addHTML( "</div>\n" );
219 }
220
221 $out->addHTML(
222 Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getTitle()->getLocalURL( 'action=submit' ), 'id' => 'movepage' ) ) .
223 Xml::openElement( 'fieldset' ) .
224 Xml::element( 'legend', null, wfMsg( 'move-page-legend' ) ) .
225 Xml::openElement( 'table', array( 'border' => '0', 'id' => 'mw-movepage-table' ) ) .
226 "<tr>
227 <td class='mw-label'>" .
228 wfMsgHtml( 'movearticle' ) .
229 "</td>
230 <td class='mw-input'>
231 <strong>{$oldTitleLink}</strong>
232 </td>
233 </tr>
234 <tr>
235 <td class='mw-label'>" .
236 Xml::label( wfMsg( 'newtitle' ), 'wpNewTitle' ) .
237 "</td>
238 <td class='mw-input'>" .
239 Xml::input( 'wpNewTitle', 60, $wgContLang->recodeForEdit( $newTitle->getPrefixedText() ), array( 'type' => 'text', 'id' => 'wpNewTitle' ) ) .
240 Html::hidden( 'wpOldTitle', $this->oldTitle->getPrefixedText() ) .
241 "</td>
242 </tr>
243 <tr>
244 <td class='mw-label'>" .
245 Xml::label( wfMsg( 'movereason' ), 'wpReason' ) .
246 "</td>
247 <td class='mw-input'>" .
248 Html::element( 'textarea', array( 'name' => 'wpReason', 'id' => 'wpReason', 'cols' => 60, 'rows' => 2,
249 'maxlength' => 200 ), $this->reason ) . // maxlength byte limit is enforce in mediawiki.special.movePage.js
250 "</td>
251 </tr>"
252 );
253
254 if( $considerTalk ) {
255 $out->addHTML( "
256 <tr>
257 <td></td>
258 <td class='mw-input'>" .
259 Xml::checkLabel( wfMsg( 'movetalk' ), 'wpMovetalk', 'wpMovetalk', $this->moveTalk ) .
260 "</td>
261 </tr>"
262 );
263 }
264
265 if ( $user->isAllowed( 'suppressredirect' ) ) {
266 $out->addHTML( "
267 <tr>
268 <td></td>
269 <td class='mw-input' >" .
270 Xml::checkLabel( wfMsg( 'move-leave-redirect' ), 'wpLeaveRedirect',
271 'wpLeaveRedirect', $this->leaveRedirect ) .
272 "</td>
273 </tr>"
274 );
275 }
276
277 if ( $hasRedirects ) {
278 $out->addHTML( "
279 <tr>
280 <td></td>
281 <td class='mw-input' >" .
282 Xml::checkLabel( wfMsg( 'fix-double-redirects' ), 'wpFixRedirects',
283 'wpFixRedirects', $this->fixRedirects ) .
284 "</td>
285 </tr>"
286 );
287 }
288
289 if( $canMoveSubpage ) {
290 $out->addHTML( "
291 <tr>
292 <td></td>
293 <td class=\"mw-input\">" .
294 Xml::check(
295 'wpMovesubpages',
296 # Don't check the box if we only have talk subpages to
297 # move and we aren't moving the talk page.
298 $this->moveSubpages && ($this->oldTitle->hasSubpages() || $this->moveTalk),
299 array( 'id' => 'wpMovesubpages' )
300 ) . '&#160;' .
301 Xml::tags( 'label', array( 'for' => 'wpMovesubpages' ),
302 wfMsgExt(
303 ( $this->oldTitle->hasSubpages()
304 ? 'move-subpages'
305 : 'move-talk-subpages' ),
306 array( 'parseinline' ),
307 $this->getLanguage()->formatNum( $wgMaximumMovedPages ),
308 # $2 to allow use of PLURAL in message.
309 $wgMaximumMovedPages
310 )
311 ) .
312 "</td>
313 </tr>"
314 );
315 }
316
317 $watchChecked = $user->isLoggedIn() && ($this->watch || $user->getBoolOption( 'watchmoves' )
318 || $this->oldTitle->userIsWatching());
319 # Don't allow watching if user is not logged in
320 if( $user->isLoggedIn() ) {
321 $out->addHTML( "
322 <tr>
323 <td></td>
324 <td class='mw-input'>" .
325 Xml::checkLabel( wfMsg( 'move-watch' ), 'wpWatch', 'watch', $watchChecked ) .
326 "</td>
327 </tr>");
328 }
329
330 $out->addHTML( "
331 {$confirm}
332 <tr>
333 <td>&#160;</td>
334 <td class='mw-submit'>" .
335 Xml::submitButton( $movepagebtn, array( 'name' => $submitVar ) ) .
336 "</td>
337 </tr>" .
338 Xml::closeElement( 'table' ) .
339 Html::hidden( 'wpEditToken', $token ) .
340 Xml::closeElement( 'fieldset' ) .
341 Xml::closeElement( 'form' ) .
342 "\n"
343 );
344
345 $this->showLogFragment( $this->oldTitle );
346 $this->showSubpages( $this->oldTitle );
347
348 }
349
350 function doSubmit() {
351 global $wgMaximumMovedPages, $wgFixDoubleRedirects, $wgDeleteRevisionsLimit;
352
353 $user = $this->getUser();
354
355 if ( $user->pingLimiter( 'move' ) ) {
356 throw new ThrottledError;
357 }
358
359 $ot = $this->oldTitle;
360 $nt = $this->newTitle;
361
362 # Delete to make way if requested
363 if ( $this->deleteAndMove ) {
364 $permErrors = $nt->getUserPermissionsErrors( 'delete', $user );
365 if ( count( $permErrors ) ) {
366 # Only show the first error
367 $this->showForm( $permErrors[0] );
368 return;
369 }
370
371 $reason = wfMessage( 'delete_and_move_reason', $ot )->inContentLanguage()->text();
372
373 // Delete an associated image if there is
374 if ( $nt->getNamespace() == NS_FILE ) {
375 $file = wfLocalFile( $nt );
376 if ( $file->exists() ) {
377 $file->delete( $reason, false );
378 }
379 }
380
381 $error = ''; // passed by ref
382 $page = WikiPage::factory( $nt );
383 if ( !$page->doDeleteArticle( $reason, false, 0, true, $error, $user ) ) {
384 $this->showForm( array( 'cannotdelete', wfEscapeWikiText( $nt->getPrefixedText() ) ) );
385 return;
386 }
387
388 }
389
390 # don't allow moving to pages with # in
391 if ( !$nt || $nt->getFragment() != '' ) {
392 $this->showForm( 'badtitletext' );
393 return;
394 }
395
396 # Show a warning if the target file exists on a shared repo
397 if ( $nt->getNamespace() == NS_FILE
398 && !( $this->moveOverShared && $user->isAllowed( 'reupload-shared' ) )
399 && !RepoGroup::singleton()->getLocalRepo()->findFile( $nt )
400 && wfFindFile( $nt ) )
401 {
402 $this->showForm( array('file-exists-sharedrepo') );
403 return;
404
405 }
406
407 if ( $user->isAllowed( 'suppressredirect' ) ) {
408 $createRedirect = $this->leaveRedirect;
409 } else {
410 $createRedirect = true;
411 }
412
413 # Do the actual move.
414 $error = $ot->moveTo( $nt, true, $this->reason, $createRedirect );
415 if ( $error !== true ) {
416 # @todo FIXME: Show all the errors in a list, not just the first one
417 $this->showForm( reset( $error ) );
418 return;
419 }
420
421 if ( $wgFixDoubleRedirects && $this->fixRedirects ) {
422 DoubleRedirectJob::fixRedirects( 'move', $ot, $nt );
423 }
424
425 wfRunHooks( 'SpecialMovepageAfterMove', array( &$this, &$ot, &$nt ) );
426
427 $out = $this->getOutput();
428 $out->setPagetitle( wfMsg( 'pagemovedsub' ) );
429
430 $oldLink = Linker::link(
431 $ot,
432 null,
433 array(),
434 array( 'redirect' => 'no' )
435 );
436 $newLink = Linker::linkKnown( $nt );
437 $oldText = $ot->getPrefixedText();
438 $newText = $nt->getPrefixedText();
439
440 $msgName = $createRedirect ? 'movepage-moved-redirect' : 'movepage-moved-noredirect';
441 $out->addHTML( wfMessage( 'movepage-moved' )->rawParams( $oldLink, $newLink, $oldText, $newText )->parseAsBlock() );
442 $out->addWikiMsg( $msgName );
443
444 # Now we move extra pages we've been asked to move: subpages and talk
445 # pages. First, if the old page or the new page is a talk page, we
446 # can't move any talk pages: cancel that.
447 if( $ot->isTalkPage() || $nt->isTalkPage() ) {
448 $this->moveTalk = false;
449 }
450
451 if ( count( $ot->getUserPermissionsErrors( 'move-subpages', $user ) ) ) {
452 $this->moveSubpages = false;
453 }
454
455 # Next make a list of id's. This might be marginally less efficient
456 # than a more direct method, but this is not a highly performance-cri-
457 # tical code path and readable code is more important here.
458 #
459 # Note: this query works nicely on MySQL 5, but the optimizer in MySQL
460 # 4 might get confused. If so, consider rewriting as a UNION.
461 #
462 # If the target namespace doesn't allow subpages, moving with subpages
463 # would mean that you couldn't move them back in one operation, which
464 # is bad.
465 # @todo FIXME: A specific error message should be given in this case.
466
467 // @todo FIXME: Use Title::moveSubpages() here
468 $dbr = wfGetDB( DB_MASTER );
469 if( $this->moveSubpages && (
470 MWNamespace::hasSubpages( $nt->getNamespace() ) || (
471 $this->moveTalk &&
472 MWNamespace::hasSubpages( $nt->getTalkPage()->getNamespace() )
473 )
474 ) ) {
475 $conds = array(
476 'page_title' . $dbr->buildLike( $ot->getDBkey() . '/', $dbr->anyString() )
477 .' OR page_title = ' . $dbr->addQuotes( $ot->getDBkey() )
478 );
479 $conds['page_namespace'] = array();
480 if( MWNamespace::hasSubpages( $nt->getNamespace() ) ) {
481 $conds['page_namespace'] []= $ot->getNamespace();
482 }
483 if( $this->moveTalk && MWNamespace::hasSubpages( $nt->getTalkPage()->getNamespace() ) ) {
484 $conds['page_namespace'] []= $ot->getTalkPage()->getNamespace();
485 }
486 } elseif( $this->moveTalk ) {
487 $conds = array(
488 'page_namespace' => $ot->getTalkPage()->getNamespace(),
489 'page_title' => $ot->getDBkey()
490 );
491 } else {
492 # Skip the query
493 $conds = null;
494 }
495
496 $extraPages = array();
497 if( !is_null( $conds ) ) {
498 $extraPages = TitleArray::newFromResult(
499 $dbr->select( 'page',
500 array( 'page_id', 'page_namespace', 'page_title' ),
501 $conds,
502 __METHOD__
503 )
504 );
505 }
506
507 $extraOutput = array();
508 $count = 1;
509 foreach( $extraPages as $oldSubpage ) {
510 if( $ot->equals( $oldSubpage ) ) {
511 # Already did this one.
512 continue;
513 }
514
515 $newPageName = preg_replace(
516 '#^'.preg_quote( $ot->getDBkey(), '#' ).'#',
517 StringUtils::escapeRegexReplacement( $nt->getDBkey() ), # bug 21234
518 $oldSubpage->getDBkey()
519 );
520 if( $oldSubpage->isTalkPage() ) {
521 $newNs = $nt->getTalkPage()->getNamespace();
522 } else {
523 $newNs = $nt->getSubjectPage()->getNamespace();
524 }
525 # Bug 14385: we need makeTitleSafe because the new page names may
526 # be longer than 255 characters.
527 $newSubpage = Title::makeTitleSafe( $newNs, $newPageName );
528 if( !$newSubpage ) {
529 $oldLink = Linker::linkKnown( $oldSubpage );
530 $extraOutput []= wfMsgHtml( 'movepage-page-unmoved', $oldLink,
531 htmlspecialchars(Title::makeName( $newNs, $newPageName )));
532 continue;
533 }
534
535 # This was copy-pasted from Renameuser, bleh.
536 if ( $newSubpage->exists() && !$oldSubpage->isValidMoveTarget( $newSubpage ) ) {
537 $link = Linker::linkKnown( $newSubpage );
538 $extraOutput []= wfMsgHtml( 'movepage-page-exists', $link );
539 } else {
540 $success = $oldSubpage->moveTo( $newSubpage, true, $this->reason, $createRedirect );
541 if( $success === true ) {
542 if ( $this->fixRedirects ) {
543 DoubleRedirectJob::fixRedirects( 'move', $oldSubpage, $newSubpage );
544 }
545 $oldLink = Linker::link(
546 $oldSubpage,
547 null,
548 array(),
549 array( 'redirect' => 'no' )
550 );
551 $newLink = Linker::linkKnown( $newSubpage );
552 $extraOutput []= wfMsgHtml( 'movepage-page-moved', $oldLink, $newLink );
553 ++$count;
554 if( $count >= $wgMaximumMovedPages ) {
555 $extraOutput []= wfMsgExt( 'movepage-max-pages', array( 'parsemag', 'escape' ), $this->getLanguage()->formatNum( $wgMaximumMovedPages ) );
556 break;
557 }
558 } else {
559 $oldLink = Linker::linkKnown( $oldSubpage );
560 $newLink = Linker::link( $newSubpage );
561 $extraOutput []= wfMsgHtml( 'movepage-page-unmoved', $oldLink, $newLink );
562 }
563 }
564
565 }
566
567 if( $extraOutput !== array() ) {
568 $out->addHTML( "<ul>\n<li>" . implode( "</li>\n<li>", $extraOutput ) . "</li>\n</ul>" );
569 }
570
571 # Deal with watches (we don't watch subpages)
572 if( $this->watch && $user->isLoggedIn() ) {
573 $user->addWatch( $ot );
574 $user->addWatch( $nt );
575 } else {
576 $user->removeWatch( $ot );
577 $user->removeWatch( $nt );
578 }
579
580 # Re-clear the file redirect cache, which may have been polluted by
581 # parsing in messages above. See CR r56745.
582 # @todo FIXME: Needs a more robust solution inside FileRepo.
583 if( $ot->getNamespace() == NS_FILE ) {
584 RepoGroup::singleton()->getLocalRepo()->invalidateImageRedirect( $ot );
585 }
586 }
587
588 function showLogFragment( $title ) {
589 $out = $this->getOutput();
590 $out->addHTML( Xml::element( 'h2', null, LogPage::logName( 'move' ) ) );
591 LogEventsList::showLogExtract( $out, 'move', $title );
592 }
593
594 function showSubpages( $title ) {
595 if( !MWNamespace::hasSubpages( $title->getNamespace() ) )
596 return;
597
598 $subpages = $title->getSubpages();
599 $count = $subpages instanceof TitleArray ? $subpages->count() : 0;
600
601 $out = $this->getOutput();
602 $out->wrapWikiMsg( '== $1 ==', array( 'movesubpage', $count ) );
603
604 # No subpages.
605 if ( $count == 0 ) {
606 $out->addWikiMsg( 'movenosubpage' );
607 return;
608 }
609
610 $out->addWikiMsg( 'movesubpagetext', $this->getLanguage()->formatNum( $count ) );
611 $out->addHTML( "<ul>\n" );
612
613 foreach( $subpages as $subpage ) {
614 $link = Linker::link( $subpage );
615 $out->addHTML( "<li>$link</li>\n" );
616 }
617 $out->addHTML( "</ul>\n" );
618 }
619 }