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

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