Code Duplication    Length = 4-6 lines in 2 locations

code/controllers/ModelAsController.php 1 location

@@ 78-83 (lines=6) @@
75
		}
76
77
		// If the database has not yet been created, redirect to the build page.
78
		if(!DB::is_active() || !ClassInfo::hasTable('SiteTree')) {
79
			$this->getResponse()->redirect(Director::absoluteBaseURL() . 'dev/build?returnURL=' . (isset($_GET['url']) ? urlencode($_GET['url']) : null));
80
			$this->popCurrent();
81
82
			return $this->getResponse();
83
		}
84
85
		try {
86
			$result = $this->getNestedController();

code/controllers/RootURLController.php 1 location

@@ 139-142 (lines=4) @@
136
		$this->beforeHandleRequest($request, $model);
137
138
		if (!$this->getResponse()->isFinished()) {
139
			if (!DB::is_active() || !ClassInfo::hasTable('SiteTree')) {
140
				$this->getResponse()->redirect(Director::absoluteBaseURL() . 'dev/build?returnURL=' . (isset($_GET['url']) ? urlencode($_GET['url']) : null));
141
				return $this->getResponse();
142
			}
143
144
			$request->setUrl(self::get_homepage_link() . '/');
145
			$request->match('$URLSegment//$Action', true);