Code Duplication    Length = 4-6 lines in 2 locations

code/Controllers/RootURLController.php 1 location

@@ 151-154 (lines=4) @@
148
149
		if (!$this->getResponse()->isFinished()) {
150
			/** @skipUpgrade */
151
			if (!DB::is_active() || !ClassInfo::hasTable('SiteTree')) {
152
				$this->getResponse()->redirect(Director::absoluteBaseURL() . 'dev/build?returnURL=' . (isset($_GET['url']) ? urlencode($_GET['url']) : null));
153
				return $this->getResponse();
154
			}
155
156
			$request->setUrl(self::get_homepage_link() . '/');
157
			$request->match('$URLSegment//$Action', true);

code/Controllers/ModelAsController.php 1 location

@@ 87-92 (lines=6) @@
84
85
		// If the database has not yet been created, redirect to the build page.
86
		/** @skipUpgrade */
87
		if(!DB::is_active() || !ClassInfo::hasTable('SiteTree')) {
88
			$this->getResponse()->redirect(Director::absoluteBaseURL() . 'dev/build?returnURL=' . (isset($_GET['url']) ? urlencode($_GET['url']) : null));
89
			$this->popCurrent();
90
91
			return $this->getResponse();
92
		}
93
94
		try {
95
			$result = $this->getNestedController();