Code Duplication    Length = 4-6 lines in 2 locations

code/controllers/ModelAsController.php 1 location

@@ 64-69 (lines=6) @@
61
		}
62
63
		// If the database has not yet been created, redirect to the build page.
64
		if(!DB::is_active() || !ClassInfo::hasTable('SiteTree')) {
65
			$this->getResponse()->redirect(Director::absoluteBaseURL() . 'dev/build?returnURL=' . (isset($_GET['url']) ? urlencode($_GET['url']) : null));
66
			$this->popCurrent();
67
68
			return $this->getResponse();
69
		}
70
71
		try {
72
			$result = $this->getNestedController();

code/controllers/RootURLController.php 1 location

@@ 121-124 (lines=4) @@
118
		$this->pushCurrent();
119
		$this->init();
120
121
		if(!DB::is_active() || !ClassInfo::hasTable('SiteTree')) {
122
			$this->getResponse()->redirect(Director::absoluteBaseURL() . 'dev/build?returnURL=' . (isset($_GET['url']) ? urlencode($_GET['url']) : null));
123
			return $this->getResponse();
124
		}
125
126
		$request->setUrl(self::get_homepage_link() . '/');
127
		$request->match('$URLSegment//$Action', true);