Code Duplication    Length = 18-19 lines in 2 locations

includes/api/ApiQueryRecentChanges.php 1 location

@@ 436-453 (lines=18) @@
433
		$anyHidden = false;
434
435
		/* Create a new entry in the result for the title. */
436
		if ( $this->fld_title || $this->fld_ids ) {
437
			if ( $type === RC_LOG && ( $row->rc_deleted & LogPage::DELETED_ACTION ) ) {
438
				$vals['actionhidden'] = true;
439
				$anyHidden = true;
440
			}
441
			if ( $type !== RC_LOG ||
442
				LogEventsList::userCanBitfield( $row->rc_deleted, LogPage::DELETED_ACTION, $user )
443
			) {
444
				if ( $this->fld_title ) {
445
					ApiQueryBase::addTitleInfo( $vals, $title );
446
				}
447
				if ( $this->fld_ids ) {
448
					$vals['pageid'] = intval( $row->rc_cur_id );
449
					$vals['revid'] = intval( $row->rc_this_oldid );
450
					$vals['old_revid'] = intval( $row->rc_last_oldid );
451
				}
452
			}
453
		}
454
455
		if ( $this->fld_ids ) {
456
			$vals['rcid'] = intval( $row->rc_id );

includes/api/ApiQueryWatchlist.php 1 location

@@ 310-328 (lines=19) @@
307
		$anyHidden = false;
308
309
		/* Create a new entry in the result for the title. */
310
		if ( $this->fld_title || $this->fld_ids ) {
311
			// These should already have been filtered out of the query, but just in case.
312
			if ( $type === RC_LOG && ( $row->rc_deleted & LogPage::DELETED_ACTION ) ) {
313
				$vals['actionhidden'] = true;
314
				$anyHidden = true;
315
			}
316
			if ( $type !== RC_LOG ||
317
				LogEventsList::userCanBitfield( $row->rc_deleted, LogPage::DELETED_ACTION, $user )
318
			) {
319
				if ( $this->fld_title ) {
320
					ApiQueryBase::addTitleInfo( $vals, $title );
321
				}
322
				if ( $this->fld_ids ) {
323
					$vals['pageid'] = intval( $row->rc_cur_id );
324
					$vals['revid'] = intval( $row->rc_this_oldid );
325
					$vals['old_revid'] = intval( $row->rc_last_oldid );
326
				}
327
			}
328
		}
329
330
		/* Add user data and 'anon' flag, if user is anonymous. */
331
		if ( $this->fld_user || $this->fld_userid ) {