Code Duplication    Length = 13-14 lines in 2 locations

code/control/DNRoot.php 2 locations

@@ 2181-2194 (lines=14) @@
2178
	 *
2179
	 * @return PaginatedList
2180
	 */
2181
	public function CompleteDataArchives() {
2182
		$project = $this->getCurrentProject();
2183
		$archives = new ArrayList();
2184
2185
		$archiveList = $project->DataArchives();
2186
		if($archiveList->count() > 0) {
2187
			foreach($archiveList as $archive) {
2188
				if($archive->canView() && !$archive->isPending()) {
2189
					$archives->push($archive);
2190
				}
2191
			}
2192
		}
2193
		return new PaginatedList($archives->sort("Created", "DESC"), $this->request);
2194
	}
2195
2196
	/**
2197
	 * @return PaginatedList The list of "pending" data archives which are waiting for a file
@@ 2200-2212 (lines=13) @@
2197
	 * @return PaginatedList The list of "pending" data archives which are waiting for a file
2198
	 * to be delivered offline by post, and manually uploaded into the system.
2199
	 */
2200
	public function PendingDataArchives() {
2201
		$project = $this->getCurrentProject();
2202
		$archives = new ArrayList();
2203
2204
		$archiveList = $project->DataArchives();
2205
		foreach($archiveList as $archive) {
2206
			if($archive->canView() && $archive->isPending()) {
2207
				$archives->push($archive);
2208
			}
2209
		}
2210
2211
		return new PaginatedList($archives->sort("Created", "DESC"), $this->request);
2212
	}
2213
2214
	/**
2215
	 * @return PaginatedList