Code Duplication    Length = 7-7 lines in 2 locations

includes/specials/SpecialEditTags.php 1 location

@@ 85-91 (lines=7) @@
82
83
		// Handle our many different possible input types
84
		$ids = $request->getVal( 'ids' );
85
		if ( !is_null( $ids ) ) {
86
			// Allow CSV from the form hidden field, or a single ID for show/hide links
87
			$this->ids = explode( ',', $ids );
88
		} else {
89
			// Array input
90
			$this->ids = array_keys( $request->getArray( 'ids', [] ) );
91
		}
92
		$this->ids = array_unique( array_filter( $this->ids ) );
93
94
		// No targets?

includes/specials/SpecialRevisiondelete.php 1 location

@@ 136-142 (lines=7) @@
133
		$this->submitClicked = $request->wasPosted() && $request->getBool( 'wpSubmit' );
134
		# Handle our many different possible input types.
135
		$ids = $request->getVal( 'ids' );
136
		if ( !is_null( $ids ) ) {
137
			# Allow CSV, for backwards compatibility, or a single ID for show/hide links
138
			$this->ids = explode( ',', $ids );
139
		} else {
140
			# Array input
141
			$this->ids = array_keys( $request->getArray( 'ids', [] ) );
142
		}
143
		// $this->ids = array_map( 'intval', $this->ids );
144
		$this->ids = array_unique( array_filter( $this->ids ) );
145