Code Duplication    Length = 1-3 lines in 2 locations

code/controllers/CMSMain.php 1 location

@@ 1143-1143 (lines=1) @@
1140
		if($record && !$record->canUnpublish()) {
1141
			return Security::permissionFailure($this);
1142
		}
1143
		if(!$record || !$record->ID) {
1144
			throw new SS_HTTPResponse_Exception("Bad record ID #" . (int)$data['ID'], 404);
1145
		}
1146

code/controllers/AssetAdmin.php 1 location

@@ 338-340 (lines=3) @@
335
		if($record && !$record->canDelete()) {
336
			return Security::permissionFailure();
337
		}
338
		if(!$record || !$record->ID) {
339
			throw new SS_HTTPResponse_Exception("Bad record ID #" . (int)$data['ID'], 404);
340
		}
341
		$parentID = $record->ParentID;
342
		$record->delete();
343
		$this->setCurrentPageID(null);