Code Duplication    Length = 10-10 lines in 2 locations

code/model/VirtualPage.php 1 location

@@ 363-372 (lines=10) @@
360
361
		// "Can be root" validation
362
		$orig = $this->CopyContentFrom();
363
		if(!$orig->stat('can_be_root') && !$this->ParentID) {
364
			$result->error(
365
				_t(
366
					'VirtualPage.PageTypNotAllowedOnRoot', 
367
					'Original page type "{type}" is not allowed on the root level for this virtual page', 
368
					array('type' => $orig->i18n_singular_name())
369
				),
370
				'CAN_BE_ROOT_VIRTUAL'
371
			);
372
		}
373
374
		return $result;
375
	}

code/model/SiteTree.php 1 location

@@ 1605-1614 (lines=10) @@
1602
		}
1603
1604
		// "Can be root" validation
1605
		if(!$this->stat('can_be_root') && !$this->ParentID) {
1606
			$result->error(
1607
				_t(
1608
					'SiteTree.PageTypNotAllowedOnRoot',
1609
					'Page type "{type}" is not allowed on the root level',
1610
					array('type' => $this->i18n_singular_name())
1611
				),
1612
				'CAN_BE_ROOT'
1613
			);
1614
		}
1615
		
1616
		return $result;
1617
	}